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
#
# 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"))
#
#
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
#
dnl # exporting (Makefile some variables)
AC_SUBST(PACKAGE)
AC_SUBST(VERSION)
AC_OUTPUT(GNUmakefile)
MV_COLOR_OFF
dnl # [END OF FILE]