summaryrefslogtreecommitdiff
path: root/configure.in
blob: 0caeeb5b9f9ef386ed79b88ef9afe09d4351c020 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
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

dnl # checking swig version 
dnl # swig -version 2>&1 | grep Version | awk '{print $3}'

SWIGVERSION=`swig -version 2>&1 | grep Version | awk '{print $3}'`

MV_MSG(["SWIGVERSION is "$SWIGVERSION] , [$MAGENTA])

# <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]