Commit dedab94ff8f5a05531afc6f63d45b566b7e9de4f

Authored by knodlseder
1 parent 47c87b2f

complete python bindings for existing public methods

config.h.in
1 1 /* config.h.in. Generated from configure.ac by autoheader. */
2 2  
  3 +/* Define if cfitsio is available */
  4 +#undef G_CFITSIO
  5 +
3 6 /* Define if range checking should be performed */
4 7 #undef G_RANGE_CHECK
5 8  
  9 +/* Define to 1 if you have the <dlfcn.h> header file. */
  10 +#undef HAVE_DLFCN_H
  11 +
  12 +/* Define to 1 if you have the <inttypes.h> header file. */
  13 +#undef HAVE_INTTYPES_H
  14 +
  15 +/* Define to 1 if you have the <memory.h> header file. */
  16 +#undef HAVE_MEMORY_H
  17 +
  18 +/* Define to 1 if you have the <stdint.h> header file. */
  19 +#undef HAVE_STDINT_H
  20 +
  21 +/* Define to 1 if you have the <stdlib.h> header file. */
  22 +#undef HAVE_STDLIB_H
  23 +
  24 +/* Define to 1 if you have the <strings.h> header file. */
  25 +#undef HAVE_STRINGS_H
  26 +
  27 +/* Define to 1 if you have the <string.h> header file. */
  28 +#undef HAVE_STRING_H
  29 +
  30 +/* Define to 1 if you have the <sys/stat.h> header file. */
  31 +#undef HAVE_SYS_STAT_H
  32 +
  33 +/* Define to 1 if you have the <sys/types.h> header file. */
  34 +#undef HAVE_SYS_TYPES_H
  35 +
  36 +/* Define to 1 if you have the <unistd.h> header file. */
  37 +#undef HAVE_UNISTD_H
  38 +
6 39 /* Name of package */
7 40 #undef PACKAGE
8 41  
... ... @@ -21,5 +54,8 @@
21 54 /* Define to the version of this package. */
22 55 #undef PACKAGE_VERSION
23 56  
  57 +/* Define to 1 if you have the ANSI C header files. */
  58 +#undef STDC_HEADERS
  59 +
24 60 /* Version number of package */
25 61 #undef VERSION
... ...
configure
... ... @@ -1485,7 +1485,7 @@ Optional Features:
1485 1485 optimize for fast installation [default=yes]
1486 1486 --disable-libtool-lock avoid locking (might break parallel builds)
1487 1487 --enable-range-check performs index range checking
1488   - --enable-python-binding build python binding (default=no
  1488 + --enable-python-binding build python binding (default=yes
1489 1489  
1490 1490 Optional Packages:
1491 1491 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
... ... @@ -2433,8 +2433,7 @@ fi
2433 2433  
2434 2434  
2435 2435  
2436   -# things required by automake
2437   -# AC_ARG_PROGRAM
  2436 +
2438 2437 { echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
2439 2438 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
2440 2439 set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
... ... @@ -2466,10 +2465,9 @@ echo &quot;${ECHO_T}no&quot; &gt;&amp;6; }
2466 2465 fi
2467 2466  
2468 2467  
2469   -# Check for which system.
2470   -# AC_CANONICAL_HOST
2471 2468  
2472   -# Checks for programs.
  2469 +
  2470 +
2473 2471 ac_ext=cpp
2474 2472 ac_cpp='$CXXCPP $CPPFLAGS'
2475 2473 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
... ... @@ -3077,9 +3075,6 @@ ac_compile=&#39;$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext &gt;&amp;5&#39;
3077 3075 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3078 3076 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3079 3077  
3080   -# AC_LANG(C)
3081   -# AC_PROG_CC
3082   -# AC_PROG_CPP
3083 3078 # Find a good install program. We prefer a C program (faster),
3084 3079 # so one script is as good as another. But avoid the broken or
3085 3080 # incompatible versions:
... ... @@ -3160,16 +3155,12 @@ test -z &quot;$INSTALL_SCRIPT&quot; &amp;&amp; INSTALL_SCRIPT=&#39;${INSTALL}&#39;
3160 3155  
3161 3156 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3162 3157  
3163   -# AC_PROG_LN_S
3164 3158  
3165   -# Library versioning (current:revision:age)
3166   -# See the libtool manual for an explanation
3167   -#
3168   -# gammalib-0.1 libgamma 0:0:0
  3159 +
3169 3160 GAMMALIB_LT_VERSION="0:0:0"
3170 3161  
3171 3162  
3172   -# libtool test.
  3163 +
3173 3164 # Check whether --enable-shared was given.
3174 3165 if test "${enable_shared+set}" = set; then
3175 3166 enableval=$enable_shared; p=${PACKAGE-default}
... ... @@ -4654,7 +4645,7 @@ ia64-*-hpux*)
4654 4645 ;;
4655 4646 *-*-irix6*)
4656 4647 # Find out which ABI we are using.
4657   - echo '#line 4657 "configure"' > conftest.$ac_ext
  4648 + echo '#line 4648 "configure"' > conftest.$ac_ext
