root/source/configure.in

Revision 158, 6.0 kB (checked in by mercyful, 19 months ago)

Udate Project with -UFORTIFY_SOURCE for GCC 4.3+ SegFaults?.
Updated Install.pl to set new compiler flags in SMAPI JAM Lib
- Temp Removed Perl and Python Bindings for rewrite.

  • Property svn:executable set to *
Line 
1# Autoconfig problems, run this!  'rm -f m4/{lt,lib}*.m4; autoreconf -svif'
2
3AC_INIT(configure.in)
4
5AM_CONFIG_HEADER(config.h)
6AM_INIT_AUTOMAKE(enthral, 001)
7
8AC_LANG_CPLUSPLUS
9AC_PROG_CXX
10
11m4_pattern_allow([^AM_PROG_LIBTOOL$])
12AM_PROG_LIBTOOL
13
14AC_ARG_ENABLE(python,
15[  --disable-python        don't build the python plugin],
16        python=$enableval, python=yes)
17
18AC_ARG_ENABLE(perl,
19[  --disable-perl          don't build the perl plugin],
20        perl=$enableval, perl=yes)
21
22AC_PATH_PROG(sedpath, sed)
23if test "_$sedpath" = _; then
24    AC_MSG_ERROR("Cannot find sed: I need it\!")
25fi
26
27AH_VERBATIM([USING_FREEBSD],[#undef USING_FREEBSD])
28AH_VERBATIM([USING_LINUX],[#undef USING_LINUX])
29AH_VERBATIM([OLD_PERL],[#undef OLD_PERL])
30
31
32dnl *********************************************************************
33dnl ** PYTHON ***********************************************************
34dnl *********************************************************************
35
36dnl echo Detecting Python ...
37dnl
38dnl echo Prefix: ${prefix}
39dnl
40dnl AC_PATH_PROG(pythonpath, python2)
41dnl echo Pythonpath: $pythonpath
42
43dnl AC_PATH_PROG(pythonpath, python)
44dnl echo Pythonpath: $pythonpath
45
46
47dnl if test "$python" = yes; then
48dnl        AC_PATH_PROG(pythonpath, python2)
49dnl         if test "_$pythonpath" = _ ; then
50dnl                 AC_PATH_PROG(pythonpath, python)
51dnl         fi
52dnl         if test "_$pythonpath" = _ ; then
53dnl                 python=no
54dnl         else
55dnl                 AC_MSG_CHECKING(Python version)
56dnl                 changequote(<<, >>)dnl
57dnl                 PY_VER=`$pythonpath -c 'import distutils.sysconfig; print distutils.sysconfig.get_config_vars("VERSION")[0];'`
58dnl                 PY_LIB=`$pythonpath -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_lib(standard_lib=1);'`
59dnl                 PY_INC=`$pythonpath -c 'import distutils.sysconfig; print distutils.sysconfig.get_config_vars("INCLUDEPY")[0];'`
60dnl                 $pythonpath -c "import sys; map(int,sys.version[:3].split('.')) >= [2,2] or sys.exit(1)"
61dnl                 changequote([, ])dnl
62dnl                 AC_MSG_RESULT($PY_VER)
63dnl                 if test "$?" != "1"; then
64dnl                         AC_MSG_CHECKING(Python compile flags)
65dnl                         PY_PREFIX=`$pythonpath -c 'import sys; print sys.prefix'`
66dnl                         PY_EXEC_PREFIX=`$pythonpath -c 'import sys; print sys.exec_prefix'`
67dnl                         if test -f $PY_INC/Python.h; then
68dnl
69                                # Check for BSD on This one Might be needed w/ config.
70                                #PY_LIBS="-L$PY_LIB/config -lpython$PY_VER -lpthread -lutil"
71                                #PY_LIBS="-L$PY_LIB -lpython$PY_VER -lpthread -lutil -lm"
72
73
74dnl                                                             PY_LIBS="-L$PY_LIB/config -L$PY_LIB -lpython$PY_VER -lutil -lpthread -lm"
75dnl                                 PY_CFLAGS="-I$PY_INC"
76dnl                                 AC_MSG_RESULT(ok)
77
78dnl                                 AH_BOTTOM([#define HAVE_PYTHON 1])
79
80dnl                         else
81dnl                                 python=no
82dnl                                 AC_MSG_RESULT([Can't find Python.h])
83dnl                         fi
84dnl                 else
85dnl                         echo "Python too old. Only 2.2 or above is supported."
86dnl                         python=no
87dnl                 fi
88
89dnl                 CFLAGS+=" -I$PY_INC -U_FORTIFY_SOURCE  -m32"
90dnl                 CXXFLAGS+=" -I$PY_INC -U_FORTIFY_SOURCE  -m32"
91
92dnl         fi
93dnl fi
94
95
96dnl *********************************************************************
97dnl ** PERL *************************************************************
98dnl *********************************************************************
99
100dnl if test "$perl" = yes; then
101dnl     AC_PATH_PROG(perlpath, perl)
102dnl     AC_MSG_CHECKING(for Perl compile flags)
103dnl     PERL_CFLAGS=`$perlpath -MExtUtils::Embed -e ccopts 2>/dev/null`
104dnl     if test "_$PERL_CFLAGS" = _ ; then
105dnl         AC_MSG_RESULT([not found, building without perl.])
106dnl         perl=no
107dnl     else
108dnl         PERL_LDFLAGS=`$perlpath -MExtUtils::Embed -e ldopts |$sedpath 's/-lgdbm //'`
109dnl         PERL_LDFLAGS=`echo $PERL_LDFLAGS |$sedpath 's/-ldb //'`
110dnl         PERL_LDFLAGS=`echo $PERL_LDFLAGS |$sedpath 's/-lndbm //'`
111dnl         if test "$system" = "Linux"; then
112dnl             PERL_LDFLAGS=`echo $PERL_LDFLAGS |$sedpath 's/-lnsl //'`
113dnl             PERL_LDFLAGS=`echo $PERL_LDFLAGS |$sedpath 's/-lposix //'`
114dnl         fi
115dnl         PERL_LDFLAGS=`echo $PERL_LDFLAGS |$sedpath 's/-lc //'`
116dnl         AC_MSG_RESULT(ok)
117dnl         AC_MSG_CHECKING(for perl >= 5.8.0)
118dnl         PERL_VER=`$perlpath -e 'print $]>= 5.008?"yes":"no"'`
119dnl         if test "$PERL_VER" = "yes"; then
120dnl             AC_MSG_RESULT(yes)
121dnl             AC_MSG_CHECKING(if perl plugin will be backward compatible)
122dnl             if test "$perl_old" = "yes"; then
123dnl                       AC_MSG_RESULT(yes)
124dnl                       AC_DEFINE(OLD_PERL)
125
126dnl                     CFLAGS+=" -I$PERL_CFLAGS"
127dnl                     CXXFLAGS+=" -I$PERL_LDFLAGS -l$PY_VER"
128dnl                     #LDFLAGS+=" -l$PY_VER"
129
130dnl             else
131dnl                       AC_MSG_RESULT(no)
132dnl             fi
133dnl         else
134dnl             AC_MSG_RESULT(no)
135dnl             echo "perl version too old, building without perl."
136dnl             perl=no
137dnl         fi
138dnl     fi
139dnl fi
140
141dnl AM_CONDITIONAL(DO_PYTHON, test "x$python" = "xyes")
142dnl AM_CONDITIONAL(DO_PERL, test "x$perl" = "xyes")
143
144dnl echo =[Python]=======
145dnl echo PLUGINS: Python: $python
146dnl echo PLUGINS: Python: $PY_VER
147dnl echo PLUGINS: Python: $PY_LIB
148dnl echo PLUGINS: Python: $PY_INC
149dnl echo =[Perl - WIP]===
150dnl echo PLUGINS: Perl: $perl
151dnl echo PLUGINS: Perl: $PERL_CFLAGS
152dnl echo PLUGINS: Perl: $PERL_LDFLAGS
153dnl echo =[Done]=========
154
155
156dnl AC_SUBST(PY_CFLAGS)
157dnl AC_SUBST(PY_LIBS)
158
159dnl AC_SUBST(PERL_CFLAGS)
160dnl AC_SUBST(PERL_LDFLAGS)
161
162
163 CFLAGS+="  -U_FORTIFY_SOURCE  -m32"
164 CXXFLAGS+=" -U_FORTIFY_SOURCE  -m32"
165
166
167AC_OUTPUT(Makefile src/Makefile)
168
Note: See TracBrowser for help on using the browser.