Commit a342a7f9fe190f7a1ea37967ce8e963977d0ac49
1 parent
cb1f36d6
add SWIG and ctlike
Showing
1 changed file
with
32 additions
and
1 deletions
configure.ac
| ... | ... | @@ -12,6 +12,7 @@ AC_DEFINE([PREFIX], [$prefix], 'Installation prefix') |
| 12 | 12 | # Checks for programs. |
| 13 | 13 | AC_PROG_CXX |
| 14 | 14 | AC_PROG_INSTALL |
| 15 | +AC_PROG_LIBTOOL | |
| 15 | 16 | |
| 16 | 17 | # Checks for libraries. |
| 17 | 18 | if test "x$prefix" = xNONE; then |
| ... | ... | @@ -27,6 +28,33 @@ CFLAGS="$CFLAGS $GammaLib_CFLAGS" |
| 27 | 28 | CPPFLAGS="$CPPFLAGS $GammaLib_CFLAGS" |
| 28 | 29 | LDFLAGS="$LDFLAGS $GammaLib_LIBS" |
| 29 | 30 | |
| 31 | +# Checks for SWIG | |
| 32 | +AC_PATH_PROG([SWIG], [swig]) | |
| 33 | +AM_CONDITIONAL(HAVE_SWIG, test "$SWIG") | |
| 34 | + | |
| 35 | +# Checks for Python | |
| 36 | +AM_PATH_PYTHON([2.2], | |
| 37 | + [], | |
| 38 | + [AC_MSG_WARN([Python not found. Python is required to build python binding. Python can be obtained from http://www.python.org])]) | |
| 39 | +AM_CONDITIONAL(HAVE_PYTHON, test "$PYTHON") | |
| 40 | + | |
| 41 | +AC_ARG_ENABLE([python-binding], | |
| 42 | + AS_HELP_STRING([--enable-python-binding], | |
| 43 | + [build python binding (default=yes)]), | |
| 44 | + [ac_enable_python_binding=no], | |
| 45 | + [ac_enable_python_binding=yes]) | |
| 46 | +if test "x$ac_enable_python_binding" = "xyes" | |
| 47 | +then | |
| 48 | + if test ! "$SWIG" -a ! "$PYTHON" | |
| 49 | + then | |
| 50 | + AC_MSG_WARN([Python binding for ctatools cannot be built. Ensure that SWIG and Python packages are available.]) | |
| 51 | + fi | |
| 52 | +else | |
| 53 | + AC_MSG_NOTICE([Python binding for ctatools will not be built.]) | |
| 54 | + AC_MSG_NOTICE([Enable Python binding module building with --enable-python-binding]) | |
| 55 | +fi | |
| 56 | +AM_CONDITIONAL(ENABLE_PYTHON_BINDING, test "x$ac_enable_python_binding" = "xyes") | |
| 57 | + | |
| 30 | 58 | # Checks for header files. |
| 31 | 59 | |
| 32 | 60 | # Checks for typedefs, structures, and compiler characteristics. |
| ... | ... | @@ -36,5 +64,8 @@ LDFLAGS="$LDFLAGS $GammaLib_LIBS" |
| 36 | 64 | AC_CONFIG_FILES([Makefile |
| 37 | 65 | src/Makefile |
| 38 | 66 | src/ctselect/Makefile |
| 39 | - src/ctbin/Makefile]) | |
| 67 | + src/ctbin/Makefile | |
| 68 | + src/ctlike/Makefile | |
| 69 | + pyext/Makefile | |
| 70 | + pyext/setup.py]) | |
| 40 | 71 | AC_OUTPUT | ... | ... |