4658 4649 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4659 4650 (eval $ac_compile) 2>&5
4660 4651 ac_status=$?
... ... @@ -7239,11 +7230,11 @@ else
7239 7230 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
7240 7231 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
7241 7232 -e 's:$: $lt_compiler_flag:'`
7242   - (eval echo "\"\$as_me:7242: $lt_compile\"" >&5)
  7233 + (eval echo "\"\$as_me:7233: $lt_compile\"" >&5)
7243 7234 (eval "$lt_compile" 2>conftest.err)
7244 7235 ac_status=$?
7245 7236 cat conftest.err >&5
7246   - echo "$as_me:7246: \$? = $ac_status" >&5
  7237 + echo "$as_me:7237: \$? = $ac_status" >&5
7247 7238 if (exit $ac_status) && test -s "$ac_outfile"; then
7248 7239 # The compiler can only warn and ignore the option if not recognized
7249 7240 # So say no if there are warnings other than the usual output.
... ... @@ -7529,11 +7520,11 @@ else
7529 7520 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
7530 7521 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
7531 7522 -e 's:$: $lt_compiler_flag:'`
7532   - (eval echo "\"\$as_me:7532: $lt_compile\"" >&5)
  7523 + (eval echo "\"\$as_me:7523: $lt_compile\"" >&5)
7533 7524 (eval "$lt_compile" 2>conftest.err)
7534 7525 ac_status=$?
7535 7526 cat conftest.err >&5
7536   - echo "$as_me:7536: \$? = $ac_status" >&5
  7527 + echo "$as_me:7527: \$? = $ac_status" >&5
7537 7528 if (exit $ac_status) && test -s "$ac_outfile"; then
7538 7529 # The compiler can only warn and ignore the option if not recognized
7539 7530 # So say no if there are warnings other than the usual output.
... ... @@ -7633,11 +7624,11 @@ else
7633 7624 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
7634 7625 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
7635 7626 -e 's:$: $lt_compiler_flag:'`
7636   - (eval echo "\"\$as_me:7636: $lt_compile\"" >&5)
  7627 + (eval echo "\"\$as_me:7627: $lt_compile\"" >&5)
7637 7628 (eval "$lt_compile" 2>out/conftest.err)
7638 7629 ac_status=$?
7639 7630 cat out/conftest.err >&5
7640   - echo "$as_me:7640: \$? = $ac_status" >&5
  7631 + echo "$as_me:7631: \$? = $ac_status" >&5
7641 7632 if (exit $ac_status) && test -s out/conftest2.$ac_objext
7642 7633 then
7643 7634 # The compiler can only warn and ignore the option if not recognized
... ... @@ -9997,7 +9988,7 @@ else
9997 9988 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
9998 9989 lt_status=$lt_dlunknown
9999 9990 cat > conftest.$ac_ext <<EOF
10000   -#line 10000 "configure"
  9991 +#line 9991 "configure"
10001 9992 #include "confdefs.h"
10002 9993  
10003 9994 #if HAVE_DLFCN_H
... ... @@ -10097,7 +10088,7 @@ else
10097 10088 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
10098 10089 lt_status=$lt_dlunknown
10099 10090 cat > conftest.$ac_ext <<EOF
10100   -#line 10100 "configure"
  10091 +#line 10091 "configure"
10101 10092 #include "confdefs.h"
10102 10093  
10103 10094 #if HAVE_DLFCN_H
... ... @@ -12498,11 +12489,11 @@ else
12498 12489 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
12499 12490 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
12500 12491 -e 's:$: $lt_compiler_flag:'`
12501   - (eval echo "\"\$as_me:12501: $lt_compile\"" >&5)
  12492 + (eval echo "\"\$as_me:12492: $lt_compile\"" >&5)
