1 dnl Process this file with autoconf to produce a configure script.
2 dnl The macros which aren't shipped with the autotools are stored in the
3 dnl Tools/config directory in .m4 files.
5 AC_INIT([swig],[1.3.40],[http://www.swig.org])
7 AC_CONFIG_SRCDIR([Source/Swig/swig.h])
8 AC_CONFIG_AUX_DIR([Tools/config])
9 AC_CONFIG_HEADERS([Source/Include/swigconfig.h])
13 dnl Some extra defines for the config file
15 /* Default language */
16 #define SWIG_LANG "-tcl"
18 /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
20 # define _CRT_SECURE_NO_DEPRECATE
24 dnl Check for programs that a user requires to build SWIG
29 AM_PROG_CC_C_O # Needed for subdir-objects in AUTOMAKE_OPTIONS
31 AC_COMPILE_WARNINGS # Increase warning levels
33 AC_DEFINE_UNQUOTED(SWIG_CXX, ["$CXX"], [Compiler that built SWIG])
34 AC_DEFINE_UNQUOTED(SWIG_PLATFORM, ["$build"], [Platform that SWIG is built for])
36 dnl Checks for header files.
41 AC_CHECK_TYPES([bool])
45 AC_ARG_WITH(popen, AS_HELP_STRING([--without-popen], [Disable popen]), with_popen="$withval")
46 if test x"${with_popen}" = xno ; then
47 AC_MSG_NOTICE([Disabling popen])
49 AC_CHECK_FUNC(popen, AC_DEFINE(HAVE_POPEN, 1, [Define if popen is available]), AC_MSG_NOTICE([Disabling popen]))
52 dnl Look for RxSpencer
53 AC_ARG_WITH(rxspencer, AS_HELP_STRING([--with-rxspencer], [Enable RxSpencer]), with_rxspencer="yes")
54 if test x"${with_rxspencer}" = xyes ; then
55 #check first for the header
56 AC_CHECK_HEADER(rxspencer/regex.h,with_rxspencer="yes",with_rxspencer="no")
57 if test x"${with_rxspencer}" = xyes ; then
58 # now check for the library
59 AC_CHECK_LIB(rxspencer, regcomp,with_rxspencer="yes",with_rxspencer="no")
61 if test x"${with_rxspencer}" = xyes ; then
62 # library and header are available
63 AC_DEFINE(HAVE_RXSPENCER, 1,[Define if rxspencer is available])
64 LIBS="$LIBS -lrxspencer"
66 AC_MSG_NOTICE([RxSpencer not found. Obtain it at http://arglist.com/regex or http://gnuwin32.sourceforge.net/packages.html])
71 AC_ARG_ENABLE([ccache], AS_HELP_STRING([--disable-ccache], [disable building and installation of ccache-swig executable (default enabled)]), [enable_ccache=$enableval], [enable_ccache=yes])
72 AC_MSG_CHECKING([whether to enable ccache-swig])
73 AC_MSG_RESULT([$enable_ccache])
75 if test "$enable_ccache" = yes; then
76 AC_CONFIG_SUBDIRS(CCache)
79 AC_SUBST(ENABLE_CCACHE)
83 echo "Checking packages required for SWIG developers."
84 echo "Note : None of the following packages are required for users to compile and install SWIG"
89 AC_CHECK_PROGS(AR, ar aal, ar)
91 AC_CHECK_PROGS(YODL2MAN, yodl2man)
92 AC_CHECK_PROGS(YODL2HTML, yodl2html)
96 echo "Checking for installed target languages and other information in order to compile and run the examples."
97 echo "Note : None of the following packages are required for users to compile and install SWIG"
101 dnl How to specify include directories that may be system directories.
102 # -I should not be used on system directories (GCC)
103 if test "$GCC" = yes; then
110 dnl Info for building shared libraries ... in order to run the examples
112 # SO is the extension of shared libraries (including the dot!)
118 *-*-darwin*) SO=.bundle;;
119 *-*-cygwin* | *-*-mingw*) SO=.dll;;
125 # LDSHARED is the ld *command* used to create shared library
126 # -- "ld" on SunOS 4.x.x, "ld -G" on SunOS 5.x, "ld -shared" on IRIX 5
127 # (Shared libraries in this instance are shared modules to be loaded into
128 # Python, as opposed to building Python itself as a shared library.)
129 AC_MSG_CHECKING(LDSHARED)
130 if test -z "$LDSHARED"
133 *-*-aix*) LDSHARED="\$(srcdir)/ld_so_aix \$(CC)";;
134 *-*-cygwin* | *-*-mingw*)
135 if test "$GCC" = yes; then
136 LDSHARED="$CC -shared"
138 if test "cl" = $CC ; then
139 # Microsoft Visual C++ (MSVC)
140 LDSHARED="$CC -nologo -LD"
142 # Unknown compiler try gcc approach
143 LDSHARED="$CC -shared"
146 *-*-irix5*) LDSHARED="ld -shared";;
147 *-*-irix6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
148 *-*-sunos4*) LDSHARED="ld";;
149 *-*-solaris*) LDSHARED="ld -G";;
150 *-*-hp*) LDSHARED="ld -b";;
151 *-*-osf*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
152 *-sequent-sysv4) LDSHARED="ld -G";;
155 then LDSHARED='$(CC) $(LDFLAGS) -bundle -prebind'
156 else LDSHARED='$(CC) $(CFLAGS) -nostdlib -r';
158 if test "$with_next_framework" ; then
159 LDSHARED="$LDSHARED \$(LDLIBRARY)"
161 *-*-linux*) LDSHARED="gcc -shared";;
162 *-*-dgux*) LDSHARED="ld -G";;
163 *-*-freebsd3*) LDSHARED="gcc -shared";;
164 *-*-freebsd* | *-*-openbsd*) LDSHARED="ld -Bshareable";;
166 if [[ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]]
168 LDSHARED="cc -shared"
170 LDSHARED="ld -Bshareable"
172 *-sco-sysv*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
173 *-*-darwin*) LDSHARED="cc -bundle -undefined suppress -flat_namespace";;
177 AC_MSG_RESULT($LDSHARED)
178 # CXXSHARED is the ld *command* used to create C++ shared library
179 # -- "ld" on SunOS 4.x.x, "ld -G" on SunOS 5.x, "ld -shared" on IRIX 5
180 # (Shared libraries in this instance are shared modules to be loaded into
181 # Python, as opposed to building Python itself as a shared library.)
182 AC_MSG_CHECKING(CXXSHARED)
183 if test -z "$CXXSHARED"
185 CXXSHARED="$LDSHARED"
187 AC_MSG_RESULT($CXXSHARED)
190 AC_MSG_CHECKING(TRYLINKINGWITHCXX)
191 if test -z "$TRYLINKINGWITHCXX"
194 *-*-solaris*) if test "$GCC" = yes;
195 then TRYLINKINGWITHCXX="CXXSHARED= $CXX -Wl,-G";
196 else TRYLINKINGWITHCXX="CXXSHARED= $CXX -G -L/opt/SUNWspro/lib -lCrun -lCstd";
198 *-*-hp*) TRYLINKINGWITHCXX="CXXSHARED= $CXX +z ";;
199 *-*-darwin*) TRYLINKINGWITHCXX="CXXSHARED= $CXX -bundle -undefined suppress -flat_namespace";;
200 *-*-cygwin* | *-*-mingw*)
201 if test "$GCC" = yes; then
202 TRYLINKINGWITHCXX="CXXSHARED= $CXX -shared "
204 if test "cl" = $CXX ; then
205 # Microsoft Visual C++ (MSVC)
206 TRYLINKINGWITHCXX="CXXSHARED= $CXX -nologo -LD"
208 TRYLINKINGWITHCXX="#unknown Windows compiler"
211 *) TRYLINKINGWITHCXX="CXXSHARED= $CXX -shared ";;
214 AC_MSG_RESULT($TRYLINKINGWITHCXX)
215 # CCSHARED are the C *flags* used to create objects to go into a shared
216 # library (module) -- this is only needed for a few systems
217 AC_MSG_CHECKING(CCSHARED)
218 if test -z "$CCSHARED"
221 *-*-hp*) if test "$GCC" = yes;
222 then CCSHARED="-fpic";
225 *-*-linux*) CCSHARED="-fpic";;
226 *-*-freebsd* | *-*-openbsd*) CCSHARED="-fpic";;
227 *-*-netbsd*) CCSHARED="-fPIC";;
228 *-sco-sysv*) CCSHARED="-KPIC -dy -Bdynamic";;
229 *-*-irix6*) case $CC in
230 *gcc*) CCSHARED="-shared";;
235 AC_MSG_RESULT($CCSHARED)
237 # RPATH is the path used to look for shared library files.
238 AC_MSG_CHECKING(RPATH)
242 *-*-solaris*) RPATH='-R. -R$(exec_prefix)/lib';;
243 *-*-irix*) RPATH='-rpath .:$(exec_prefix)/lib';;
244 *-*-linux*) RPATH='-Xlinker -rpath $(exec_prefix)/lib -Xlinker -rpath .';;
248 AC_MSG_RESULT($RPATH)
250 # LINKFORSHARED are the flags passed to the $(CC) command that links
251 # the a few executables -- this is only needed for a few systems
253 AC_MSG_CHECKING(LINKFORSHARED)
254 if test -z "$LINKFORSHARED"
257 *-*-aix*) LINKFORSHARED='-Wl,-bE:$(srcdir)/python.exp -lld';;
259 LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
260 *-*-linux*) LINKFORSHARED="-Xlinker -export-dynamic";;
261 *-*-next*) LINKFORSHARED="-u libsys_s";;
262 *-sco-sysv*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
263 *-*-irix6*) LINKFORSHARED="-all";;
266 AC_MSG_RESULT($LINKFORSHARED)
268 # Set info about shared libraries.
273 AC_SUBST(TRYLINKINGWITHCXX)
274 AC_SUBST(LINKFORSHARED)
277 # This variation is needed on OS-X because there is no (apparent) consistency in shared library naming.
278 # Sometimes .bundle works, but sometimes .so is needed. It depends on the target language
282 *-*-mingw*) PYTHON_SO=.pyd;;
283 *-*-darwin*) PYTHON_SO=.so;;
289 *-*-darwin*) TCL_SO=.dylib;;
295 *-*-darwin*) GUILE_SO=.so;;
301 *-*-darwin*) PHP_SO=.so;;
305 AC_SUBST(MZSCHEME_SO)
312 *-*-darwin*) LUA_SO=.so;;
316 # Optional CFLAGS used to silence compiler warnings on some platforms.
320 *-*-darwin*) PLATFLAGS="-Wno-long-double";;
325 # Check for specific libraries. Used for SWIG examples
326 AC_CHECK_LIB(dl, dlopen) # Dynamic linking for SunOS/Solaris and SYSV
327 AC_CHECK_LIB(dld, shl_load) # Dynamic linking for HP-UX
329 dnl The following three libraries (nsl,inet,socket) are needed on Sequent,
330 dnl and must be checked for in this order since each library depends on the
333 dnl Most SVR4 platforms will need -lsocket and -lnsl. However on SGI IRIX 5,
334 dnl these exist but are broken, so we use AC_SEARCH_LIBS which will only try
335 dnl the library if the function isn't already available without it.
336 AC_SEARCH_LIBS(t_open, nsl) # SVR4
337 AC_SEARCH_LIBS(gethostbyname, inet) # Sequent
338 AC_SEARCH_LIBS(socket, socket) # SVR4 sockets
340 AC_CHECK_LIB(swill, swill_init, [SWIGLIBS="-lswill $LIBS" SWILL="-DSWIG_SWILL"])
344 # check for --with-libm=...
347 AC_ARG_WITH(libm, [ --with-libm=STRING math library], [
348 if test "$withval" != yes
350 else AC_MSG_ERROR([proper usage is --with-libm=STRING])
352 AC_CHECK_LIB(ieee, main, [LIBM="-lieee $LIBM"])
353 AC_CHECK_LIB(crypt,crypt, [LIBCRYPT="-lcrypt"])
356 # check for --with-libc=...
358 AC_ARG_WITH(libc, [ --with-libc=STRING C library], [
359 if test "$withval" != yes
361 else AC_MSG_ERROR([proper usage is --with-libc=STRING])
364 #--------------------------------------------------------------------
365 # Locate the X11 header files and the X11 library archive. Try
366 # the ac_path_x macro first, but if it doesn't find the X stuff
367 # (e.g. because there's no xmkmf program) then check through
368 # a list of possible directories. Under some conditions the
369 # autoconf macro will return an include directory that contains
370 # no include files, so double-check its result just to be safe.
371 #--------------------------------------------------------------------
375 if test "$no_x" = ""; then
376 if test "$x_includes" = ""; then
377 AC_TRY_CPP([#include <X11/XIntrinsic.h>], , not_really_there="yes")
379 if test ! -r $x_includes/X11/Intrinsic.h; then
380 not_really_there="yes"
384 if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then
385 AC_MSG_CHECKING(for X11 header files)
386 XINCLUDES="# no special path needed"
387 AC_TRY_CPP([#include <X11/Intrinsic.h>], , XINCLUDES="")
388 if test -z "$XINCLUDES"; then
389 dirs="/usr/unsupported/include /usr/local/include /usr/X386/include /usr/include/X11R4 /usr/X11R5/include /usr/include/X11R5 /usr/openwin/include /usr/X11/include /usr/sww/include /usr/X11R6/include /usr/include/X11R6"
391 if test -r $i/X11/Intrinsic.h; then
397 AC_MSG_RESULT($XINCLUDES)
399 if test "$x_includes" != ""; then
400 XINCLUDES=-I$x_includes
402 XINCLUDES="# no special path needed"
405 if test -z "$XINCLUDES"; then
406 AC_MSG_RESULT(couldn't find any!)
407 XINCLUDES="# no include files found"
410 if test "$no_x" = yes; then
411 AC_MSG_CHECKING(for X11 libraries)
413 dirs="/usr/unsupported/lib /usr/local/lib /usr/X386/lib /usr/lib/X11R4 /usr/X11R5/lib /usr/lib/X11R5 /usr/X11R6/lib /usr/lib/X11R6 /usr/openwin/lib /usr/X11/lib /usr/sww/X11/lib"
415 if test -r $i/libX11.a -o -r $i/libX11.so -o -r $i/libX11.sl; then
422 if test "$x_libraries" = ""; then
425 XLIBSW="-L$x_libraries -lX11"
428 if test -z "$XLIBSW" ; then
429 AC_CHECK_LIB(Xwindow, XCreateWindow, XLIBSW=-lXwindow)
431 if test -z "$XLIBSW" ; then
432 AC_MSG_RESULT(couldn't find any! Using -lX11.)
439 AC_ARG_WITH(alllang, AS_HELP_STRING([--without-alllang], [Disable all languages]), with_alllang="$withval")
441 #--------------------------------------------------------------------
443 #--------------------------------------------------------------------
449 AC_ARG_WITH(tclconfig, AS_HELP_STRING([--without-tcl], [Disable Tcl])
450 AS_HELP_STRING([--with-tclconfig=path], [Set location of tclConfig.sh]), [with_tclconfig="$withval"], [with_tclconfig=])
452 [ --with-tcl=path Set location of Tcl package],[
453 TCLPACKAGE="$withval"], [TCLPACKAGE=yes])
454 AC_ARG_WITH(tclincl,[ --with-tclincl=path Set location of Tcl include directory],[
455 TCLINCLUDE="$ISYSTEM$withval"], [TCLINCLUDE=])
456 AC_ARG_WITH(tcllib,[ --with-tcllib=path Set location of Tcl library directory],[
457 TCLLIB="-L$withval"], [TCLLIB=])
459 # First, check for "--without-tcl" or "--with-tcl=no".
460 if test x"${TCLPACKAGE}" = xno -o x"${with_alllang}" = xno; then
461 AC_MSG_NOTICE([Disabling Tcl])
463 AC_MSG_CHECKING([for Tcl configuration])
464 # First check to see if --with-tclconfig was specified.
465 if test x"${with_tclconfig}" != x ; then
466 if test -f "${with_tclconfig}/tclConfig.sh" ; then
467 TCLCONFIG=`(cd ${with_tclconfig}; pwd)`
469 AC_MSG_ERROR([${with_tcl} directory doesn't contain tclConfig.sh])
472 # check in a few common install locations
473 if test x"${TCLCONFIG}" = x ; then
474 for i in `ls -d /usr/lib/ 2>/dev/null` \
475 `ls -d -r /usr/lib/tcl*/ 2>/dev/null` \
476 `ls -d /usr/local/lib/ 2>/dev/null` \
477 `ls -d -r /usr/local/lib/tcl*/ 2>/dev/null` ; do
478 if test -f $i"tclConfig.sh" ; then
479 TCLCONFIG=`(cd $i; pwd)`
484 if test x"${TCLCONFIG}" = x ; then
487 AC_MSG_RESULT(found $TCLCONFIG/tclConfig.sh)
488 . $TCLCONFIG/tclConfig.sh
489 if test -z "$TCLINCLUDE"; then
490 TCLINCLUDE=`echo $TCL_INCLUDE_SPEC | sed "s/-I/$ISYSTEM/"`
492 if test -z "$TCLLIB"; then
497 if test -z "$TCLINCLUDE"; then
498 if test "x$TCLPACKAGE" != xyes; then
499 TCLINCLUDE="$ISYSTEM$TCLPACKAGE/include"
503 if test -z "$TCLLIB"; then
504 if test "x$TCLPACKAGE" != xyes; then
505 TCLLIB="-L$TCLPACKAGE/lib -ltcl"
509 AC_MSG_CHECKING(for Tcl header files)
510 if test -z "$TCLINCLUDE"; then
511 AC_TRY_CPP([#include <tcl.h>], , TCLINCLUDE="")
512 if test -z "$TCLINCLUDE"; then
513 dirs="/usr/local/include /usr/include /opt/local/include"
515 if test -r $i/tcl.h; then
517 TCLINCLUDE="$ISYSTEM$i"
522 if test -z "$TCLINCLUDE"; then
523 AC_MSG_RESULT(not found)
526 AC_MSG_RESULT($TCLINCLUDE)
529 AC_MSG_CHECKING(for Tcl library)
530 if test -z "$TCLLIB"; then
531 dirs="/usr/local/lib /usr/lib /opt/local/lib"
533 if test -r $i/libtcl.a; then
539 if test -z "$TCLLIB"; then
540 AC_MSG_RESULT(not found)
543 AC_MSG_RESULT($TCLLIB)
546 # Cygwin (Windows) needs the library for dynamic linking
548 *-*-cygwin* | *-*-mingw*) TCLDYNAMICLINKING="$TCLLIB";;
549 *)TCLDYNAMICLINKING="";;
554 TCLLDSHARED='$(CC) -dynamiclib -undefined suppress -flat_namespace'
555 TCLCXXSHARED='$(CXX) -dynamiclib -undefined suppress -flat_namespace'
558 TCLLDSHARED='$(LDSHARED)'
559 TCLCXXSHARED='$(CXXSHARED)'
567 AC_SUBST(TCLDYNAMICLINKING)
568 AC_SUBST(TCLLDSHARED)
569 AC_SUBST(TCLCXXSHARED)
571 #----------------------------------------------------------------
573 #----------------------------------------------------------------
579 AC_ARG_WITH(python, AS_HELP_STRING([--without-python], [Disable Python])
580 AS_HELP_STRING([--with-python=path], [Set location of Python executable]),[ PYBIN="$withval"], [PYBIN=yes])
582 # First, check for "--without-python" or "--with-python=no".
583 if test x"${PYBIN}" = xno -o x"${with_alllang}" = xno ; then
584 AC_MSG_NOTICE([Disabling Python])
586 # First figure out the name of the Python executable
588 if test "x$PYBIN" = xyes; then
589 AC_CHECK_PROGS(PYTHON, [python python2.8 python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5 python1.4 python])
594 if test -n "$PYTHON"; then
595 AC_MSG_CHECKING(for Python prefix)
596 PYPREFIX=`($PYTHON -c "import sys; print sys.prefix") 2>/dev/null`
597 AC_MSG_RESULT($PYPREFIX)
598 AC_MSG_CHECKING(for Python exec-prefix)
599 PYEPREFIX=`($PYTHON -c "import sys; print sys.exec_prefix") 2>/dev/null`
600 AC_MSG_RESULT($PYEPREFIX)
603 # Note: I could not think of a standard way to get the version string from different versions.
604 # This trick pulls it out of the file location for a standard library file.
606 AC_MSG_CHECKING(for Python version)
608 # Need to do this hack since autoconf replaces __file__ with the name of the configure file
610 PYVERSION=`($PYTHON -c "import string,operator,os.path; print operator.getitem(os.path.split(operator.getitem(os.path.split(string.__$filehack),0)),1)")`
611 AC_MSG_RESULT($PYVERSION)
613 # Find the directory for libraries this is necessary to deal with
614 # platforms that can have apps built for multiple archs: e.g. x86_64
615 AC_MSG_CHECKING(for Python lib dir)
616 PYLIBDIR=`($PYTHON -c "import sys; print sys.lib") 2>/dev/null`
617 if test -z "$PYLIBDIR"; then
618 # older versions don't have sys.lib so the best we can do is assume lib
621 AC_MSG_RESULT($PYLIBDIR)
623 # Set the include directory
625 AC_MSG_CHECKING(for Python header files)
626 if test -r $PYPREFIX/include/$PYVERSION/Python.h; then
627 PYINCLUDE="-I$PYPREFIX/include/$PYVERSION -I$PYEPREFIX/$PYLIBDIR/$PYVERSION/config"
629 if test -z "$PYINCLUDE"; then
630 if test -r $PYPREFIX/include/Py/Python.h; then
631 PYINCLUDE="-I$PYPREFIX/include/Py -I$PYEPREFIX/$PYLIBDIR/python/lib"
634 AC_MSG_RESULT($PYINCLUDE)
636 # Set the library directory blindly. This probably won't work with older versions
637 AC_MSG_CHECKING(for Python library)
638 dirs="$PYVERSION/config $PYVERSION/$PYLIBDIR python/$PYLIBDIR"
640 if test -d $PYEPREFIX/$PYLIBDIR/$i; then
641 PYLIB="$PYEPREFIX/$PYLIBDIR/$i"
645 if test -z "$PYLIB"; then
646 AC_MSG_RESULT(Not found)
648 AC_MSG_RESULT($PYLIB)
651 # Check for really old versions
652 if test -r $PYLIB/libPython.a; then
653 PYLINK="-lModules -lPython -lObjects -lParser"
655 PYLINK="-l$PYVERSION"
659 # Cygwin (Windows) needs the library for dynamic linking
661 *-*-cygwin* | *-*-mingw*) PYTHONDYNAMICLINKING="-L$PYLIB $PYLINK"
662 DEFS="-DUSE_DL_IMPORT $DEFS" PYINCLUDE="$PYINCLUDE"
664 *)PYTHONDYNAMICLINKING="";;
671 AC_SUBST(PYTHONDYNAMICLINKING)
674 #----------------------------------------------------------------
675 # Look for Python 3.x
676 #----------------------------------------------------------------
678 # mostly copy & pasted from "Look for Python" section,
679 # did some trim, fix and rename
685 AC_ARG_WITH(python3, AS_HELP_STRING([--without-python3], [Disable Python 3.x support])
686 AS_HELP_STRING([--with-python3=path], [Set location of Python 3.x executable]),[ PY3BIN="$withval"], [PY3BIN=yes])
688 # First, check for "--without-python3" or "--with-python3=no".
689 if test x"${PY3BIN}" = xno -o x"${with_alllang}" = xno ; then
690 AC_MSG_NOTICE([Disabling Python 3.x support])
692 # First figure out the name of the Python3 executable
694 if test "x$PY3BIN" = xyes; then
695 AC_CHECK_PROGS(PYTHON3, [python3 python3.0 python3.1])
700 # Check for Python 3.x development tools (header files, static library and python3-config)
701 if test "x$PYTHON3" = x; then
702 AC_CHECK_PROGS(PY3CONFIG, [python3-config python3.0-config python3.1-config])
704 AC_CHECK_PROGS(PY3CONFIG, [$PYTHON3-config python3-config python3.0-config python3.1-config])
707 if test -n "$PYTHON3" -a -n "$PY3CONFIG"; then
708 AC_MSG_CHECKING([for Python 3.x prefix])
709 PY3PREFIX=`($PY3CONFIG --prefix) 2>/dev/null`
710 AC_MSG_RESULT($PY3PREFIX)
711 AC_MSG_CHECKING(for Python 3.x exec-prefix)
712 PY3EPREFIX=`($PY3CONFIG --exec-prefix) 2>/dev/null`
713 AC_MSG_RESULT($PY3EPREFIX)
715 # Note: I could not think of a standard way to get the version string from different versions.
716 # This trick pulls it out of the file location for a standard library file.
718 AC_MSG_CHECKING([for Python 3.x version])
720 # Need to do this hack since autoconf replaces __file__ with the name of the configure file
722 PY3VERSION=`($PYTHON3 -c "import string,operator,os.path; print(operator.getitem(os.path.split(operator.getitem(os.path.split(string.__$filehack),0)),1))")`
723 AC_MSG_RESULT($PY3VERSION)
725 # Find the directory for libraries this is necessary to deal with
726 # platforms that can have apps built for multiple archs: e.g. x86_64
727 AC_MSG_CHECKING([for Python 3.x lib dir])
728 PY3LIBDIR=`($PYTHON3 -c "import sys; print(sys.lib)") 2>/dev/null`
729 if test -z "$PY3LIBDIR"; then
730 # some dists don't have sys.lib so the best we can do is assume lib
733 AC_MSG_RESULT($PY3LIBDIR)
735 # Set the include directory
737 AC_MSG_CHECKING([for Python 3.x header files])
738 PY3INCLUDE=`($PY3CONFIG --includes) 2>/dev/null`
739 AC_MSG_RESULT($PY3INCLUDE)
741 # Set the library directory blindly. This probably won't work with older versions
742 AC_MSG_CHECKING([for Python 3.x library])
743 dirs="$PY3VERSION/config $PY3VERSION/$PY3LIBDIR python/$PY3LIBDIR"
745 if test -d $PY3EPREFIX/$PY3LIBDIR/$i; then
746 PY3LIB="$PY3EPREFIX/$PY3LIBDIR/$i"
750 if test -z "$PY3LIB"; then
751 AC_MSG_RESULT([Not found])
753 AC_MSG_RESULT($PY3LIB)
756 PY3LINK="-l$PY3VERSION"
759 # Cygwin (Windows) needs the library for dynamic linking
761 *-*-cygwin* | *-*-mingw*) PYTHON3DYNAMICLINKING="-L$PYLIB $PY3LINK"
762 DEFS="-DUSE_DL_IMPORT $DEFS" PY3INCLUDE="$PY3INCLUDE"
764 *)PYTHON3DYNAMICLINKING="";;
771 AC_SUBST(PYTHON3DYNAMICLINKING)
774 #----------------------------------------------------------------
776 #----------------------------------------------------------------
780 AC_ARG_WITH(perl5, AS_HELP_STRING([--without-perl5], [Disable Perl5])
781 AS_HELP_STRING([--with-perl5=path], [Set location of Perl5 executable]),[ PERLBIN="$withval"], [PERLBIN=yes])
783 # First, check for "--without-perl5" or "--with-perl5=no".
784 if test x"${PERLBIN}" = xno -o x"${with_alllang}" = xno ; then
785 AC_MSG_NOTICE([Disabling Perl5])
789 # First figure out what the name of Perl5 is
791 if test "x$PERLBIN" = xyes; then
792 AC_CHECK_PROGS(PERL, perl perl5.6.1 perl5.6.0 perl5.004 perl5.003 perl5.002 perl5.001 perl5 perl)
798 # This could probably be simplified as for all platforms and all versions of Perl the following apparently should be run to get the compilation options:
799 # perl -MExtUtils::Embed -e ccopts
800 AC_MSG_CHECKING(for Perl5 header files)
801 if test -n "$PERL"; then
802 PERL5DIR=`($PERL -e 'use Config; print $Config{archlib}, "\n";') 2>/dev/null`
803 if test "$PERL5DIR" != ""; then
804 dirs="$PERL5DIR $PERL5DIR/CORE"
807 if test -r $i/perl.h; then
813 if test "$PERL5EXT" = none; then
814 PERL5EXT="$PERL5DIR/CORE"
815 AC_MSG_RESULT(could not locate perl.h...using $PERL5EXT)
818 AC_MSG_CHECKING(for Perl5 library)
819 PERL5LIB=`($PERL -e 'use Config; $_=$Config{libperl}; s/^lib//; s/$Config{_a}$//; print $_, "\n"') 2>/dev/null`
820 if test "$PERL5LIB" = "" ; then
821 AC_MSG_RESULT(not found)
823 AC_MSG_RESULT($PERL5LIB)
825 AC_MSG_CHECKING(for Perl5 compiler options)
826 PERL5CCFLAGS=`($PERL -e 'use Config; print $Config{ccflags}, "\n"' | sed "s/-Wdeclaration-after-statement//" | sed "s/-I/$ISYSTEM/") 2>/dev/null`
827 if test "$PERL5CCFLAGS" = "" ; then
828 AC_MSG_RESULT(not found)
830 AC_MSG_RESULT($PERL5CCFLAGS)
833 AC_MSG_RESULT(unable to determine perl5 configuration)
837 AC_MSG_RESULT(could not figure out how to run perl5)
840 # Cygwin (Windows) needs the library for dynamic linking
842 *-*-cygwin* | *-*-mingw*) PERL5DYNAMICLINKING="-L$PERL5EXT -l$PERL5LIB";;
843 *)PERL5DYNAMICLINKING="";;
849 AC_SUBST(PERL5DYNAMICLINKING)
851 AC_SUBST(PERL5CCFLAGS)
853 #----------------------------------------------------------------
855 #----------------------------------------------------------------
858 OCTAVEDYNAMICLINKING=
861 AC_ARG_WITH(octave, AS_HELP_STRING([--without-octave], [Disable Octave])
862 AS_HELP_STRING([--with-octave=path], [Set location of Octave executable]),[OCTAVEBIN="$withval"], [OCTAVEBIN=yes])
864 # First, check for "--without-octave" or "--with-octave=no".
865 if test x"${OCTAVEBIN}" = xno -o x"${with_alllang}" = xno ; then
866 AC_MSG_NOTICE([Disabling Octave])
870 # First figure out what the name of Octave is
872 if test "x$OCTAVEBIN" = xyes; then
873 AC_CHECK_PROGS(OCTAVE, octave)
879 AC_MSG_CHECKING(for Octave header files)
880 if test -n "$OCTAVE"; then
881 OCTAVEDIR="/usr/include"
882 if test "$OCTAVEDIR" != ""; then
886 if test -r $i/octave/oct.h; then
890 if test -r $i/octave/octave/oct.h; then
891 OCTAVEEXT="$i/octave"
895 if test "$OCTAVEEXT" = "" ; then
896 AC_MSG_RESULT(not found)
898 AC_MSG_RESULT($OCTAVEEXT)
901 AC_MSG_CHECKING(for Octave compiler options)
903 AC_MSG_RESULT($OCTAVECCFLAGS)
906 AC_MSG_RESULT(could not figure out how to run octave)
914 AC_SUBST(OCTAVEDYNAMICLINKING)
916 AC_SUBST(OCTAVECCFLAGS)
918 #----------------------------------------------------------------
920 #----------------------------------------------------------------
922 AC_ARG_WITH(java, AS_HELP_STRING([--without-java], [Disable Java])
923 AS_HELP_STRING([--with-java=path], [Set location of java executable]),[JAVABIN="$withval"], [JAVABIN=yes])
924 AC_ARG_WITH(javac, [ --with-javac=path Set location of javac executable],[JAVACBIN="$withval"], [JAVACBIN=])
926 # First, check for "--without-java" or "--with-java=no".
927 if test x"${JAVABIN}" = xno -o x"${with_alllang}" = xno ; then
928 AC_MSG_NOTICE([Disabling Java])
932 if test "x$JAVABIN" = xyes; then
933 AC_CHECK_PROGS(JAVA, java kaffe guavac)
938 if test -z "$JAVACBIN"; then
939 AC_CHECK_PROGS(JAVAC, javac)
944 AC_MSG_CHECKING(for java include file jni.h)
945 AC_ARG_WITH(javaincl, [ --with-javaincl=path Set location of Java include directory], [JAVAINCDIR="$withval"], [JAVAINCDIR=])
947 if test -z "$JAVAINCDIR" ; then
948 JAVAINCDIR="/usr/j2sdk*/include /usr/local/j2sdk*/include /usr/jdk*/include /usr/local/jdk*/include /opt/j2sdk*/include /opt/jdk*/include /usr/java/include /usr/java/j2sdk*/include /usr/java/jdk*/include /usr/local/java/include /opt/java/include /usr/include/java /usr/local/include/java /usr/lib/java/include /usr/lib/jvm/java*/include /usr/include/kaffe /usr/local/include/kaffe /usr/include"
950 # Add in default installation directory on Windows for Cygwin
952 *-*-cygwin* | *-*-mingw*) JAVAINCDIR="c:/Program*Files/Java/jdk*/include d:/Program*Files/Java/jdk*/include c:/j2sdk*/include d:/j2sdk*/include c:/jdk*/include d:/jdk*/include $JAVAINCDIR";;
953 *-*-darwin*) JAVAINCDIR="/System/Library/Frameworks/JavaVM.framework/Headers $JAVAINCDIR";;
959 for d in $JAVAINCDIR ; do
960 if test -r "$d/jni.h" ; then
968 if test "$JAVAINC" = "" ; then
969 AC_MSG_RESULT(not found)
971 # now look for <arch>/jni_md.h
972 AC_MSG_CHECKING(for java include file jni_md.h)
973 JAVAMDDIR=`find "$JAVAINCDIR" -follow -name jni_md.h -print`
974 if test "$JAVAMDDIR" = "" ; then
975 AC_MSG_RESULT(not found)
977 JAVAMDDIR=`dirname "$JAVAMDDIR" | tail -1`
978 JAVAINC="${JAVAINC} -I\"$JAVAMDDIR\""
979 AC_MSG_RESULT($JAVAMDDIR)
983 # java.exe on Cygwin requires the Windows standard (Pascal) calling convention as it is a normal Windows executable and not a Cygwin built executable
985 *-*-cygwin* | *-*-mingw*)
986 if test "$GCC" = yes; then
987 JAVADYNAMICLINKING=" -mno-cygwin -mthreads -Wl,--add-stdcall-alias"
988 JAVACFLAGS="-mno-cygwin -mthreads"
990 JAVADYNAMICLINKING=""
994 JAVADYNAMICLINKING="-dynamiclib -framework JavaVM"
998 JAVADYNAMICLINKING=""
1003 # Java on Windows platforms including Cygwin doesn't use libname.dll, rather name.dll when loading dlls
1005 *-*-cygwin* | *-*-mingw*) JAVALIBRARYPREFIX="";;
1006 *)JAVALIBRARYPREFIX="lib";;
1009 # Java on Mac OS X tweaks
1013 JAVALDSHARED='$(CC)'
1014 JAVACXXSHARED='$(CXX)'
1018 JAVALDSHARED='$(LDSHARED)'
1019 JAVACXXSHARED='$(CXXSHARED)'
1027 AC_SUBST(JAVADYNAMICLINKING)
1028 AC_SUBST(JAVALIBRARYPREFIX)
1030 AC_SUBST(JAVALDSHARED)
1031 AC_SUBST(JAVACXXSHARED)
1032 AC_SUBST(JAVACFLAGS)
1034 #----------------------------------------------------------------
1036 #----------------------------------------------------------------
1038 AC_ARG_WITH(gcj, AS_HELP_STRING([--without-gcj], [Disable GCJ])
1039 AS_HELP_STRING([--with-gcj=path], [Set location of gcj executable]),[GCJBIN="$withval"], [GCJBIN=yes])
1040 AC_ARG_WITH(gcjh, [ --with-gcjh=path Set location of gcjh executable],[GCJHBIN="$withval"], [GCJHBIN=])
1042 # First, check for "--without-gcj" or "--with-gcj=no".
1043 if test x"${GCJBIN}" = xno -o x"${with_alllang}" = xno ; then
1044 AC_MSG_NOTICE([Disabling GCJ])
1046 if test "x$GCJBIN" = xyes; then
1047 AC_CHECK_PROGS(GCJ, gcj)
1052 if test -z "$GCJCBIN"; then
1053 AC_CHECK_PROGS(GCJH, gcjh)
1062 #----------------------------------------------------------------
1064 #----------------------------------------------------------------
1073 AC_ARG_WITH(guile-config,AS_HELP_STRING([--without-guile], [Disable Guile])
1074 AS_HELP_STRING([--with-guile-config=path], [Set location of guile-config]),[ GUILE_CONFIG="$withval"], [GUILE_CONFIG=])
1075 AC_ARG_WITH(guilepackage, AS_HELP_STRING([--with-guile-prefix=path], [Set location of Guile tree]),[
1076 GUILEPACKAGE="$withval"])
1077 AC_ARG_WITH(guile,[ --with-guile=path Set location of Guile executable],[
1078 GUILE="$withval"], [GUILE=yes])
1079 AC_ARG_WITH(guileincl,[ --with-guileincl=path Set location of Guile include directory],[
1080 GUILEINCLUDE="$withval"])
1081 AC_ARG_WITH(guilelib,[ --with-guilelib=path Set location of Guile library directory],[
1082 GUILELIB="$withval"])
1084 # First, check for "--without-guile" or "--with-guile=no".
1085 if test x"${GUILE}" = xno -o x"${with_alllang}" = xno ; then
1086 AC_MSG_NOTICE([Disabling Guile])
1089 if test -z "$GUILE_CONFIG" ; then
1090 AC_PATH_PROG(GUILE_CONFIG, guile-config)
1093 if test -n "$GUILE_CONFIG" ; then
1094 GUILEPACKAGE="`$GUILE_CONFIG info prefix`"
1095 GUILEINCLUDE="`$GUILE_CONFIG info includedir`"
1096 GUILELIB="`$GUILE_CONFIG info libdir`"
1097 GUILE="`$GUILE_CONFIG info bindir`/guile"
1098 GUILELINK="`$GUILE_CONFIG link`"
1099 GUILEPKGDATADIR="`$GUILE_CONFIG info pkgdatadir`"
1102 if test -z "$GUILE" -o "x$GUILE" = xyes; then
1103 if test -n "$GUILEPACKAGE"; then
1104 GUILE="$GUILEPACKAGE/bin/guile"
1110 if test -z "$GUILEINCLUDE"; then
1111 if test -n "$GUILEPACKAGE"; then
1112 GUILEINCLUDE="$GUILEPACKAGE/include"
1116 if test -z "$GUILELIB"; then
1117 if test -n "$GUILEPACKAGE"; then
1118 GUILELIB="$GUILEPACKAGE/lib"
1123 AC_MSG_CHECKING(for Guile header files)
1125 dirs="$GUILEINCLUDE"
1127 if test -r $i/guile/gh.h; then
1129 GUILEINCLUDE="$ISYSTEM$i"
1133 if test -z "$GUILEINCLUDE"; then
1134 AC_MSG_RESULT(not found)
1137 AC_MSG_CHECKING(for Guile library)
1140 if test -r $i/libguile.so; then
1146 if test -z "$GUILELIB"; then
1147 AC_MSG_RESULT(not found)
1150 if test -z "$GUILELINK"; then
1151 GUILELINK="-L$GUILELIB -lguile"
1154 guilesafe_CFLAGS=$CFLAGS
1155 guilesafe_LIBS=$LIBS
1156 # Filter out "-ansi -pedantic" because Guile header files will not compile with these flags.
1157 # (The flags -ansi -pedantic are automatically added by ac_compile_warnings.m4)
1158 CFLAGS="`echo $CFLAGS | sed 's/-ansi//g;s/-pedantic//g;'` $GUILEINCLUDE"
1159 LIBS="$LIBS $GUILELINK"
1161 AC_MSG_CHECKING(whether Guile's gh_ API works)
1162 AC_LINK_IFELSE([#include <guile/gh.h>
1163 int main() { SCM s; return gh_scm2int(s); }], GUILE_GH_INTERFACE=1, )
1164 if test -n "$GUILE_GH_INTERFACE" ; then
1169 AC_MSG_CHECKING(whether Guile's SCM_ API works)
1170 AC_LINK_IFELSE([#include <libguile.h>
1171 int main() { SCM s; scm_slot_exists_p(SCM_BOOL_F, SCM_BOOL_F); return SCM_STRING_LENGTH(s); }], GUILE_SCM_INTERFACE=1, )
1172 if test -n "$GUILE_SCM_INTERFACE" ; then
1177 CFLAGS=$guilesafe_CFLAGS
1178 LIBS=$guilesafe_LIBS
1182 AC_SUBST(GUILEINCLUDE)
1185 AC_SUBST(GUILE_GH_INTERFACE)
1186 AC_SUBST(GUILE_SCM_INTERFACE)
1188 #----------------------------------------------------------------
1190 #----------------------------------------------------------------
1192 AC_ARG_WITH(mzscheme, AS_HELP_STRING([--without-mzscheme], [Disable MzScheme])
1193 AS_HELP_STRING([--with-mzscheme=path], [Set location of MzScheme executable]),[ MZSCHEMEBIN="$withval"], [MZSCHEMEBIN=yes])
1194 AC_ARG_WITH(mzc, AS_HELP_STRING([--with-mzc=path], [Set location of MzScheme's mzc]), [ MZCBIN="$withval"], [MZCBIN=])
1196 # First, check for "--without-mzscheme" or "--with-mzscheme=no".
1197 if test x"${MZSCHEMEBIN}" = xno -o x"${with_alllang}" = xno ; then
1198 AC_MSG_NOTICE([Disabling MzScheme])
1201 if test "x$MZSCHEMEBIN" = xyes; then
1202 AC_PATH_PROG(MZSCHEME, mzscheme)
1204 MZSCHEME="$MZSCHEMEBIN"
1207 if test -z "$MZCBIN"; then
1208 AC_PATH_PROG(MZC, mzc)
1211 if test -n "$MZSCHEME"; then
1212 AC_MSG_CHECKING(for MzScheme dynext object)
1213 MZDYNOBJ=`$MZSCHEME --eval '(begin (require dynext/link) (with-handlers (((lambda args #t) (lambda args #f))) (for-each (lambda (x) (printf "~a" x)) (expand-for-link-variant (current-standard-link-libraries)))))' 2>/dev/null`
1214 if test -f "$MZDYNOBJ"; then
1215 MZDYNOBJ="$MZDYNOBJ"
1217 # older versions (3.72 approx and earlier)
1218 MZDYNOBJ=`$MZSCHEME --mute-banner --version --eval '(begin (require (lib "link.ss" "dynext")) (with-handlers (((lambda args #t) (lambda args #f))) (for-each (lambda (x) (display x) (display " ")) ((current-make-standard-link-libraries)))) (with-handlers (((lambda args #t) (lambda args #f))) (for-each (lambda (x) (display x)) (expand-for-link-variant (current-standard-link-libraries)))))' 2>/dev/null`
1220 if test -f "$MZDYNOBJ"; then
1221 AC_MSG_RESULT($MZDYNOBJ)
1223 AC_MSG_RESULT(not found)
1230 #----------------------------------------------------------------
1232 #----------------------------------------------------------------
1236 AC_ARG_WITH(ruby, AS_HELP_STRING([--without-ruby], [Disable Ruby])
1237 AS_HELP_STRING([--with-ruby=path], [Set location of Ruby executable]),[ RUBYBIN="$withval"], [RUBYBIN=yes])
1239 # First, check for "--without-ruby" or "--with-ruby=no".
1240 if test x"${RUBYBIN}" = xno -o x"${with_alllang}" = xno ; then
1241 AC_MSG_NOTICE([Disabling Ruby])
1245 # First figure out what the name of Ruby is
1247 if test "x$RUBYBIN" = xyes; then
1248 AC_CHECK_PROGS(RUBY, ruby)
1253 AC_MSG_CHECKING(for Ruby header files)
1254 if test -n "$RUBY"; then
1255 RUBYDIR=`($RUBY -rmkmf -e 'print Config::CONFIG[["archdir"]] || $archdir') 2>/dev/null`
1256 if test x"$RUBYDIR" != x""; then
1260 if test -r $i/ruby.h; then
1266 if test "$RUBYINCLUDE" = none; then
1267 RUBYINCLUDE="-I$RUBYDIR"
1268 AC_MSG_RESULT(could not locate ruby.h...using $RUBYINCLUDE)
1271 # Find library and path for linking.
1272 AC_MSG_CHECKING(for Ruby library)
1274 rb_libdir=`($RUBY -rrbconfig -e 'print Config::CONFIG[["libdir"]]') 2>/dev/null`
1275 rb_bindir=`($RUBY -rrbconfig -e 'print Config::CONFIG[["bindir"]]') 2>/dev/null`
1276 dirs="$dirs $rb_libdir $rb_bindir"
1278 rb_libruby=`($RUBY -rrbconfig -e 'print Config::CONFIG[["LIBRUBY_A"]]') 2>/dev/null`
1279 RUBYLINK=`($RUBY -rrbconfig -e '
1281 if c.has_key? "LIBRUBYARG_STATIC" # 1.8.x
1282 if c[["LIBRUBY"]] == c[["LIBRUBY_A"]]
1283 link = c[["LIBRUBYARG_STATIC"]]
1285 link = c[["LIBRUBYARG_SHARED"]]
1288 link = "-l" + c[["RUBY_INSTALL_NAME"]]
1291 # Get the target Ruby was built for
1292 target = c[["target"]]
1294 if target == "i386-pc-mswin32"
1295 # Need to change msvcrt-ruby*.lib to -lmsvcrt-ruby*
1296 ext = File.extname(link)
1297 # Get index that counts backwards from end of string
1298 index = -1 - ext.size
1299 # Strip off the extension
1300 link = link.slice(0..index)
1306 if test "$rb_libruby" != ""; then
1308 if (test -r $i/$rb_libruby;) then
1314 if test "$RUBYLIB" = ""; then
1316 AC_MSG_RESULT(not found... using $RUBYDIR)
1318 AC_MSG_RESULT($RUBYLINK in $RUBYLIB)
1321 AC_MSG_RESULT(unable to determine ruby configuration)
1322 RUBYINCLUDE="-I$RUBYDIR"
1327 *-*-mingw*) ;; # do nothing, the default windows libraries are already included
1328 *) RUBYLINK="$RUBYLINK `($RUBY -rrbconfig -e 'print Config::CONFIG[["LIBS"]]') 2>/dev/null`";;
1331 RUBYCCDLFLAGS=`($RUBY -rrbconfig -e 'print Config::CONFIG[["CCDLFLAGS"]]') 2>/dev/null`
1333 AC_MSG_RESULT(could not figure out how to run ruby)
1334 RUBYINCLUDE="-I/usr/local/lib/ruby/1.4/arch"
1335 RUBYLIB="/usr/local/lib/ruby/1.4/arch"
1336 RUBYLINK="-lruby -lm"
1340 *-*-cygwin* | *-*-mingw*) RUBYDYNAMICLINKING="-L$RUBYLIB $RUBYLINK";;
1341 *) RUBYDYNAMICLINKING="";;
1345 AC_SUBST(RUBYINCLUDE)
1348 AC_SUBST(RUBYCCDLFLAGS)
1349 AC_SUBST(RUBYDYNAMICLINKING)
1351 #-------------------------------------------------------------------------
1353 #-------------------------------------------------------------------------
1357 AC_ARG_WITH(php, AS_HELP_STRING([--without-php], [Disable PHP])
1358 AS_HELP_STRING([--with-php=path], [Set location of PHP executable]),[ PHPBIN="$withval"], [PHPBIN=yes])
1360 # First, check for "--without-php" or "--with-php=no".
1361 if test x"${PHPBIN}" = xno -o x"${with_alllang}" = xno ; then
1362 AC_MSG_NOTICE([Disabling PHP])
1366 if test "x$PHPBIN" = xyes; then
1367 AC_CHECK_PROGS(PHP, [php5 php])
1372 AC_MSG_CHECKING(for PHP header files)
1373 dnl /usr/bin/php5 -> /usr/bin/php-config5
1376 PHPCONFIG=`echo "$PHP"|sed 's/5$/-config5/'` ;;
1378 PHPCONFIG=$PHP-config ;;
1380 php_version=`$PHPCONFIG --version 2>/dev/null`
1381 case $php_version in
1383 PHPINC=`$PHPCONFIG --includes 2>/dev/null`
1384 if test -n "$PHPINC"; then
1385 AC_MSG_RESULT($PHPINC)
1387 AC_MSG_RESULT(not found)
1391 AC_MSG_RESULT([found PHP $version, but only PHP 5 is supported]) ;;
1397 #----------------------------------------------------------------
1399 #----------------------------------------------------------------
1401 AC_ARG_WITH(ocaml, AS_HELP_STRING([--without-ocaml], [Disable OCaml])
1402 AS_HELP_STRING([--with-ocaml=path], [Set location of ocaml executable]),[ OCAMLBIN="$withval"], [OCAMLBIN=yes])
1403 AC_ARG_WITH(ocamlc,[ --with-ocamlc=path Set location of ocamlc executable],[ OCAMLC="$withval"], [OCAMLC=])
1404 AC_ARG_WITH(ocamldlgen,[ --with-ocamldlgen=path Set location of ocamldlgen],[ OCAMLDLGEN="$withval" ], [OCAMLDLGEN=])
1405 AC_ARG_WITH(ocamlfind,[ --with-ocamlfind=path Set location of ocamlfind],[OCAMLFIND="$withval"],[OCAMLFIND=])
1406 AC_ARG_WITH(ocamlmktop,[ --with-ocamlmktop=path Set location of ocamlmktop executable],[ OCAMLMKTOP="$withval"], [OCAMLMKTOP=])
1408 # First, check for "--without-ocaml" or "--with-ocaml=no".
1409 if test x"${OCAMLBIN}" = xno -o x"${with_alllang}" = xno ; then
1410 AC_MSG_NOTICE([Disabling OCaml])
1414 AC_MSG_CHECKING(for Ocaml DL load generator)
1415 if test -z "$OCAMLDLGEN"; then
1416 AC_CHECK_PROGS(OCAMLDLGEN, ocamldlgen, :)
1418 OCAMLDLGEN="$OCAMLDLGEN"
1421 AC_MSG_CHECKING(for Ocaml package tool)
1422 if test -z "$OCAMLFIND"; then
1423 AC_CHECK_PROGS(OCAMLFIND, ocamlfind, :)
1425 OCAMLFIND="$OCAMLFIND"
1428 AC_MSG_CHECKING(for Ocaml compiler)
1429 if test -z "$OCAMLC"; then
1430 AC_CHECK_PROGS(OCAMLC, ocamlc, :)
1435 AC_MSG_CHECKING(for Ocaml interpreter)
1436 if test "x$OCAMLBIN" = xyes; then
1437 AC_CHECK_PROGS(OCAMLBIN, ocaml, :)
1439 OCAMLBIN="$OCAMLBIN"
1442 AC_MSG_CHECKING(for Ocaml toplevel creator)
1443 if test -z "$OCAMLMKTOP"; then
1444 AC_CHECK_PROGS(OCAMLMKTOP, ocamlmktop, :)
1446 OCAMLMKTOP="$OCAMLMKTOP"
1450 if test "$OCAMLC" != ":" ; then
1451 AC_MSG_CHECKING(for Ocaml header files)
1452 dirs="/usr/lib/ocaml/caml /usr/local/lib/ocaml/caml"
1453 dir="`$OCAMLC -where 2>/dev/null`"
1454 if test "$dir"; then
1455 dirs="$dir/caml $dirs"
1458 if test -r $i/mlvalues.h; then
1461 OCAMLINC="-I$OCAMLEXT"
1465 if test -z "$OCAMLINC"; then
1466 AC_MSG_RESULT(not found)
1469 AC_MSG_CHECKING(for Ocaml version 3.08.2 or higher)
1470 OCAMLVER=`$OCAMLC -version | sed -e 's/.*version //g'`
1471 AC_COMPARE_VERSION([$OCAMLVER],[3.08.2],[:],[:],[OCAMLLOC=_loc])
1472 AC_MSG_RESULT($OCAMLVER)
1474 fi # Disabling ocaml
1490 AC_SUBST(OCAMLDLGEN)
1492 AC_SUBST(OCAMLMKTOP)
1494 #----------------------------------------------------------------
1496 #----------------------------------------------------------------
1498 # Identify the name of the Pike executable
1499 # Priority: configure option, automatic search
1501 AC_ARG_WITH(pike, AS_HELP_STRING([--without-pike], [Disable Pike])
1502 AS_HELP_STRING([--with-pike=path], [Set location of Pike executable]),[PIKEBIN="$withval"], [PIKEBIN=yes])
1504 # First, check for "--without-pike" or "--with-pike=no".
1505 if test x"${PIKEBIN}" = xno -o x"${with_alllang}" = xno ; then
1506 AC_MSG_NOTICE([Disabling Pike])
1510 if test "x$PIKEBIN" = xyes; then
1511 AC_CHECK_PROGS(PIKE, pike pike7.6 pike7.4 pike7.2)
1517 # Check for pike-config
1518 # Priority: configure option, guessed from $PIKE, search from list
1519 AC_ARG_WITH(pike-config, AS_HELP_STRING([--with-pike-config=path],
1520 [Set location of pike-config script]),
1521 [PIKECONFIG="$withval"], [PIKECONFIG=""])
1523 if test -z "$PIKECONFIG" -a -n "$PIKE"; then
1524 AC_CHECK_PROGS(PIKECONFIG, $PIKE-config pike-config \
1525 pike7.6-config pike7.4-config pike7.2-config)
1528 # Check for a --with-pikeincl option to configure
1529 # Priority: configure option, info from $PIKECONFIG, guessed by pike script
1530 AC_ARG_WITH(pikeincl, AS_HELP_STRING([--with-pikeincl=path],
1531 [Set location of Pike include directory]),
1532 [PIKEINCLUDE="-I$withval"], [PIKEINCLUDE=])
1534 if test -n "$PIKE"; then
1535 AC_MSG_CHECKING([for Pike header files])
1536 if test -z "$PIKEINCLUDE" -a -n "$PIKECONFIG"; then
1537 PIKEINCLUDE=`$PIKECONFIG --cflags`
1539 if test -z "$PIKEINCLUDE" -a -n "$PIKE"; then
1540 PIKEPATH=`which $PIKE`
1541 PIKEINCLUDE=`$PIKE Tools/check-include-path.pike $PIKEPATH`
1542 PIKEINCLUDE="-I$PIKEINCLUDE"
1545 if test -z "$PIKEINCLUDE"; then
1546 AC_MSG_RESULT(not found)
1548 AC_MSG_RESULT($PIKEINCLUDE)
1553 AC_SUBST(PIKEINCLUDE)
1554 AC_SUBST(PIKECCDLFLAGS) dnl XXX: where is this used/defined?
1555 AC_SUBST(PIKEDYNAMICLINKING) dnl XXX: where is this used/defined?
1557 #----------------------------------------------------------------
1559 #----------------------------------------------------------------
1568 AC_ARG_WITH(chicken, AS_HELP_STRING([--without-chicken], [Disable CHICKEN])
1569 AS_HELP_STRING([--with-chicken=path], [Set location of CHICKEN executable]),[ CHICKENBIN="$withval"], [CHICKENBIN=yes])
1571 # First, check for "--without-chicken" or "--with-chicken=no".
1572 if test x"${CHICKENBIN}" = xno -o x"${with_alllang}" = xno ; then
1573 AC_MSG_NOTICE([Disabling CHICKEN])
1576 if test "x$CHICKENBIN" = xyes; then
1577 AC_CHECK_PROGS(CHICKEN, chicken)
1579 CHICKEN="$CHICKENBIN"
1582 AC_ARG_WITH(chickencsc,[ --with-chickencsc=path Set location of csc executable],[ CHICKEN_CSC="$withval"], [CHICKEN_CSC=])
1584 if test -z "$CHICKEN_CSC"; then
1585 AC_CHECK_PROGS(CHICKEN_CSC, csc)
1586 # Both the Microsoft C# compiler and chicken have an executable called csc, so check that this csc is really the chicken one
1587 if test -n "$CHICKEN_CSC" ; then
1588 AC_MSG_CHECKING(whether csc is the chicken compiler)
1589 $CHICKEN_CSC -version 2>/dev/null | grep "chicken" > /dev/null || CHICKEN_CSC=""
1590 if test -z "$CHICKEN_CSC"; then
1598 AC_ARG_WITH(chickencsi,[ --with-chickencsi=path Set location of csi executable],[ CHICKEN_CSI="$withval"], [CHICKEN_CSI=])
1600 if test -z "$CHICKEN_CSI"; then
1601 AC_CHECK_PROGS(CHICKEN_CSI, csi)
1604 if test -n "$CHICKEN_CSC" ; then
1606 AC_ARG_WITH(chickenopts,[ --with-chickenopts=args Set compiler options for static CHICKEN generated code],[
1607 CHICKENOPTS="$withval"], [CHICKENOPTS=])
1608 AC_ARG_WITH(chickensharedlib,[ --with-chickensharedlib=args Set linker options for shared CHICKEN generated code],[
1609 CHICKENSHAREDLIB="$withval"], [CHICKENSHAREDLIB=])
1610 AC_ARG_WITH(chickenlib,[ --with-chickenlib=args Set linker options for static CHICKEN generated code],[
1611 CHICKENLIB="$withval"], [CHICKENLIB=])
1613 AC_MSG_CHECKING(for compiler options for static CHICKEN generated code)
1614 if test -z "$CHICKENOPTS"; then
1615 CHICKENOPTS="`$CHICKEN_CSC -cflags`"
1617 CHICKENOPTS="`$CHICKEN_CSC -cflags` $CHICKENOPTS"
1619 if test -z "$CHICKENOPTS"; then
1620 AC_MSG_RESULT(not found)
1622 AC_MSG_RESULT($CHICKENOPTS)
1625 AC_MSG_CHECKING(for linker options for shared CHICKEN generated code)
1626 if test -z "$CHICKENSHAREDLIB"; then
1627 CHICKENSHAREDLIB="`$CHICKEN_CSC -shared -libs`"
1629 CHICKENSHAREDLIB="`$CHICKEN_CSC -shared -libs` $CHICKENSHAREDLIB"
1631 if test -z "$CHICKENSHAREDLIB"; then
1632 AC_MSG_RESULT(not found)
1634 AC_MSG_RESULT($CHICKENSHAREDLIB)
1637 AC_MSG_CHECKING(for linker options for static CHICKEN generated code)
1638 if test -z "$CHICKENLIB"; then
1639 CHICKENLIB="`$CHICKEN_CSC -libs`"
1641 CHICKENLIB="`$CHICKEN_CSC -libs` $CHICKENLIB"
1643 if test -z "$CHICKENLIB"; then
1644 AC_MSG_RESULT(not found)
1646 AC_MSG_RESULT($CHICKENLIB)
1649 fi # have CHICKEN_CONFIG
1650 fi # Check for --without-chicken
1653 AC_SUBST(CHICKEN_CSC)
1654 AC_SUBST(CHICKEN_CSI)
1655 AC_SUBST(CHICKENOPTS)
1656 AC_SUBST(CHICKENLIB)
1657 AC_SUBST(CHICKENSHAREDLIB)
1659 #----------------------------------------------------------------
1661 #----------------------------------------------------------------
1663 AC_ARG_WITH(csharp, AS_HELP_STRING([--without-csharp], [Disable CSharp]), [with_csharp="$withval"], [with_csharp=yes])
1664 AC_ARG_WITH(cil-interpreter, [ --with-cil-interpreter=path Set location of CIL interpreter for CSharp],[CSHARPBIN="$withval"], [CSHARPBIN=])
1665 AC_ARG_WITH(csharp-compiler, [ --with-csharp-compiler=path Set location of CSharp compiler],[CSHARPCOMPILERBIN="$withval"], [CSHARPCOMPILERBIN=])
1667 # First, check for "--without-csharp" or "--with-csharp=no".
1668 if test x"${with_csharp}" = xno -o x"${with_alllang}" = xno ; then
1669 AC_MSG_NOTICE([Disabling CSharp])
1673 if test -z "$CSHARPCOMPILERBIN" ; then
1675 *-*-cygwin* | *-*-mingw*)
1676 # prefer Mono gmcs (.NET 2.0) over mcs (.NET 1.1) - note mcs-1.2.3 has major pinvoke bug
1677 AC_CHECK_PROGS(CSHARPCOMPILER, csc gmcs mcs cscc)
1678 if test -n "$CSHARPCOMPILER" && test "$CSHARPCOMPILER" = "csc" ; then
1679 AC_MSG_CHECKING(whether csc is the Microsoft CSharp compiler)
1680 csc 2>/dev/null | grep "C#" > /dev/null || CSHARPCOMPILER=""
1681 if test -z "$CSHARPCOMPILER" ; then
1683 AC_CHECK_PROGS(CSHARPCOMPILER, gmcs mcs cscc)
1689 *)AC_CHECK_PROGS(CSHARPCOMPILER, gmcs mcs cscc);;
1692 CSHARPCOMPILER="$CSHARPCOMPILERBIN"
1695 CSHARPPATHSEPARATOR="/"
1696 CSHARPCYGPATH_W=echo
1697 if test -z "$CSHARPBIN" ; then
1698 CSHARPCILINTERPRETER=""
1699 if test "cscc" = "$CSHARPCOMPILER" ; then
1700 AC_CHECK_PROGS(CSHARPCILINTERPRETER, ilrun)
1702 if test "mcs" = "$CSHARPCOMPILER"; then
1703 # Check that mcs is the C# compiler and not the Unix mcs utility by examining the output of 'mcs --version'
1704 # The Mono compiler should emit: Mono C# compiler version a.b.c.d
1705 csharp_version_raw=`(mcs --version) 2>/dev/null`
1706 csharp_version_searched=`(mcs --version | sed -e "/C#/b" -e "/Mono/b" -e d) 2>/dev/null` # return string if contains 'Mono' or 'C#'
1708 if test -n "$csharp_version_raw" ; then
1709 if test "$csharp_version_raw" = "$csharp_version_searched" ; then
1710 CSHARPCOMPILER="mcs"
1713 if test "mcs" != "$CSHARPCOMPILER" ; then
1714 echo "mcs is not a working Mono C# compiler"
1717 if test "mcs" = "$CSHARPCOMPILER" || test "gmcs" = "$CSHARPCOMPILER"; then
1718 AC_CHECK_PROGS(CSHARPCILINTERPRETER, mono) # Mono JIT
1720 if test "csc" = "$CSHARPCOMPILER"; then
1721 CSHARPPATHSEPARATOR="\\\\"
1722 CSHARPCYGPATH_W='cygpath -w'
1727 CSHARPCILINTERPRETER="$CSHARPBIN"
1730 # Cygwin requires the Windows standard (Pascal) calling convention as it is a Windows executable and not a Cygwin built executable
1732 *-*-cygwin* | *-*-mingw*)
1733 if test "$GCC" = yes; then
1734 CSHARPDYNAMICLINKING=" -mno-cygwin -mthreads -Wl,--add-stdcall-alias"
1735 CSHARPCFLAGS="-mno-cygwin -mthreads"
1737 CSHARPDYNAMICLINKING=""
1741 CSHARPDYNAMICLINKING=""
1746 # CSharp on Windows platforms including Cygwin doesn't use libname.dll, rather name.dll when loading dlls
1748 *-*-cygwin* | *-*-mingw*) CSHARPLIBRARYPREFIX="";;
1749 *)CSHARPLIBRARYPREFIX="lib";;
1752 # C#/Mono on Mac OS X tweaks
1763 AC_SUBST(CSHARPCILINTERPRETER)
1764 AC_SUBST(CSHARPPATHSEPARATOR)
1765 AC_SUBST(CSHARPCYGPATH_W)
1766 AC_SUBST(CSHARPCOMPILER)
1767 AC_SUBST(CSHARPDYNAMICLINKING)
1768 AC_SUBST(CSHARPLIBRARYPREFIX) # Is this going to be used?
1769 AC_SUBST(CSHARPCFLAGS)
1772 #----------------------------------------------------------------
1774 #----------------------------------------------------------------
1782 # note: if LUABIN is empty then lua tests will not be done
1783 # LUABIN will be cleared if certain dependencies cannot be found
1785 AC_ARG_WITH(lua, AS_HELP_STRING([--without-lua], [Disable Lua])
1786 AS_HELP_STRING([--with-lua=path], [Set location of Lua executable]),[ LUABIN="$withval"], [LUABIN=yes])
1787 AC_ARG_WITH(luaincl,[ --with-luaincl=path Set location of Lua include directory],[
1788 LUAINCLUDE="$withval"], [LUAINCLUDE=])
1789 AC_ARG_WITH(lualib,[ --with-lualib=path Set location of Lua library directory],[
1790 LUALIB="$withval"], [LUALIB=])
1792 # First, check for "--without-lua" or "--with-lua=no".
1793 if test x"${LUABIN}" = xno -o x"${with_alllang}" = xno ; then
1794 AC_MSG_NOTICE([Disabling Lua])
1798 if test "x$LUABIN" = xyes; then
1799 AC_PATH_PROG(LUABIN, lua)
1802 # check version: we need Lua 5.x
1803 if test "$LUABIN"; then
1804 AC_MSG_CHECKING(Lua version)
1806 LUAV5=`$LUABIN -e 'if string.sub(_VERSION,5,5)=="5" then print "1" end'`
1807 # if not version 5.0
1808 LUAV51=`$LUABIN -e 'if string.sub(_VERSION,5,7)~="5.0" then print "1" end'`
1810 if test -z "$LUAV5"; then
1811 AC_MSG_WARN(Not Lua 5.x, SWIG does not support this version of Lua)
1813 elif test -z "$LUAV51"; then
1814 AC_MSG_RESULT(Lua 5.0.x)
1816 AC_MSG_RESULT(Lua 5.1 or later)
1820 if test "$LUABIN"; then
1821 AC_MSG_CHECKING(whether Lua dynamic loading is enabled)
1822 # using Lua to check Lua
1823 # lua 5.0 & 5.1 have different fn names
1824 if test -z "$LUAV51"; then
1825 LUADYNAMICLOADLIB=`$LUABIN -e '_,_,c=loadlib("no_such_lib","") if c~="absent" then print "1" end'`
1827 LUADYNAMICLOADLIB=`$LUABIN -e '_,_,c=package.loadlib("no_such_lib","") if c~="absent" then print "1" end'`
1830 if test -z "$LUADYNAMICLOADLIB"; then
1837 # look for the header files & set LUAFLAGS accordingly
1838 # will clear LUABIN if not present
1839 if test -n "$LUAINCLUDE"; then
1840 AC_CHECK_FILE($LUAINCLUDE/lua.h,[LUAFLAGS="$ISYSTEM$LUAINCLUDE"],[LUABIN=])
1843 AC_CHECK_HEADER(lua.h,[LUAFLAGS=""],[LUA_OK=""])
1844 # if we didn't get it, going to have to look elsewhere (the hard way)
1845 if test -z "$LUA_OK"; then
1846 AC_MSG_CHECKING(for lua.h in other locations)
1847 # note: ubuntu seems to like /usr/include/lua5.1/lua.h
1848 dirs="/usr/include/lua* /usr/local/include"
1851 if test -r $i/lua.h; then
1852 AC_MSG_RESULT($i/lua.h)
1853 LUAFLAGS="$ISYSTEM$i"
1857 if test -z "$LUAFLAGS"; then
1858 AC_MSG_RESULT(not found)
1859 LUABIN="" # clear the bin
1864 # look for the library files & set LUALINK accordingly
1865 # will clear LUABIN if not present
1866 lua_save_LIBS=$LIBS # the code seems to disrupt LIBS, so saving
1868 if test -n "$LUALIB"; then
1869 AC_CHECK_FILE($LUALIB/liblua.a,[LUALINK="-L$LUALIB -llua"],[LUABIN=])
1871 AC_SEARCH_LIBS(lua_close, [lua lua51 lua5.1 lua50 lua5.0], [LUALINK="-l$ac_lib"],[LUABIN=])
1874 # adding lualib for lua 5.0
1875 if test -z "$LUAV51"; then # extra for lua 5.0
1876 LUALINK="$LUALINK -llualib"
1879 LIBS=$lua_save_LIBS # restore LIBS
1881 fi # if not disabled
1883 AC_SUBST(LUADYNAMICLINKING)
1888 #----------------------------------------------------------------
1889 # Look for Allegro Common Lisp
1890 #----------------------------------------------------------------
1894 AC_ARG_WITH(allegrocl, AS_HELP_STRING([--without-allegrocl], [Disable Allegro CL])
1895 AS_HELP_STRING([--with-allegrocl=path], [Set location of Allegro CL executable (alisp)]),[ ALLEGROCLBIN="$withval"], [ALLEGROCLBIN=yes])
1897 # First, check for "--without-allegrocl" or "--with-allegrocl=no".
1898 if test x"${ALLEGROCLBIN}" = xno -o x"${with_alllang}" = xno ; then
1899 AC_MSG_NOTICE([Disabling Allegro CL])
1903 # can we find allegrocl?
1904 if test "x$ALLEGROCLBIN" = xyes; then
1905 AC_PATH_PROG(ALLEGROCLBIN, alisp)
1909 AC_SUBST(ALLEGROCLBIN)
1911 #----------------------------------------------------------------
1912 # Look for GNU CLISP
1913 #----------------------------------------------------------------
1917 AC_ARG_WITH(clisp, AS_HELP_STRING([--without-clisp], [Disable CLISP])
1918 AS_HELP_STRING([--with-clisp=path], [Set location of CLISP executable (clisp)]),[ CLISPBIN="$withval"], [CLISPBIN=yes])
1920 # First, check for "--without-clisp" or "--with-clisp=no".
1921 if test x"${CLISPBIN}" = xno -o x"${with_alllang}" = xno ; then
1922 AC_MSG_NOTICE([Disabling CLISP])
1926 # can we find clisp?
1927 if test "x$CLISPBIN" = xyes; then
1928 AC_PATH_PROG(CLISPBIN, clisp)
1934 #----------------------------------------------------------------
1936 #----------------------------------------------------------------
1940 AC_ARG_WITH(r, AS_HELP_STRING([--without-r], [Disable R])
1941 AS_HELP_STRING([--with-r=path], [Set location of R executable (r)]),[ RBIN="$withval"], [RBIN=yes])
1943 # First, check for "--without-r" or "--with-r=no".
1944 if test x"${RBIN}" = xno -o x"${with_alllang}" = xno ; then
1945 AC_MSG_NOTICE([Disabling R])
1950 if test "x$RBIN" = xyes; then
1951 AC_PATH_PROG(RBIN, R)
1957 #----------------------------------------------------------------
1958 # Determine which languages to use for examples/test-suite
1959 #----------------------------------------------------------------
1962 if test -z "$TCLINCLUDE" || test -z "$TCLLIB" ; then
1969 if test -z "$PERL" || test -z "$PERL5EXT" ; then
1972 AC_SUBST(SKIP_PERL5)
1976 if test -z "$OCTAVE" || test -z "$OCTAVEEXT" ; then
1979 AC_SUBST(SKIP_OCTAVE)
1983 if (test -z "$PYINCLUDE" || test -z "$PYLIB") &&
1984 (test -z "$PY3INCLUDE" || test -z "PY3LIB") ; then
1987 AC_SUBST(SKIP_PYTHON)
1990 if test -z "$PY3INCLUDE" || test -z "$PY3LIB" ; then
1993 AC_SUBST(SKIP_PYTHON3)
1996 if test -z "$JAVA" || test -z "$JAVAC" || test -z "$JAVAINC" ; then
2003 if test -z "$GUILEINCLUDE" || test -z "$GUILELIB" || test -z "$GUILE_GH_INTERFACE"; then
2006 AC_SUBST(SKIP_GUILE)
2009 if test -z "$GUILEINCLUDE" || test -z "$GUILELIB" || test -z "$GUILE_SCM_INTERFACE"; then
2012 AC_SUBST(SKIP_GUILESCM)
2016 if test -z "$MZC" || test -z "$MZDYNOBJ" ; then
2019 AC_SUBST(SKIP_MZSCHEME)
2023 if test -z "$RUBY" || test -z "$RUBYINCLUDE" || test -z "$RUBYLIB" ; then
2030 if test -z "$PHP" || test -z "$PHPINC" ; then
2037 if test -z "$OCAMLBIN" || test -z "$OCAMLINC" ; then
2040 AC_SUBST(SKIP_OCAML)
2043 SKIP_PIKE="1" # Always skipped!
2044 if test -z "$PIKE" || test -z "$PIKEINCLUDE" ; then
2051 if test -z "$CHICKEN_CSC" || test -z "$CHICKEN"; then
2054 AC_SUBST(SKIP_CHICKEN)
2058 if test -z "$CSHARPCOMPILER" ; then
2061 if test "cscc" = "$CSHARPCOMPILER" && test -z "$CSHARPCILINTERPRETER" ; then
2065 AC_SUBST(SKIP_CSHARP)
2067 SKIP_MODULA3="1" # Always skipped!
2068 AC_SUBST(SKIP_MODULA3)
2071 # we need LUABIN & dynamic loading
2072 if test -z "$LUABIN" || test -z "$LUADYNAMICLOADLIB"; then
2078 if test -z "$ALLEGROCLBIN" ; then
2081 AC_SUBST(SKIP_ALLEGROCL)
2084 if test -z "$CLISPBIN" ; then
2087 AC_SUBST(SKIP_CLISP)
2090 if test -z "$RBIN" ; then
2096 #if test -z "$CFFIBIN" ; then
2102 #if test -z "$UFFIBIN" ; then
2107 #----------------------------------------------------------------
2108 # Additional language dependencies
2109 #----------------------------------------------------------------
2111 if test -z "$GCJ" || test -z "$GCJH" ; then
2114 if test "$GCC" != yes; then
2121 #----------------------------------------------------------------
2123 #----------------------------------------------------------------
2127 # Translate path for native Windows compilers for use with 'make check'
2130 *-*-cygwin* | *-*-mingw*)
2131 if (cygpath --mixed $ROOT_DIR) >/dev/null 2>/dev/null; then
2132 ROOT_DIR=`cygpath --mixed $ROOT_DIR`
2134 # Extra files generated by some Windows compilers
2135 EXTRA_CLEAN="*.stackdump *.exp *.lib *.pdb *.ilk"
2140 AC_SUBST(EXTRA_CLEAN)
2141 AC_SUBST(ac_aux_dir)
2143 # Configure SWIG_LIB path
2145 AC_ARG_WITH(swiglibdir,[ --with-swiglibdir=DIR Put SWIG system-independent libraries into DIR.],
2146 [swig_lib="$withval"], [swig_lib="${datadir}/swig/${PACKAGE_VERSION}"])
2148 AC_DEFINE_DIR(SWIG_LIB, swig_lib, [Directory for SWIG system-independent libraries])
2151 # Windows does not understand unix directories. Convert into a windows directory with drive letter.
2152 *-*-mingw*) SWIG_LIB_WIN_UNIX=`cmd //c echo $SWIG_LIB | sed -e "s/[ ]*$//"`;; # This echo converts unix to mixed paths. Then zap unexpected trailing space.
2153 *-*-cygwin*) SWIG_LIB_WIN_UNIX=`cygpath --mixed "$SWIG_LIB"`;;
2154 *) SWIG_LIB_WIN_UNIX="";;
2156 AC_DEFINE_UNQUOTED(SWIG_LIB_WIN_UNIX, ["$SWIG_LIB_WIN_UNIX"], [Directory for SWIG system-independent libraries (Unix install on native Windows)])
2163 Examples/guile/Makefile \
2164 Examples/xml/Makefile \
2165 Examples/GIFPlot/Makefile \
2166 Examples/GIFPlot/Lib/Makefile \
2167 Examples/test-suite/chicken/Makefile \
2168 Examples/test-suite/csharp/Makefile \
2169 Examples/test-suite/guile/Makefile \
2170 Examples/test-suite/guilescm/Makefile \
2171 Examples/test-suite/java/Makefile \
2172 Examples/test-suite/mzscheme/Makefile \
2173 Examples/test-suite/ocaml/Makefile \
2174 Examples/test-suite/octave/Makefile \
2175 Examples/test-suite/perl5/Makefile \
2176 Examples/test-suite/php/Makefile \
2177 Examples/test-suite/pike/Makefile \
2178 Examples/test-suite/python/Makefile \
2179 Examples/test-suite/ruby/Makefile \
2180 Examples/test-suite/tcl/Makefile \
2181 Examples/test-suite/lua/Makefile \
2182 Examples/test-suite/allegrocl/Makefile \
2183 Examples/test-suite/clisp/Makefile \
2184 Examples/test-suite/cffi/Makefile \
2185 Examples/test-suite/uffi/Makefile \
2186 Examples/test-suite/r/Makefile \
2189 AC_CONFIG_FILES([preinst-swig], [chmod +x preinst-swig])
2190 AC_CONFIG_FILES([CCache/ccache_swig_config.h])
2193 dnl configure.in ends here