summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in120
1 files changed, 120 insertions, 0 deletions
diff --git a/configure.in b/configure.in
new file mode 100644
index 0000000..e425f7f
--- /dev/null
+++ b/configure.in
@@ -0,0 +1,120 @@
+dnl # -*-shell-script-*-
+dnl # autoconf2.13 script
+dnl # «»
+dnl # FAIRE L INSTALL DE LA DOC
+
+AC_INIT(ivycpy.i)
+PACKAGE=ivycpy
+VERSION=0.5
+
+MV_COLOR_ON(BLACK, WHITE)
+dnl #
+AC_PROG_INSTALL
+
+dnl # for python specific settings
+MV_PROG_PYTHON
+
+CPPFLAGS="$CPPFLAGS -I$PYTHON_INCLUDEDIR/python$PYTHON_VERSION"
+
+dnl # for tcl specific settings
+MV_SET_TCL_CONFIG
+MV_MSG(["TCL_INCLUDES is "$TCL_INCLUDES] , [$MAGENTA])
+CPPFLAGS="$CPPFLAGS $TCL_INCLUDES"
+
+dnl # testing some tools are working properly : swig
+AC_CHECK_PROGS(SWIG, swig)
+
+if test -z "$SWIG"; then
+ MV_ERROR(
+SWIG (Simplified Wrapper and Interface Generator) not
+found)
+fi
+
+# <check for standard thing>
+
+# Checks for programs.
+# AC_PROG_CXX
+AC_PROG_CC
+
+# Checks for libraries.
+# FIXME: Replace `main' with a function in `-lc':
+AC_CHECK_LIB([c], [main])
+
+# Checks for header files.
+AC_HEADER_STDC
+AC_CHECK_HEADERS([stdlib.h string.h])
+
+# Checks for typedefs, structures, and compiler characteristics.
+AC_C_CONST
+
+# specific checks
+AC_TYPE_SIGNAL
+
+# Checks for library functions.
+# AC_MSG_CHECKING("checking for realloc ...")
+# AC_CHECK_FUNC(realloc,AC_MSG_RESULT(" present"),\
+# AC_MSG_ERROR("unreachable"))
+AC_CHECK_FUNC(realloc,,AC_MSG_ERROR("realloc unreachable"))
+
+# </check for standard thing>
+
+# <checking really presence of some ivycpy required header file, library>
+
+MV_MSG(["CPPFLAGS is "$CPPFLAGS] , [$MAGENTA])
+
+# python header
+AC_CHECK_HEADERS([Python.h _tkinter.h], ,
+AC_MSG_ERROR("Python.h _tkinter.h unreachable"))
+
+# tcl header
+AC_CHECK_HEADERS([tcl.h],,AC_MSG_ERROR("tcl.h unreachable"))
+# ivy header
+AC_CHECK_HEADERS([ivy.h],,AC_MSG_ERROR("ivy.h unreachable"))
+
+# python adaptation : shared macro with ivycpy (ENTER_PYTHON, LEAVE_PYTHON)
+# if you dont have them, it means you do not point on the suited python/tkinter
+# patched version
+# #include <_tkinter.h>
+
+AC_MSG_CHECKING("suited patched Python version")
+AC_EGREP_CPP(yes,
+ [#include <_tkinter.h>
+ #ifdef ENTER_PYTHON && LEAVE_PYTHON
+ yes
+ #endif
+ ], pythonpatched=yes, pythonpatched=no)
+if test "$pythonpatched" = "yes" ; then
+ AC_MSG_RESULT("ok")
+else
+ AC_MSG_ERROR("no")
+fi
+
+AC_MSG_CHECKING("TCL_THREADS")
+AC_EGREP_CPP(yes,
+ [
+#define WITH_THREAD
+#include <_tkinter.h>
+#ifdef TCL_THREADS
+yes
+#endif
+ ], tclthreads=yes, tclthreads=no)
+if test "$tclthreads" = "yes" ; then
+ AC_MSG_RESULT("ok")
+else
+ AC_MSG_RESULT("no")
+fi
+
+
+
+
+# </checking really presence of some ivycpy required header file, library>
+
+dnl # exporting (Makefile some variables)
+AC_SUBST(PACKAGE)
+AC_SUBST(VERSION)
+
+AC_OUTPUT(GNUmakefile)
+
+MV_COLOR_OFF
+
+dnl # [END OF FILE]