12502 12493 (eval "$lt_compile" 2>conftest.err)
12503 12494 ac_status=$?
12504 12495 cat conftest.err >&5
12505   - echo "$as_me:12505: \$? = $ac_status" >&5
  12496 + echo "$as_me:12496: \$? = $ac_status" >&5
12506 12497 if (exit $ac_status) && test -s "$ac_outfile"; then
12507 12498 # The compiler can only warn and ignore the option if not recognized
12508 12499 # So say no if there are warnings other than the usual output.
... ... @@ -12602,11 +12593,11 @@ else
12602 12593 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
12603 12594 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
12604 12595 -e 's:$: $lt_compiler_flag:'`
12605   - (eval echo "\"\$as_me:12605: $lt_compile\"" >&5)
  12596 + (eval echo "\"\$as_me:12596: $lt_compile\"" >&5)
12606 12597 (eval "$lt_compile" 2>out/conftest.err)
12607 12598 ac_status=$?
12608 12599 cat out/conftest.err >&5
12609   - echo "$as_me:12609: \$? = $ac_status" >&5
  12600 + echo "$as_me:12600: \$? = $ac_status" >&5
12610 12601 if (exit $ac_status) && test -s out/conftest2.$ac_objext
12611 12602 then
12612 12603 # The compiler can only warn and ignore the option if not recognized
... ... @@ -14185,11 +14176,11 @@ else
14185 14176 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
14186 14177 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
14187 14178 -e 's:$: $lt_compiler_flag:'`
14188   - (eval echo "\"\$as_me:14188: $lt_compile\"" >&5)
  14179 + (eval echo "\"\$as_me:14179: $lt_compile\"" >&5)
14189 14180 (eval "$lt_compile" 2>conftest.err)
14190 14181 ac_status=$?
14191 14182 cat conftest.err >&5
14192   - echo "$as_me:14192: \$? = $ac_status" >&5
  14183 + echo "$as_me:14183: \$? = $ac_status" >&5
14193 14184 if (exit $ac_status) && test -s "$ac_outfile"; then
14194 14185 # The compiler can only warn and ignore the option if not recognized
14195 14186 # So say no if there are warnings other than the usual output.
... ... @@ -14289,11 +14280,11 @@ else
14289 14280 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
14290 14281 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
14291 14282 -e 's:$: $lt_compiler_flag:'`
14292   - (eval echo "\"\$as_me:14292: $lt_compile\"" >&5)
  14283 + (eval echo "\"\$as_me:14283: $lt_compile\"" >&5)
14293 14284 (eval "$lt_compile" 2>out/conftest.err)
14294 14285 ac_status=$?
14295 14286 cat out/conftest.err >&5
14296   - echo "$as_me:14296: \$? = $ac_status" >&5
  14287 + echo "$as_me:14287: \$? = $ac_status" >&5
14297 14288 if (exit $ac_status) && test -s out/conftest2.$ac_objext
14298 14289 then
14299 14290 # The compiler can only warn and ignore the option if not recognized
... ... @@ -16496,11 +16487,11 @@ else
16496 16487 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
16497 16488 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
16498 16489 -e 's:$: $lt_compiler_flag:'`
16499   - (eval echo "\"\$as_me:16499: $lt_compile\"" >&5)
  16490 + (eval echo "\"\$as_me:16490: $lt_compile\"" >&5)
16500 16491 (eval "$lt_compile" 2>conftest.err)
16501 16492 ac_status=$?
16502 16493 cat conftest.err >&5
16503   - echo "$as_me:16503: \$? = $ac_status" >&5
  16494 + echo "$as_me:16494: \$? = $ac_status" >&5
16504 16495 if (exit $ac_status) && test -s "$ac_outfile"; then
16505 16496 # The compiler can only warn and ignore the option if not recognized
16506 16497 # So say no if there are warnings other than the usual output.
... ... @@ -16786,11 +16777,11 @@ else
16786 16777 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
16787 16778 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
16788 16779 -e 's:$: $lt_compiler_flag:'`
16789   - (eval echo "\"\$as_me:16789: $lt_compile\"" >&5)
  16780 + (eval echo "\"\$as_me:16780: $lt_compile\"" >&5)
16790 16781 (eval "$lt_compile" 2>conftest.err)
16791 16782 ac_status=$?
16792 16783 cat conftest.err >&5
16793   - echo "$as_me:16793: \$? = $ac_status" >&5
  16784 + echo "$as_me:16784: \$? = $ac_status" >&5
16794 16785 if (exit $ac_status) && test -s "$ac_outfile"; then
16795 16786 # The compiler can only warn and ignore the option if not recognized
16796 16787 # So say no if there are warnings other than the usual output.
... ... @@ -16890,11 +16881,11 @@ else
16890 16881 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
16891 16882 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
16892 16883 -e 's:$: $lt_compiler_flag:'`
16893   - (eval echo "\"\$as_me:16893: $lt_compile\"" >&5)
  16884 + (eval echo "\"\$as_me:16884: $lt_compile\"" >&5)
16894 16885 (eval "$lt_compile" 2>out/conftest.err)
16895 16886 ac_status=$?
16896 16887 cat out/conftest.err >&5
16897   - echo "$as_me:16897: \$? = $ac_status" >&5
  16888 + echo "$as_me:16888: \$? = $ac_status" >&5
16898 16889 if (exit $ac_status) && test -s out/conftest2.$ac_objext
16899 16890 then
16900 16891 # The compiler can only warn and ignore the option if not recognized
... ... @@ -19568,19 +19559,15 @@ LIBTOOL=&#39;$(SHELL) $(top_builddir)/libtool&#39;
19568 19559  
19569 19560  
19570 19561  
19571   -# Check compiler features
19572   -# AC_TYPE_SIZE_T
19573   -# AC_C_CONST
19574   -# AC_C_VOLATILE
19575   -# AC_C_INLINE
19576 19562  
19577   -# Checks for header files.
19578 19563  
19579   -# Checks for typedefs, structures, and compiler characteristics.
19580 19564  
19581   -# Checks for library functions.
19582 19565  
19583   -# Check for range cheking option.
  19566 +
  19567 +
  19568 +
  19569 +
  19570 +
19584 19571 RANGE_CHECK="no"
19585 19572 # Check whether --enable-range_check was given.
19586 19573 if test "${enable_range_check+set}" = set; then
... ... @@ -19596,9 +19583,7 @@ _ACEOF
19596 19583  
19597 19584 fi
19598 19585  
19599   -# ===============
19600   -# Checks for SWIG
19601   -# ===============
  19586 +
19602 19587 # Extract the first word of "swig", so it can be a program name with args.
19603 19588 set dummy swig; ac_word=$2
19604 19589 { echo "$as_me:$LINENO: checking for $ac_word" >&5
... ... @@ -19651,9 +19636,6 @@ fi
19651 19636  
19652 19637  
19653 19638  
19654   -# =================
19655   -# Checks for Python
19656   -# =================
19657 19639  
19658 19640  
19659 19641  
... ... @@ -19852,22 +19834,22 @@ fi
19852 19834  
19853 19835 # Check whether --enable-python-binding was given.
19854 19836 if test "${enable_python_binding+set}" = set; then
19855   - enableval=$enable_python_binding; ac_enable_python_binding=yes
  19837 + enableval=$enable_python_binding; ac_enable_python_binding=no
19856 19838 else
19857   - ac_enable_python_binding=no
  19839 + ac_enable_python_binding=yes
19858 19840 fi
19859 19841  
19860 19842 if test "x$ac_enable_python_binding" = "xyes"
19861 19843 then
19862   - if test ! "$SWIG" -a ! "$PYTHON"
19863   - then
19864   - { echo "$as_me:$LINENO: WARNING: Python binding for gammalib cannot be built. Ensure that SWIG and Python packages are available." >&5
  19844 + if test ! "$SWIG" -a ! "$PYTHON"
  19845 + then
  19846 + { echo "$as_me:$LINENO: WARNING: Python binding for gammalib cannot be built. Ensure that SWIG and Python packages are available." >&5
19865 19847 echo "$as_me: WARNING: Python binding for gammalib cannot be built. Ensure that SWIG and Python packages are available." >&2;}
19866   - fi
  19848 + fi
19867 19849 else
19868   - { echo "$as_me:$LINENO: Python binding for gammalib will not be built." >&5
  19850 + { echo "$as_me:$LINENO: Python binding for gammalib will not be built." >&5
19869 19851 echo "$as_me: Python binding for gammalib will not be built." >&6;}
19870   - { echo "$as_me:$LINENO: Enable Python binding module building with --enable-python-binding" >&5
  19852 + { echo "$as_me:$LINENO: Enable Python binding module building with --enable-python-binding" >&5
19871 19853 echo "$as_me: Enable Python binding module building with --enable-python-binding" >&6;}
19872 19854 fi
19873 19855  
... ... @@ -19882,8 +19864,101 @@ fi
19882 19864  
19883 19865  
19884 19866  
19885   -#
19886   -#AC_CONFIG_FILES([Makefile src/Makefile test/Makefile pyext/Makefile])
  19867 +{ echo "$as_me:$LINENO: checking for library containing ffpss" >&5
  19868 +echo $ECHO_N "checking for library containing ffpss... $ECHO_C" >&6; }
  19869 +if test "${ac_cv_search_ffpss+set}" = set; then
  19870 + echo $ECHO_N "(cached) $ECHO_C" >&6
  19871 +else
  19872 + ac_func_search_save_LIBS=$LIBS
  19873 +cat >conftest.$ac_ext <<_ACEOF
  19874 +/* confdefs.h. */
  19875 +_ACEOF
  19876 +cat confdefs.h >>conftest.$ac_ext
  19877 +cat >>conftest.$ac_ext <<_ACEOF
  19878 +/* end confdefs.h. */
  19879 +
  19880 +/* Override any GCC internal prototype to avoid an error.
  19881 + Use char because int might match the return type of a GCC
  19882 + builtin and then its argument prototype would still apply. */
  19883 +#ifdef __cplusplus
  19884 +extern "C"
  19885 +#endif
  19886 +char ffpss ();
  19887 +int
  19888 +main ()
  19889 +{
  19890 +return ffpss ();
  19891 + ;
  19892 + return 0;
  19893 +}
  19894 +_ACEOF
  19895 +for ac_lib in '' cfitsio; do
  19896 + if test -z "$ac_lib"; then
  19897 + ac_res="none required"
  19898 + else
  19899 + ac_res=-l$ac_lib
  19900 + LIBS="-l$ac_lib $ac_func_search_save_LIBS"
  19901 + fi
  19902 + rm -f conftest.$ac_objext conftest$ac_exeext
  19903 +if { (ac_try="$ac_link"
  19904 +case "(($ac_try" in
  19905 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  19906 + *) ac_try_echo=$ac_try;;
  19907 +esac
  19908 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  19909 + (eval "$ac_link") 2>conftest.er1
  19910 + ac_status=$?
  19911 + grep -v '^ *+' conftest.er1 >conftest.err
  19912 + rm -f conftest.er1
  19913 + cat conftest.err >&5
  19914 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
  19915 + (exit $ac_status); } && {
  19916 + test -z "$ac_c_werror_flag" ||
  19917 + test ! -s conftest.err
  19918 + } && test -s conftest$ac_exeext &&
  19919 + $as_test_x conftest$ac_exeext; then
  19920 + ac_cv_search_ffpss=$ac_res
  19921 +else
  19922 + echo "$as_me: failed program was:" >&5
  19923 +sed 's/^/| /' conftest.$ac_ext >&5
  19924 +
  19925 +
  19926 +fi
  19927 +
  19928 +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
  19929 + conftest$ac_exeext
  19930 + if test "${ac_cv_search_ffpss+set}" = set; then
  19931 + break
  19932 +fi
  19933 +done
  19934 +if test "${ac_cv_search_ffpss+set}" = set; then
  19935 + :
  19936 +else
  19937 + ac_cv_search_ffpss=no
  19938 +fi
  19939 +rm conftest.$ac_ext
  19940 +LIBS=$ac_func_search_save_LIBS
  19941 +fi
  19942 +{ echo "$as_me:$LINENO: result: $ac_cv_search_ffpss" >&5
  19943 +echo "${ECHO_T}$ac_cv_search_ffpss" >&6; }
  19944 +ac_res=$ac_cv_search_ffpss
  19945 +if test "$ac_res" != no; then
  19946 + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
  19947 +
  19948 +cat >>confdefs.h <<\_ACEOF
  19949 +#define G_CFITSIO 1
  19950 +_ACEOF
  19951 +
  19952 +else
  19953 +
  19954 +cat >>confdefs.h <<\_ACEOF
  19955 +#define G_CFITSIO 0
  19956 +_ACEOF
  19957 +
  19958 +fi
  19959 +
  19960 +
  19961 +
19887 19962 ac_config_files="$ac_config_files Makefile src/Makefile test/Makefile pyext/Makefile pyext/setup.py"
19888 19963  
19889 19964 cat >confcache <<\_ACEOF
... ...
configure.ac
1   -#
2   -# Process this file with autoconf to produce a configure script.
3   -#
  1 +dnl =============================================================
  2 +dnl Process this file with autoconf to produce a configure script
  3 +dnl =============================================================
4 4 AC_INIT([GammaLib], [0.1pre], [knodlseder@cesr.fr])
5 5 AC_CONFIG_SRCDIR(src/GammaLib.hpp)
6 6  
... ... @@ -8,44 +8,74 @@ AM_INIT_AUTOMAKE([gnu no-dependencies])
8 8 AM_CONFIG_HEADER([config.h])
9 9 AM_MAINTAINER_MODE
10 10  
11   -# things required by automake
12   -# AC_ARG_PROGRAM
  11 +
  12 +dnl ===========================
  13 +dnl things required by automake
  14 +dnl ===========================
  15 +dnl AC_ARG_PROGRAM
13 16 AC_PROG_MAKE_SET
14 17  
15   -# Check for which system.
16   -# AC_CANONICAL_HOST
17 18  
18   -# Checks for programs.
  19 +dnl ======================
  20 +dnl Check for which system
  21 +dnl ======================
  22 +dnl AC_CANONICAL_HOST
  23 +
  24 +
  25 +dnl ===================
  26 +dnl Checks for programs
  27 +dnl ===================
19 28 AC_PROG_CXX
20   -# AC_LANG(C)
21   -# AC_PROG_CC
22   -# AC_PROG_CPP
  29 +dnl AC_LANG(C)
  30 +dnl AC_PROG_CC
  31 +dnl AC_PROG_CPP
23 32 AC_PROG_INSTALL
24   -# AC_PROG_LN_S
  33 +dnl AC_PROG_LN_S
  34 +
25 35  
26   -# Library versioning (current:revision:age)
27   -# See the libtool manual for an explanation
28   -#
29   -# gammalib-0.1 libgamma 0:0:0
  36 +dnl =========================================
  37 +dnl Library versioning (current:revision:age)
  38 +dnl See the libtool manual for an explanation
  39 +dnl
  40 +dnl gammalib-0.1 libgamma 0:0:0
  41 +dnl =========================================
30 42 GAMMALIB_LT_VERSION="0:0:0"
31 43 AC_SUBST(GAMMALIB_LT_VERSION)
32 44  
33   -# libtool test.
  45 +
  46 +dnl ============
  47 +dnl libtool test
  48 +dnl ============
34 49 AC_PROG_LIBTOOL
35 50  
36   -# Check compiler features
37   -# AC_TYPE_SIZE_T
38   -# AC_C_CONST
39   -# AC_C_VOLATILE
40   -# AC_C_INLINE
41 51  
42   -# Checks for header files.
  52 +dnl =======================
  53 +dnl Check compiler features
  54 +dnl =======================
  55 +dnl AC_TYPE_SIZE_T
  56 +dnl AC_C_CONST
  57 +dnl AC_C_VOLATILE
  58 +dnl AC_C_INLINE
  59 +
  60 +
  61 +dnl =======================
  62 +dnl Checks for header files
  63 +dnl =======================
43 64  
44   -# Checks for typedefs, structures, and compiler characteristics.
45 65  
46   -# Checks for library functions.
  66 +dnl =============================================================
  67 +dnl Checks for typedefs, structures, and compiler characteristics
  68 +dnl =============================================================
47 69  
48   -# Check for range cheking option.
  70 +
  71 +dnl ============================
  72 +dnl Checks for library functions
  73 +dnl ============================
  74 +
  75 +
  76 +dnl ==============================
  77 +dnl Check for range cheking option
  78 +dnl ==============================
49 79 RANGE_CHECK="no"
50 80 AC_ARG_ENABLE(range_check,
51 81 [ --enable-range-check performs index range checking],
... ... @@ -56,38 +86,50 @@ if test &quot;x$RANGE_CHECK&quot; = &quot;xyes&quot;; then
56 86 [Define if range checking should be performed])
57 87 fi
58 88  
59   -# ===============
60   -# Checks for SWIG
61   -# ===============
  89 +
  90 +dnl ===============
  91 +dnl Checks for SWIG
  92 +dnl ===============
62 93 AC_PATH_PROG([SWIG], [swig])
63 94 AM_CONDITIONAL(HAVE_SWIG, test "$SWIG")
64 95  
65 96  
66   -# =================
67   -# Checks for Python
68   -# =================
69   -AM_PATH_PYTHON([2.2], [],
  97 +dnl =================
  98 +dnl Checks for Python
  99 +dnl =================
  100 +AM_PATH_PYTHON([2.2],
  101 + [],
70 102 [AC_MSG_WARN([Python not found. Python is required to build soothsayer python binding. Python can be obtained from http://www.python.org])])
71 103 AM_CONDITIONAL(HAVE_PYTHON, test "$PYTHON")
72 104  
73 105 AC_ARG_ENABLE([python-binding],
74   - AS_HELP_STRING([--enable-python-binding],
75   - [build python binding (default=no]),
76   - [ac_enable_python_binding=yes],
77   - [ac_enable_python_binding=no])
  106 + AS_HELP_STRING([--enable-python-binding],
  107 + [build python binding (default=yes]),
  108 + [ac_enable_python_binding=no],
  109 + [ac_enable_python_binding=yes])
78 110 if test "x$ac_enable_python_binding" = "xyes"
79 111 then
80   - if test ! "$SWIG" -a ! "$PYTHON"
81   - then
82   - AC_MSG_WARN([Python binding for gammalib cannot be built. Ensure that SWIG and Python packages are available.])
83   - fi
  112 + if test ! "$SWIG" -a ! "$PYTHON"
  113 + then
  114 + AC_MSG_WARN([Python binding for gammalib cannot be built. Ensure that SWIG and Python packages are available.])
  115 + fi
84 116 else
85   - AC_MSG_NOTICE([Python binding for gammalib will not be built.])
86   - AC_MSG_NOTICE([Enable Python binding module building with --enable-python-binding])
  117 + AC_MSG_NOTICE([Python binding for gammalib will not be built.])
  118 + AC_MSG_NOTICE([Enable Python binding module building with --enable-python-binding])
87 119 fi
88 120 AM_CONDITIONAL(ENABLE_PYTHON_BINDING, test "x$ac_enable_python_binding" = "xyes")
89 121  
90 122  
91   -#
92   -#AC_CONFIG_FILES([Makefile src/Makefile test/Makefile pyext/Makefile])
  123 +dnl ==================
  124 +dnl Checks for cfitsio
  125 +dnl ==================
  126 +AC_SEARCH_LIBS(ffpss, cfitsio,
  127 + AC_DEFINE([G_CFITSIO], [1], [Define if cfitsio is available]),
  128 + AC_DEFINE([G_CFITSIO], [0], [Define if cfitsio is available]) )
  129 +
  130 +
  131 +dnl ===
  132 +dnl
  133 +dnl ===
  134 +dnl AC_CONFIG_FILES([Makefile src/Makefile test/Makefile pyext/Makefile])
93 135 AC_OUTPUT([Makefile src/Makefile test/Makefile pyext/Makefile pyext/setup.py])
... ...
pyext/GFitPar.i
... ... @@ -64,7 +64,7 @@ private:
64 64 char *__str__() {
65 65 std::ostringstream buffer;
66 66 buffer << *self;
67   - std::string str = buffer.str();
  67 + static std::string str = buffer.str();
68 68 char* ptr = (char*)str.c_str();
69 69 return ptr;
70 70 }
... ...
pyext/GMatrix.i
... ... @@ -62,13 +62,6 @@ public:
62 62 virtual double max() const;
63 63 virtual double sum() const;
64 64 virtual void transpose();
65   -
66   -private:
67   - // Private methods
68   - void constructor(int rows, int cols);
69   - void init_members(void) { ; }
70   - void copy_members(const GMatrix& m) { ; }
71   - void free_members(void) { ; }
72 65 };
73 66  
74 67  
... ... @@ -79,7 +72,7 @@ private:
79 72 char *__str__() {
80 73 std::ostringstream buffer;
81 74 buffer << *self;
82   - std::string str = buffer.str();
  75 + static std::string str = buffer.str();
83 76 char* ptr = (char*)str.c_str();
84 77 return ptr;
85 78 }
... ... @@ -101,12 +94,6 @@ private:
101 94 GMatrix __div__(const double &a) {
102 95 return (*self) / a;
103 96 }
104   - GMatrix transpose(const GMatrix& m) {
105   - return transpose(m);
106   - }
107   - GMatrix abs(const GMatrix& m) {
108   - return fabs(m);
109   - }
110 97 GMatrix copy() {
111 98 return (*self);
112 99 }
... ...
pyext/GMatrixBase.i
... ... @@ -66,38 +66,4 @@ public:
66 66 virtual double max() const = 0;
67 67 virtual double sum() const = 0;
68 68 virtual void transpose() = 0;
69   -
70   -// Methods and data that are available to derived classes
71   -protected:
72   - // Protected methods
73   - void select_non_zero();
74   - void negation();
75   - void addition(const GMatrixBase& m);
76   - void subtraction(const GMatrixBase& m);
77   - void multiplication(const double& s);
78   - void set_all_elements(const double& s);
79   - double get_min_element() const;
80   - double get_max_element() const;
81   - double get_element_sum() const;
82   - void dump_elements(ostream& os) const;
83   - void dump_row_comp(ostream& os) const;
84   - void dump_col_comp(ostream& os) const;
85   -
86   - // Protected data area
87   - int m_rows; // Number of rows
88   - int m_cols; // Number of columns
89   - int m_elements; // Number of elements stored in matrix
90   - int m_alloc; // Size of allocated matrix memory
91   - int m_num_rowsel; // Number of selected rows (for compressed decomposition)
92   - int m_num_colsel; // Number of selected columns (for compressed decomposition)
93   - int* m_colstart; // Column start indices (m_cols+1)
94   - int* m_rowsel; // Row selection (for compressed decomposition)
95   - int* m_colsel; // Column selection (for compressed decomposition)
96   - double* m_data; // Matrix data
97   -
98   -// Methods that are available to the base class only
99   -private:
100   - void init_members(void);
101   - void copy_members(const GMatrixBase& m);
102   - void free_members(void);
103 69 };
... ...
pyext/GVector.i
... ... @@ -49,7 +49,7 @@ public:
49 49 char *__str__() {
50 50 std::ostringstream buffer;
51 51 buffer << *self;
52   - std::string str = buffer.str();
  52 + static std::string str = buffer.str();
53 53 char* ptr = (char*)str.c_str();
54 54 return ptr;
55 55 }
... ...
pyext/gammalib.i
... ... @@ -15,7 +15,12 @@
15 15 ***************************************************************************/
16 16 %module gammalib
17 17  
  18 +/* Linear Algebra */
18 19 #include "GVector.i"
19 20 #include "GMatrixBase.i"
20 21 #include "GMatrix.i"
  22 +#include "GSparseMatrix.i"
  23 +#include "GSymMatrix.i"
  24 +
  25 +/* Model fitting */
21 26 #include "GFitPar.i"
... ...
pyext/setup.py.in
... ... @@ -9,5 +9,6 @@ setup(name=&#39;@PACKAGE_NAME@&#39;,
9 9 ext_modules=[Extension('_gammalib', ['gammalib_wrap.cpp'],
10 10 include_dirs=['@top_srcdir@/src'],
11 11 library_dirs=['../src/.libs'],
12   - libraries=['gamma'])],
13   - )
14 12 \ No newline at end of file
  13 + libraries=['gamma'],
  14 + runtime_library_dirs=['@prefix@/lib'])],
  15 + )
... ...