import source from 1.3.40
[external/swig.git] / configure.in
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.
4
5 AC_INIT([swig],[1.3.40],[http://www.swig.org])
6 AC_PREREQ(2.58)
7 AC_CONFIG_SRCDIR([Source/Swig/swig.h])
8 AC_CONFIG_AUX_DIR([Tools/config])
9 AC_CONFIG_HEADERS([Source/Include/swigconfig.h])
10 AC_CANONICAL_HOST
11 AM_INIT_AUTOMAKE
12
13 dnl Some extra defines for the config file
14 AH_BOTTOM([
15 /* Default language */
16 #define SWIG_LANG               "-tcl"
17
18 /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
19 #if defined(_MSC_VER)
20 # define _CRT_SECURE_NO_DEPRECATE
21 #endif
22 ])
23
24 dnl Check for programs that a user requires to build SWIG
25 AC_PROG_CC
26 AC_PROG_CXX
27 AC_EXEEXT
28 AC_OBJEXT
29 AM_PROG_CC_C_O  # Needed for subdir-objects in AUTOMAKE_OPTIONS
30
31 AC_COMPILE_WARNINGS # Increase warning levels
32
33 AC_DEFINE_UNQUOTED(SWIG_CXX, ["$CXX"], [Compiler that built SWIG])
34 AC_DEFINE_UNQUOTED(SWIG_PLATFORM, ["$build"], [Platform that SWIG is built for])
35
36 dnl Checks for header files.
37 AC_HEADER_STDC
38
39 dnl Checks for types.
40 AC_LANG_PUSH([C++])
41 AC_CHECK_TYPES([bool])
42 AC_LANG_POP([C++])
43
44 dnl Look for popen
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])
48 else
49 AC_CHECK_FUNC(popen, AC_DEFINE(HAVE_POPEN, 1, [Define if popen is available]), AC_MSG_NOTICE([Disabling popen]))
50 fi
51
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")
60  fi
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"
65  else
66   AC_MSG_NOTICE([RxSpencer not found. Obtain it at http://arglist.com/regex or http://gnuwin32.sourceforge.net/packages.html])
67  fi
68 fi
69
70 dnl CCache
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])
74
75 if test "$enable_ccache" = yes; then
76   AC_CONFIG_SUBDIRS(CCache)
77   ENABLE_CCACHE=1
78 fi
79 AC_SUBST(ENABLE_CCACHE)
80
81
82 echo ""
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"
85 echo ""
86
87 AC_PROG_YACC
88 AC_PROG_RANLIB
89 AC_CHECK_PROGS(AR, ar aal, ar)
90 AC_SUBST(AR)
91 AC_CHECK_PROGS(YODL2MAN, yodl2man)
92 AC_CHECK_PROGS(YODL2HTML, yodl2html)
93
94
95 echo ""
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"
98 echo ""
99
100
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
104     ISYSTEM="-isystem "
105 else
106     ISYSTEM="-I"
107 fi
108
109
110 dnl Info for building shared libraries ... in order to run the examples
111
112 # SO is the extension of shared libraries (including the dot!)
113 AC_MSG_CHECKING(SO)
114 if test -z "$SO"
115 then
116         case $host in
117         *-*-hp*) SO=.sl;;
118         *-*-darwin*) SO=.bundle;;
119         *-*-cygwin* | *-*-mingw*) SO=.dll;;
120         *) SO=.so;;
121         esac
122 fi
123 AC_MSG_RESULT($SO)
124
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"
131 then
132         case $host in
133         *-*-aix*) LDSHARED="\$(srcdir)/ld_so_aix \$(CC)";;
134         *-*-cygwin* | *-*-mingw*)
135             if test "$GCC" = yes; then
136                 LDSHARED="$CC -shared"
137             else
138                 if test "cl" = $CC ;  then
139                     # Microsoft Visual C++ (MSVC)
140                     LDSHARED="$CC -nologo -LD"
141                 else
142                     # Unknown compiler try gcc approach
143                     LDSHARED="$CC -shared"
144                 fi
145             fi ;;
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";;
153         *-*-next*)
154                 if test "$ns_dyld"
155                 then LDSHARED='$(CC) $(LDFLAGS) -bundle -prebind'
156                 else LDSHARED='$(CC) $(CFLAGS) -nostdlib -r';
157                 fi
158                 if test "$with_next_framework" ; then
159                     LDSHARED="$LDSHARED \$(LDLIBRARY)"
160                 fi ;;
161         *-*-linux*) LDSHARED="gcc -shared";;
162         *-*-dgux*) LDSHARED="ld -G";;
163         *-*-freebsd3*) LDSHARED="gcc -shared";;
164         *-*-freebsd* | *-*-openbsd*) LDSHARED="ld -Bshareable";;
165         *-*-netbsd*)
166                 if [[ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]]
167                 then
168                         LDSHARED="cc -shared"
169                 else
170                         LDSHARED="ld -Bshareable"
171                 fi;;
172         *-sco-sysv*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
173         *-*-darwin*) LDSHARED="cc -bundle -undefined suppress -flat_namespace";;
174         *)      LDSHARED="ld";;
175         esac
176 fi
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"
184 then
185         CXXSHARED="$LDSHARED"
186 fi
187 AC_MSG_RESULT($CXXSHARED)
188
189 #
190 AC_MSG_CHECKING(TRYLINKINGWITHCXX)
191 if test -z "$TRYLINKINGWITHCXX"
192 then
193         case $host in
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";
197              fi;;
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 "
203             else
204                 if test "cl" = $CXX ;  then
205                     # Microsoft Visual C++ (MSVC)
206                     TRYLINKINGWITHCXX="CXXSHARED= $CXX -nologo -LD"
207                 else
208                     TRYLINKINGWITHCXX="#unknown Windows compiler"
209                 fi
210             fi ;;
211         *)       TRYLINKINGWITHCXX="CXXSHARED= $CXX -shared ";;
212         esac
213 fi
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"
219 then
220         case $host in
221         *-*-hp*) if test "$GCC" = yes;
222                  then CCSHARED="-fpic";
223                  else CCSHARED="+z";
224                  fi;;
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";;
231                    *) CCSHARED="";;
232                    esac;;
233         esac
234 fi
235 AC_MSG_RESULT($CCSHARED)
236
237 # RPATH is the path used to look for shared library files.
238 AC_MSG_CHECKING(RPATH)
239 if test -z "$RPATH"
240 then
241         case $host in
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 .';;
245         *)      RPATH='';;
246         esac
247 fi
248 AC_MSG_RESULT($RPATH)
249
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
252
253 AC_MSG_CHECKING(LINKFORSHARED)
254 if test -z "$LINKFORSHARED"
255 then
256         case $host in
257         *-*-aix*)       LINKFORSHARED='-Wl,-bE:$(srcdir)/python.exp -lld';;
258         *-*-hp*)
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";;
264         esac
265 fi
266 AC_MSG_RESULT($LINKFORSHARED)
267
268 # Set info about shared libraries.
269 AC_SUBST(SO)
270 AC_SUBST(LDSHARED)
271 AC_SUBST(CCSHARED)
272 AC_SUBST(CXXSHARED)
273 AC_SUBST(TRYLINKINGWITHCXX)
274 AC_SUBST(LINKFORSHARED)
275 AC_SUBST(RPATH)
276
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
279
280 AC_SUBST(PYTHON_SO)
281 case $host in
282    *-*-mingw*) PYTHON_SO=.pyd;;
283    *-*-darwin*) PYTHON_SO=.so;;
284    *) PYTHON_SO=$SO;;
285 esac
286
287 AC_SUBST(TCL_SO)
288 case $host in
289    *-*-darwin*) TCL_SO=.dylib;;
290    *) TCL_SO=$SO;;
291 esac
292
293 AC_SUBST(GUILE_SO)
294 case $host in
295    *-*-darwin*) GUILE_SO=.so;;
296    *) GUILE_SO=$SO;;
297 esac
298
299 AC_SUBST(PHP_SO)
300 case $host in
301    *-*-darwin*) PHP_SO=.so;;
302    *) PHP_SO=$SO;;
303 esac
304
305 AC_SUBST(MZSCHEME_SO)
306 case $host in
307    *) MZSCHEME_SO=.so;;
308 esac
309
310 AC_SUBST(LUA_SO)
311 case $host in
312    *-*-darwin*) LUA_SO=.so;;
313    *) LUA_SO=$SO;;
314 esac
315
316 # Optional CFLAGS used to silence compiler warnings on some platforms.
317
318 AC_SUBST(PLATFLAGS)
319 case $host in
320    *-*-darwin*) PLATFLAGS="-Wno-long-double";;
321    *) PLATFLAGS="";;
322 esac
323
324
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
328
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
331 dnl preceding one.
332 dnl
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
339
340 AC_CHECK_LIB(swill, swill_init, [SWIGLIBS="-lswill $LIBS" SWILL="-DSWIG_SWILL"])
341 AC_SUBST(SWIGLIBS)
342 AC_SUBST(SWILL)
343
344 # check for --with-libm=...
345 AC_SUBST(LIBM)
346 LIBM=-lm
347 AC_ARG_WITH(libm, [  --with-libm=STRING      math library], [
348 if test "$withval" != yes
349 then LIBM=$withval
350 else AC_MSG_ERROR([proper usage is --with-libm=STRING])
351 fi])
352 AC_CHECK_LIB(ieee, main, [LIBM="-lieee $LIBM"])
353 AC_CHECK_LIB(crypt,crypt, [LIBCRYPT="-lcrypt"])
354 AC_SUBST(LIBCRYPT)
355
356 # check for --with-libc=...
357 AC_SUBST(LIBC)
358 AC_ARG_WITH(libc, [  --with-libc=STRING      C library], [
359 if test "$withval" != yes
360 then LIBC=$withval
361 else AC_MSG_ERROR([proper usage is --with-libc=STRING])
362 fi])
363
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 #--------------------------------------------------------------------
372
373 AC_PATH_X
374 not_really_there=""
375 if test "$no_x" = ""; then
376     if test "$x_includes" = ""; then
377         AC_TRY_CPP([#include <X11/XIntrinsic.h>], , not_really_there="yes")
378     else
379         if test ! -r $x_includes/X11/Intrinsic.h; then
380             not_really_there="yes"
381         fi
382     fi
383 fi
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"
390         for i in $dirs ; do
391             if test -r $i/X11/Intrinsic.h; then
392                 XINCLUDES=" -I$i"
393                 break
394             fi
395         done
396     fi
397     AC_MSG_RESULT($XINCLUDES)
398 else
399     if test "$x_includes" != ""; then
400         XINCLUDES=-I$x_includes
401     else
402         XINCLUDES="# no special path needed"
403     fi
404 fi
405 if test -z "$XINCLUDES"; then
406     AC_MSG_RESULT(couldn't find any!)
407     XINCLUDES="# no include files found"
408 fi
409
410 if test "$no_x" = yes; then
411     AC_MSG_CHECKING(for X11 libraries)
412     XLIBSW=
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"
414     for i in $dirs ; do
415         if test -r $i/libX11.a -o -r $i/libX11.so -o -r $i/libX11.sl; then
416             AC_MSG_RESULT($i)
417             XLIBSW="-L$i -lX11"
418             break
419         fi
420     done
421 else
422     if test "$x_libraries" = ""; then
423         XLIBSW=-lX11
424     else
425         XLIBSW="-L$x_libraries -lX11"
426     fi
427 fi
428 if test -z "$XLIBSW" ; then
429     AC_CHECK_LIB(Xwindow, XCreateWindow, XLIBSW=-lXwindow)
430 fi
431 if test -z "$XLIBSW" ; then
432     AC_MSG_RESULT(couldn't find any!  Using -lX11.)
433     XLIBSW=-lX11
434 fi
435
436 AC_SUBST(XINCLUDES)
437 AC_SUBST(XLIBSW)
438
439 AC_ARG_WITH(alllang, AS_HELP_STRING([--without-alllang], [Disable all languages]), with_alllang="$withval")
440
441 #--------------------------------------------------------------------
442 # Look for Tcl
443 #--------------------------------------------------------------------
444
445 TCLINCLUDE=
446 TCLLIB=
447 TCLPACKAGE=
448
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=])
451 AC_ARG_WITH(tcl,
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=])
458
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])
462 else
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)`
468    else
469       AC_MSG_ERROR([${with_tcl} directory doesn't contain tclConfig.sh])
470    fi
471 fi
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)`
480             break
481         fi
482     done
483 fi
484 if test x"${TCLCONFIG}" = x ; then
485     AC_MSG_RESULT(no)
486 else
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/"`
491     fi
492     if test -z "$TCLLIB"; then
493         TCLLIB=$TCL_LIB_SPEC
494     fi
495 fi
496
497 if test -z "$TCLINCLUDE"; then
498    if test "x$TCLPACKAGE" != xyes; then
499         TCLINCLUDE="$ISYSTEM$TCLPACKAGE/include"
500    fi
501 fi
502
503 if test -z "$TCLLIB"; then
504    if test "x$TCLPACKAGE" != xyes; then
505         TCLLIB="-L$TCLPACKAGE/lib -ltcl"
506    fi
507 fi
508
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"
514         for i in $dirs ; do
515                 if test -r $i/tcl.h; then
516                         AC_MSG_RESULT($i)
517                         TCLINCLUDE="$ISYSTEM$i"
518                         break
519                 fi
520         done
521 fi
522 if test -z "$TCLINCLUDE"; then
523         AC_MSG_RESULT(not found)
524 fi
525 else
526         AC_MSG_RESULT($TCLINCLUDE)
527 fi
528
529 AC_MSG_CHECKING(for Tcl library)
530 if test -z "$TCLLIB"; then
531 dirs="/usr/local/lib /usr/lib /opt/local/lib"
532 for i in $dirs ; do
533         if test -r $i/libtcl.a; then
534             AC_MSG_RESULT($i)
535             TCLLIB="-L$i -ltcl"
536             break
537         fi
538 done
539 if test -z "$TCLLIB"; then
540         AC_MSG_RESULT(not found)
541 fi
542 else
543 AC_MSG_RESULT($TCLLIB)
544 fi
545
546 # Cygwin (Windows) needs the library for dynamic linking
547 case $host in
548 *-*-cygwin* | *-*-mingw*) TCLDYNAMICLINKING="$TCLLIB";;
549 *)TCLDYNAMICLINKING="";;
550 esac
551
552 case $host in
553 *-*-darwin*) 
554     TCLLDSHARED='$(CC) -dynamiclib -undefined suppress -flat_namespace'
555     TCLCXXSHARED='$(CXX) -dynamiclib -undefined suppress -flat_namespace'
556     ;;
557 *)
558     TCLLDSHARED='$(LDSHARED)'
559     TCLCXXSHARED='$(CXXSHARED)'
560     ;;
561 esac
562
563 fi
564
565 AC_SUBST(TCLINCLUDE)
566 AC_SUBST(TCLLIB)
567 AC_SUBST(TCLDYNAMICLINKING)
568 AC_SUBST(TCLLDSHARED)
569 AC_SUBST(TCLCXXSHARED)
570
571 #----------------------------------------------------------------
572 # Look for Python
573 #----------------------------------------------------------------
574
575 PYINCLUDE=
576 PYLIB=
577 PYPACKAGE=
578
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])
581
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])
585 else
586 # First figure out the name of the Python executable
587
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])
590 else
591 PYTHON="$PYBIN"
592 fi
593
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)
601
602
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.
605
606     AC_MSG_CHECKING(for Python version)
607
608     # Need to do this hack since autoconf replaces __file__ with the name of the configure file
609     filehack="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)
612
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
619       PYLIBDIR="lib" 
620     fi
621     AC_MSG_RESULT($PYLIBDIR)
622     
623     # Set the include directory
624
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"
628     fi
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"
632         fi
633     fi
634     AC_MSG_RESULT($PYINCLUDE)
635
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"
639     for i in $dirs; do
640         if test -d $PYEPREFIX/$PYLIBDIR/$i; then
641            PYLIB="$PYEPREFIX/$PYLIBDIR/$i"
642            break
643         fi
644     done
645     if test -z "$PYLIB"; then
646         AC_MSG_RESULT(Not found)
647     else
648         AC_MSG_RESULT($PYLIB)
649     fi
650
651     # Check for really old versions
652     if test -r $PYLIB/libPython.a; then
653          PYLINK="-lModules -lPython -lObjects -lParser"
654     else
655          PYLINK="-l$PYVERSION"
656     fi
657 fi
658
659 # Cygwin (Windows) needs the library for dynamic linking
660 case $host in
661 *-*-cygwin* | *-*-mingw*) PYTHONDYNAMICLINKING="-L$PYLIB $PYLINK"
662          DEFS="-DUSE_DL_IMPORT $DEFS" PYINCLUDE="$PYINCLUDE"
663          ;;
664 *)PYTHONDYNAMICLINKING="";;
665 esac
666 fi
667
668 AC_SUBST(PYINCLUDE)
669 AC_SUBST(PYLIB)
670 AC_SUBST(PYLINK)
671 AC_SUBST(PYTHONDYNAMICLINKING)
672
673
674 #----------------------------------------------------------------
675 # Look for Python 3.x
676 #----------------------------------------------------------------
677
678 # mostly copy & pasted from "Look for Python" section,
679 # did some trim, fix and rename
680
681 PY3INCLUDE=
682 PY3LIB=
683 PY3PACKAGE=
684
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])
687
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])
691 else
692 # First figure out the name of the Python3 executable 
693
694 if test "x$PY3BIN" = xyes; then
695   AC_CHECK_PROGS(PYTHON3, [python3 python3.0 python3.1])
696 else
697   PYTHON3="$PY3BIN"
698 fi
699
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])
703 else
704   AC_CHECK_PROGS(PY3CONFIG, [$PYTHON3-config python3-config python3.0-config python3.1-config])
705 fi
706
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)
714
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.
717     
718     AC_MSG_CHECKING([for Python 3.x version])
719
720     # Need to do this hack since autoconf replaces __file__ with the name of the configure file
721     filehack="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)
724
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
731       PY3LIBDIR="lib" 
732     fi
733     AC_MSG_RESULT($PY3LIBDIR)
734     
735     # Set the include directory
736
737     AC_MSG_CHECKING([for Python 3.x header files])
738     PY3INCLUDE=`($PY3CONFIG --includes) 2>/dev/null`
739     AC_MSG_RESULT($PY3INCLUDE)
740
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"
744     for i in $dirs; do
745         if test -d $PY3EPREFIX/$PY3LIBDIR/$i; then
746            PY3LIB="$PY3EPREFIX/$PY3LIBDIR/$i"
747            break
748         fi
749     done
750     if test -z "$PY3LIB"; then
751         AC_MSG_RESULT([Not found])
752     else
753         AC_MSG_RESULT($PY3LIB)
754     fi
755
756     PY3LINK="-l$PY3VERSION"
757 fi
758
759 # Cygwin (Windows) needs the library for dynamic linking
760 case $host in
761 *-*-cygwin* | *-*-mingw*) PYTHON3DYNAMICLINKING="-L$PYLIB $PY3LINK"
762          DEFS="-DUSE_DL_IMPORT $DEFS" PY3INCLUDE="$PY3INCLUDE"
763          ;;
764 *)PYTHON3DYNAMICLINKING="";;
765 esac
766 fi
767
768 AC_SUBST(PY3INCLUDE)
769 AC_SUBST(PY3LIB)
770 AC_SUBST(PY3LINK)
771 AC_SUBST(PYTHON3DYNAMICLINKING)
772
773
774 #----------------------------------------------------------------
775 # Look for Perl5
776 #----------------------------------------------------------------
777
778 PERLBIN=
779
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])
782
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])
786 PERL=
787 else
788
789 # First figure out what the name of Perl5 is
790
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)
793 else
794 PERL="$PERLBIN"
795 fi
796
797
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"
805                 PERL5EXT=none
806                 for i in $dirs; do
807                         if test -r $i/perl.h; then
808                                 AC_MSG_RESULT($i)
809                                 PERL5EXT="$i"
810                                 break;
811                         fi
812                 done
813                 if test "$PERL5EXT" = none; then
814                         PERL5EXT="$PERL5DIR/CORE"
815                         AC_MSG_RESULT(could not locate perl.h...using $PERL5EXT)
816                 fi
817
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)
822                 else
823                         AC_MSG_RESULT($PERL5LIB)
824                 fi
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)
829                 else
830                         AC_MSG_RESULT($PERL5CCFLAGS)
831                 fi
832         else
833                 AC_MSG_RESULT(unable to determine perl5 configuration)
834                 PERL5EXT=$PERL5DIR
835         fi
836 else
837         AC_MSG_RESULT(could not figure out how to run perl5)
838 fi
839
840 # Cygwin (Windows) needs the library for dynamic linking
841 case $host in
842 *-*-cygwin* | *-*-mingw*) PERL5DYNAMICLINKING="-L$PERL5EXT -l$PERL5LIB";;
843 *)PERL5DYNAMICLINKING="";;
844 esac
845 fi
846
847 AC_SUBST(PERL)
848 AC_SUBST(PERL5EXT)
849 AC_SUBST(PERL5DYNAMICLINKING)
850 AC_SUBST(PERL5LIB)
851 AC_SUBST(PERL5CCFLAGS)
852
853 #----------------------------------------------------------------
854 # Look for Octave
855 #----------------------------------------------------------------
856
857 OCTAVEBIN=
858 OCTAVEDYNAMICLINKING=
859 OCTAVE_SO=.oct
860
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])
863
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])
867 OCTAVE=
868 else
869
870 # First figure out what the name of Octave is
871
872 if test "x$OCTAVEBIN" = xyes; then
873 AC_CHECK_PROGS(OCTAVE, octave)
874 else
875 OCTAVE="$OCTAVEBIN"
876 fi
877
878
879 AC_MSG_CHECKING(for Octave header files)
880 if test -n "$OCTAVE"; then
881         OCTAVEDIR="/usr/include"
882         if test "$OCTAVEDIR" != ""; then
883                 dirs="$OCTAVEDIR"
884                 OCTAVEEXT=""
885                 for i in $dirs; do
886                         if test -r $i/octave/oct.h; then
887                                 OCTAVEEXT="$i"
888                                 break;
889                         fi
890                         if test -r $i/octave/octave/oct.h; then
891                                 OCTAVEEXT="$i/octave"
892                                 break;
893                         fi
894                 done
895                 if test "$OCTAVEEXT" = "" ; then
896                         AC_MSG_RESULT(not found)
897                 else
898                         AC_MSG_RESULT($OCTAVEEXT)
899                 fi
900
901                 AC_MSG_CHECKING(for Octave compiler options)
902                 OCTAVECCFLAGS=""
903                 AC_MSG_RESULT($OCTAVECCFLAGS)
904         fi
905 else
906         AC_MSG_RESULT(could not figure out how to run octave)
907 fi
908
909 fi
910
911 AC_SUBST(OCTAVE)
912 AC_SUBST(OCTAVEEXT)
913 AC_SUBST(OCTAVE_SO)
914 AC_SUBST(OCTAVEDYNAMICLINKING)
915 AC_SUBST(OCTAVELIB)
916 AC_SUBST(OCTAVECCFLAGS)
917
918 #----------------------------------------------------------------
919 # Look for java
920 #----------------------------------------------------------------
921
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=])
925
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])
929 JAVA=
930 else
931
932 if test "x$JAVABIN" = xyes; then
933   AC_CHECK_PROGS(JAVA, java kaffe guavac)
934 else
935   JAVA="$JAVABIN"
936 fi
937
938 if test -z "$JAVACBIN"; then
939   AC_CHECK_PROGS(JAVAC, javac)
940 else
941   JAVAC="$JAVACBIN"
942 fi
943
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=])
946
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"
949
950   # Add in default installation directory on Windows for Cygwin
951   case $host in
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";;
954   *);;
955   esac
956 fi
957
958 JAVAINC=""
959 for d in $JAVAINCDIR ; do
960   if test -r "$d/jni.h" ; then
961     AC_MSG_RESULT($d)
962     JAVAINCDIR=$d
963     JAVAINC=-I\"$d\"
964     break
965   fi
966 done
967
968 if test "$JAVAINC" = "" ; then
969   AC_MSG_RESULT(not found)
970 else
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)
976   else
977     JAVAMDDIR=`dirname "$JAVAMDDIR" | tail -1`
978     JAVAINC="${JAVAINC} -I\"$JAVAMDDIR\""
979     AC_MSG_RESULT($JAVAMDDIR)
980   fi
981 fi
982
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
984 case $host in
985 *-*-cygwin* | *-*-mingw*)
986     if test "$GCC" = yes; then
987         JAVADYNAMICLINKING=" -mno-cygwin -mthreads -Wl,--add-stdcall-alias"
988         JAVACFLAGS="-mno-cygwin -mthreads"
989     else
990         JAVADYNAMICLINKING=""
991         JAVACFLAGS=""
992     fi ;;
993 *-*-darwin*) 
994         JAVADYNAMICLINKING="-dynamiclib -framework JavaVM"
995         JAVACFLAGS=""
996         ;;
997 *)
998         JAVADYNAMICLINKING=""
999         JAVACFLAGS=""
1000         ;;
1001 esac
1002
1003 # Java on Windows platforms including Cygwin doesn't use libname.dll, rather name.dll when loading dlls
1004 case $host in
1005 *-*-cygwin* | *-*-mingw*) JAVALIBRARYPREFIX="";;
1006 *)JAVALIBRARYPREFIX="lib";;
1007 esac
1008
1009 # Java on Mac OS X tweaks
1010 case $host in
1011 *-*-darwin*) 
1012     JAVASO=".jnilib"
1013     JAVALDSHARED='$(CC)'
1014     JAVACXXSHARED='$(CXX)'
1015     ;;
1016 *)
1017     JAVASO=$SO
1018     JAVALDSHARED='$(LDSHARED)'
1019     JAVACXXSHARED='$(CXXSHARED)'
1020     ;;
1021 esac
1022 fi
1023
1024 AC_SUBST(JAVA)
1025 AC_SUBST(JAVAC)
1026 AC_SUBST(JAVAINC)
1027 AC_SUBST(JAVADYNAMICLINKING)
1028 AC_SUBST(JAVALIBRARYPREFIX)
1029 AC_SUBST(JAVASO)
1030 AC_SUBST(JAVALDSHARED)
1031 AC_SUBST(JAVACXXSHARED)
1032 AC_SUBST(JAVACFLAGS)
1033
1034 #----------------------------------------------------------------
1035 # Look for gcj
1036 #----------------------------------------------------------------
1037
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=])
1041
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])
1045 else
1046   if test "x$GCJBIN" = xyes; then
1047     AC_CHECK_PROGS(GCJ, gcj)
1048   else
1049     GCJ="$GCJBIN"
1050   fi
1051
1052   if test -z "$GCJCBIN"; then
1053     AC_CHECK_PROGS(GCJH, gcjh)
1054   else
1055     GCJH="$GCJHBIN"
1056   fi
1057 fi
1058
1059 AC_SUBST(GCJ)
1060 AC_SUBST(GCJH)
1061
1062 #----------------------------------------------------------------
1063 # Look for Guile
1064 #----------------------------------------------------------------
1065
1066 GUILEPACKAGE=
1067 GUILEINCLUDE=
1068 GUILE=
1069 GUILELIB=
1070 GUILELINK=
1071 GUILEPKGDATADIR=
1072
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"])
1083
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])
1087 else
1088
1089 if test -z "$GUILE_CONFIG" ; then
1090   AC_PATH_PROG(GUILE_CONFIG, guile-config)
1091 fi
1092
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`"
1100 fi
1101
1102   if test -z "$GUILE" -o "x$GUILE" = xyes; then
1103      if test -n "$GUILEPACKAGE"; then
1104         GUILE="$GUILEPACKAGE/bin/guile"
1105      else
1106         GUILE=
1107      fi
1108   fi
1109
1110   if test -z "$GUILEINCLUDE"; then
1111      if test -n "$GUILEPACKAGE"; then
1112         GUILEINCLUDE="$GUILEPACKAGE/include"
1113      fi
1114   fi
1115
1116   if test -z "$GUILELIB"; then
1117      if test -n "$GUILEPACKAGE"; then
1118         GUILELIB="$GUILEPACKAGE/lib"
1119      fi
1120   fi
1121
1122
1123 AC_MSG_CHECKING(for Guile header files)
1124
1125   dirs="$GUILEINCLUDE"
1126   for i in $dirs ; do
1127         if test -r $i/guile/gh.h; then
1128                 AC_MSG_RESULT($i)
1129                 GUILEINCLUDE="$ISYSTEM$i"
1130                 break
1131         fi
1132   done
1133   if test -z "$GUILEINCLUDE"; then
1134         AC_MSG_RESULT(not found)
1135   fi
1136
1137   AC_MSG_CHECKING(for Guile library)
1138   dirs="$GUILELIB"
1139   for i in $dirs ; do
1140         if test -r $i/libguile.so; then
1141             AC_MSG_RESULT($i)
1142             GUILELIB="$i"
1143             break
1144         fi
1145   done
1146   if test -z "$GUILELIB"; then
1147         AC_MSG_RESULT(not found)
1148   fi
1149
1150 if test -z "$GUILELINK"; then
1151   GUILELINK="-L$GUILELIB -lguile"
1152 fi
1153
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"
1160
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
1165         AC_MSG_RESULT(yes)
1166 else
1167         AC_MSG_RESULT(no)
1168 fi
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
1173         AC_MSG_RESULT(yes)
1174 else
1175         AC_MSG_RESULT(no)
1176 fi
1177 CFLAGS=$guilesafe_CFLAGS
1178 LIBS=$guilesafe_LIBS
1179 fi
1180
1181 AC_SUBST(GUILE)
1182 AC_SUBST(GUILEINCLUDE)
1183 AC_SUBST(GUILELIB)
1184 AC_SUBST(GUILELINK)
1185 AC_SUBST(GUILE_GH_INTERFACE)
1186 AC_SUBST(GUILE_SCM_INTERFACE)
1187
1188 #----------------------------------------------------------------
1189 # Look for MzScheme
1190 #----------------------------------------------------------------
1191
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=])
1195
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])
1199   MZC=
1200 else
1201   if test "x$MZSCHEMEBIN" = xyes; then
1202      AC_PATH_PROG(MZSCHEME, mzscheme)
1203   else
1204      MZSCHEME="$MZSCHEMEBIN"
1205   fi
1206   
1207   if test -z "$MZCBIN"; then
1208      AC_PATH_PROG(MZC, mzc)
1209   fi
1210
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"
1216     else
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`
1219     fi
1220     if test -f "$MZDYNOBJ"; then
1221       AC_MSG_RESULT($MZDYNOBJ)
1222     else
1223       AC_MSG_RESULT(not found)
1224       MZDYNOBJ=""
1225     fi
1226   fi
1227 fi
1228 AC_SUBST(MZDYNOBJ)
1229
1230 #----------------------------------------------------------------
1231 # Look for Ruby
1232 #----------------------------------------------------------------
1233
1234 RUBYBIN=
1235
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])
1238
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])
1242 RUBY=
1243 else
1244
1245 # First figure out what the name of Ruby is
1246
1247 if test "x$RUBYBIN" = xyes; then
1248         AC_CHECK_PROGS(RUBY, ruby)
1249 else
1250         RUBY="$RUBYBIN"
1251 fi
1252
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
1257                 dirs="$RUBYDIR"
1258                 RUBYINCLUDE=none
1259                 for i in $dirs; do
1260                         if test -r $i/ruby.h; then
1261                                 AC_MSG_RESULT($i)
1262                                 RUBYINCLUDE="-I$i"
1263                                 break;
1264                         fi
1265                 done
1266                 if test "$RUBYINCLUDE" = none; then
1267                         RUBYINCLUDE="-I$RUBYDIR"
1268                         AC_MSG_RESULT(could not locate ruby.h...using $RUBYINCLUDE)
1269                 fi
1270
1271                 # Find library and path for linking.
1272                 AC_MSG_CHECKING(for Ruby library)
1273                 RUBYLIB=""
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"
1277
1278         rb_libruby=`($RUBY -rrbconfig -e 'print Config::CONFIG[["LIBRUBY_A"]]') 2>/dev/null`
1279         RUBYLINK=`($RUBY -rrbconfig -e '
1280             c = Config::CONFIG
1281             if c.has_key? "LIBRUBYARG_STATIC" # 1.8.x
1282                 if c[["LIBRUBY"]] == c[["LIBRUBY_A"]]
1283                     link = c[["LIBRUBYARG_STATIC"]]
1284                 else
1285                     link = c[["LIBRUBYARG_SHARED"]]
1286                 end
1287             else # 1.6.x
1288                 link = "-l" + c[["RUBY_INSTALL_NAME"]]
1289             end
1290             
1291             # Get the target Ruby was built for
1292             target = c[["target"]]
1293            
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)
1301               puts "-l#{link}"
1302             else
1303               puts link
1304             end') 2>/dev/null`
1305
1306                 if test "$rb_libruby" != ""; then
1307                         for i in $dirs; do
1308                                 if (test -r $i/$rb_libruby;) then
1309                                         RUBYLIB="$i"
1310                                         break;
1311                                 fi
1312                         done
1313                 fi
1314                 if test "$RUBYLIB" = ""; then
1315                         RUBYLIB="$RUBYDIR"
1316                         AC_MSG_RESULT(not found... using $RUBYDIR)
1317                 else
1318                         AC_MSG_RESULT($RUBYLINK in $RUBYLIB)
1319                 fi
1320         else
1321                 AC_MSG_RESULT(unable to determine ruby configuration)
1322                 RUBYINCLUDE="-I$RUBYDIR"
1323                 RUBYLIB="$RUBYDIR"
1324         fi
1325
1326         case $host in
1327                 *-*-mingw*) ;; # do nothing, the default windows libraries are already included
1328                 *) RUBYLINK="$RUBYLINK `($RUBY -rrbconfig -e 'print Config::CONFIG[["LIBS"]]') 2>/dev/null`";;
1329         esac
1330
1331         RUBYCCDLFLAGS=`($RUBY -rrbconfig -e 'print Config::CONFIG[["CCDLFLAGS"]]') 2>/dev/null`
1332 else
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"
1337 fi
1338
1339 case $host in
1340 *-*-cygwin* | *-*-mingw*)       RUBYDYNAMICLINKING="-L$RUBYLIB $RUBYLINK";;
1341 *)              RUBYDYNAMICLINKING="";;
1342 esac
1343 fi
1344
1345 AC_SUBST(RUBYINCLUDE)
1346 AC_SUBST(RUBYLIB)
1347 AC_SUBST(RUBYLINK)
1348 AC_SUBST(RUBYCCDLFLAGS)
1349 AC_SUBST(RUBYDYNAMICLINKING)
1350
1351 #-------------------------------------------------------------------------
1352 # Look for PHP
1353 #-------------------------------------------------------------------------
1354
1355 PHPBIN=
1356
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])
1359
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])
1363     PHP=
1364 else
1365
1366     if test "x$PHPBIN" = xyes; then
1367       AC_CHECK_PROGS(PHP, [php5 php])
1368     else
1369       PHP=$PHPBIN
1370     fi
1371
1372     AC_MSG_CHECKING(for PHP header files)
1373     dnl /usr/bin/php5 -> /usr/bin/php-config5
1374     case $PHP in
1375       *5)
1376         PHPCONFIG=`echo "$PHP"|sed 's/5$/-config5/'` ;;
1377       *)
1378         PHPCONFIG=$PHP-config ;;
1379     esac
1380     php_version=`$PHPCONFIG --version 2>/dev/null`
1381     case $php_version in
1382     5*) 
1383         PHPINC=`$PHPCONFIG --includes 2>/dev/null`
1384         if test -n "$PHPINC"; then
1385           AC_MSG_RESULT($PHPINC)
1386         else
1387           AC_MSG_RESULT(not found)
1388         fi
1389         ;;
1390     *)
1391         AC_MSG_RESULT([found PHP $version, but only PHP 5 is supported]) ;;
1392     esac
1393 fi
1394 AC_SUBST(PHP)
1395 AC_SUBST(PHPINC)
1396
1397 #----------------------------------------------------------------
1398 # Look for ocaml
1399 #----------------------------------------------------------------
1400
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=])
1407
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])
1411 OCAMLBIN=
1412 else
1413
1414 AC_MSG_CHECKING(for Ocaml DL load generator)
1415 if test -z "$OCAMLDLGEN"; then
1416 AC_CHECK_PROGS(OCAMLDLGEN, ocamldlgen, :)
1417 else
1418 OCAMLDLGEN="$OCAMLDLGEN"
1419 fi
1420
1421 AC_MSG_CHECKING(for Ocaml package tool)
1422 if test -z "$OCAMLFIND"; then
1423 AC_CHECK_PROGS(OCAMLFIND, ocamlfind, :)
1424 else
1425 OCAMLFIND="$OCAMLFIND"
1426 fi
1427
1428 AC_MSG_CHECKING(for Ocaml compiler)
1429 if test -z "$OCAMLC"; then
1430 AC_CHECK_PROGS(OCAMLC, ocamlc, :)
1431 else
1432 OCAMLC="$OCAMLC"
1433 fi
1434
1435 AC_MSG_CHECKING(for Ocaml interpreter)
1436 if test "x$OCAMLBIN" = xyes; then
1437 AC_CHECK_PROGS(OCAMLBIN, ocaml, :)
1438 else
1439 OCAMLBIN="$OCAMLBIN"
1440 fi
1441
1442 AC_MSG_CHECKING(for Ocaml toplevel creator)
1443 if test -z "$OCAMLMKTOP"; then
1444 AC_CHECK_PROGS(OCAMLMKTOP, ocamlmktop, :)
1445 else
1446 OCAMLMKTOP="$OCAMLMKTOP"
1447 fi
1448
1449 OCAMLLOC=loc
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"
1456         fi
1457         for i in $dirs; do
1458                 if test -r $i/mlvalues.h; then
1459                         AC_MSG_RESULT($i)
1460                         OCAMLEXT="$i"
1461                         OCAMLINC="-I$OCAMLEXT"
1462                         break;
1463                 fi
1464         done
1465         if test -z "$OCAMLINC"; then
1466                 AC_MSG_RESULT(not found)
1467         fi
1468
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)
1473 fi
1474 fi # Disabling ocaml
1475
1476 export OCAMLLOC
1477 export OCAMLVER
1478 export OCAMLINC
1479 export OCAMLBIN
1480 export OCAMLC
1481 export OCAMLDLGEN
1482 export OCAMLFIND
1483 export OCAMLMKTOP
1484
1485 AC_SUBST(OCAMLLOC)
1486 AC_SUBST(OCAMLVER)
1487 AC_SUBST(OCAMLINC)
1488 AC_SUBST(OCAMLBIN)
1489 AC_SUBST(OCAMLC)
1490 AC_SUBST(OCAMLDLGEN)
1491 AC_SUBST(OCAMLFIND)
1492 AC_SUBST(OCAMLMKTOP)
1493
1494 #----------------------------------------------------------------
1495 # Look for Pike
1496 #----------------------------------------------------------------
1497
1498 # Identify the name of the Pike executable
1499 # Priority: configure option, automatic search
1500 PIKEBIN=
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])
1503
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])
1507 PIKEBIN=
1508 else
1509
1510 if test "x$PIKEBIN" = xyes; then
1511         AC_CHECK_PROGS(PIKE, pike pike7.6 pike7.4 pike7.2)
1512 else
1513         PIKE="$PIKEBIN"
1514 fi
1515
1516
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=""])
1522
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)
1526 fi
1527
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=])
1533
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`
1538       fi
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"
1543       fi
1544
1545       if test -z "$PIKEINCLUDE"; then
1546               AC_MSG_RESULT(not found)
1547       else
1548               AC_MSG_RESULT($PIKEINCLUDE)
1549       fi
1550 fi
1551 fi
1552
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?
1556
1557 #----------------------------------------------------------------
1558 # Look for CHICKEN
1559 #----------------------------------------------------------------
1560
1561 CHICKEN=
1562 CHICKEN_CONFIG=
1563 CHICKENHOME=
1564 CHICKENOPTS=
1565 CHICKENLIB=
1566
1567
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])
1570
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])
1574 else
1575
1576 if test "x$CHICKENBIN" = xyes; then
1577 AC_CHECK_PROGS(CHICKEN, chicken)
1578 else
1579 CHICKEN="$CHICKENBIN"
1580 fi
1581
1582 AC_ARG_WITH(chickencsc,[  --with-chickencsc=path  Set location of csc executable],[ CHICKEN_CSC="$withval"], [CHICKEN_CSC=])
1583
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
1591       AC_MSG_RESULT(no)
1592     else
1593       AC_MSG_RESULT(yes)
1594     fi
1595   fi
1596 fi
1597
1598 AC_ARG_WITH(chickencsi,[  --with-chickencsi=path  Set location of csi executable],[ CHICKEN_CSI="$withval"], [CHICKEN_CSI=])
1599
1600 if test -z "$CHICKEN_CSI"; then
1601 AC_CHECK_PROGS(CHICKEN_CSI, csi)
1602 fi
1603
1604 if test -n "$CHICKEN_CSC" ; then
1605
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=])
1612
1613   AC_MSG_CHECKING(for compiler options for static CHICKEN generated code)
1614   if test -z "$CHICKENOPTS"; then
1615         CHICKENOPTS="`$CHICKEN_CSC -cflags`"
1616   else
1617         CHICKENOPTS="`$CHICKEN_CSC -cflags` $CHICKENOPTS"
1618   fi
1619   if test -z "$CHICKENOPTS"; then
1620         AC_MSG_RESULT(not found)
1621   else
1622         AC_MSG_RESULT($CHICKENOPTS)
1623   fi
1624
1625   AC_MSG_CHECKING(for linker options for shared CHICKEN generated code)
1626   if test -z "$CHICKENSHAREDLIB"; then
1627         CHICKENSHAREDLIB="`$CHICKEN_CSC -shared -libs`"
1628   else
1629         CHICKENSHAREDLIB="`$CHICKEN_CSC -shared -libs` $CHICKENSHAREDLIB"
1630   fi
1631   if test -z "$CHICKENSHAREDLIB"; then
1632         AC_MSG_RESULT(not found)
1633   else
1634         AC_MSG_RESULT($CHICKENSHAREDLIB)
1635   fi
1636
1637   AC_MSG_CHECKING(for linker options for static CHICKEN generated code)
1638   if test -z "$CHICKENLIB"; then
1639         CHICKENLIB="`$CHICKEN_CSC -libs`"
1640   else
1641         CHICKENLIB="`$CHICKEN_CSC -libs` $CHICKENLIB"
1642   fi
1643   if test -z "$CHICKENLIB"; then
1644         AC_MSG_RESULT(not found)
1645   else
1646         AC_MSG_RESULT($CHICKENLIB)
1647   fi
1648
1649 fi # have CHICKEN_CONFIG
1650 fi # Check for --without-chicken
1651
1652 AC_SUBST(CHICKEN)
1653 AC_SUBST(CHICKEN_CSC)
1654 AC_SUBST(CHICKEN_CSI)
1655 AC_SUBST(CHICKENOPTS)
1656 AC_SUBST(CHICKENLIB)
1657 AC_SUBST(CHICKENSHAREDLIB)
1658
1659 #----------------------------------------------------------------
1660 # Look for C#
1661 #----------------------------------------------------------------
1662
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=])
1666
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])
1670 CSHARPCOMPILER=
1671 else
1672
1673 if test -z "$CSHARPCOMPILERBIN" ; then
1674   case $host in
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
1682         AC_MSG_RESULT(no)
1683         AC_CHECK_PROGS(CSHARPCOMPILER, gmcs mcs cscc)
1684       else
1685         AC_MSG_RESULT(yes)
1686       fi
1687     fi
1688     ;;
1689   *)AC_CHECK_PROGS(CSHARPCOMPILER, gmcs mcs cscc);;
1690   esac
1691 else
1692   CSHARPCOMPILER="$CSHARPCOMPILERBIN"
1693 fi
1694
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)
1701   else
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#'
1707       CSHARPCOMPILER="";
1708       if test -n "$csharp_version_raw" ; then
1709         if test "$csharp_version_raw" = "$csharp_version_searched" ; then
1710           CSHARPCOMPILER="mcs"
1711         fi
1712       fi
1713       if test "mcs" != "$CSHARPCOMPILER" ; then
1714         echo "mcs is not a working Mono C# compiler"
1715       fi
1716     fi
1717     if test "mcs" = "$CSHARPCOMPILER" || test "gmcs" = "$CSHARPCOMPILER"; then
1718         AC_CHECK_PROGS(CSHARPCILINTERPRETER, mono) # Mono JIT
1719     else 
1720       if test "csc" = "$CSHARPCOMPILER"; then
1721           CSHARPPATHSEPARATOR="\\\\"
1722           CSHARPCYGPATH_W='cygpath -w'
1723       fi
1724     fi
1725   fi
1726 else
1727   CSHARPCILINTERPRETER="$CSHARPBIN"
1728 fi
1729
1730 # Cygwin requires the Windows standard (Pascal) calling convention as it is a Windows executable and not a Cygwin built executable
1731 case $host in
1732 *-*-cygwin* | *-*-mingw*)
1733     if test "$GCC" = yes; then
1734         CSHARPDYNAMICLINKING=" -mno-cygwin -mthreads -Wl,--add-stdcall-alias"
1735         CSHARPCFLAGS="-mno-cygwin -mthreads"
1736     else
1737         CSHARPDYNAMICLINKING=""
1738         CSHARPCFLAGS=""
1739     fi ;;
1740 *)
1741         CSHARPDYNAMICLINKING=""
1742         CSHARPCFLAGS=""
1743         ;;
1744 esac
1745
1746 # CSharp on Windows platforms including Cygwin doesn't use libname.dll, rather name.dll when loading dlls
1747 case $host in
1748 *-*-cygwin* | *-*-mingw*) CSHARPLIBRARYPREFIX="";;
1749 *)CSHARPLIBRARYPREFIX="lib";;
1750 esac
1751
1752 # C#/Mono on Mac OS X tweaks
1753 case $host in
1754 *-*-darwin*)
1755     CSHARPSO=".so"
1756     ;;
1757 *)
1758     CSHARPSO=$SO
1759     ;;
1760 esac
1761 fi
1762
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)
1770 AC_SUBST(CSHARPSO)
1771
1772 #----------------------------------------------------------------
1773 # Look for Lua
1774 #----------------------------------------------------------------
1775
1776 LUABIN=
1777 LUAINCLUDE=
1778 LUALIB=
1779 LUADYNAMICLOADLIB=
1780 LUAFLAGS=
1781 LUALINK=
1782 # note: if LUABIN is empty then lua tests will not be done
1783 # LUABIN will be cleared if certain dependencies cannot be found
1784
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=])
1791
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])
1795 else
1796
1797 # can we find lua?
1798 if test "x$LUABIN" = xyes; then
1799    AC_PATH_PROG(LUABIN, lua)
1800 fi
1801
1802 # check version: we need Lua 5.x
1803 if test "$LUABIN"; then
1804    AC_MSG_CHECKING(Lua version)
1805    # if version 5.x
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'`
1809
1810    if test -z "$LUAV5"; then
1811      AC_MSG_WARN(Not Lua 5.x, SWIG does not support this version of Lua)
1812      LUABIN=""
1813    elif test -z "$LUAV51"; then
1814      AC_MSG_RESULT(Lua 5.0.x)
1815    else
1816      AC_MSG_RESULT(Lua 5.1 or later)
1817    fi
1818 fi
1819
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'`
1826    else
1827      LUADYNAMICLOADLIB=`$LUABIN -e '_,_,c=package.loadlib("no_such_lib","") if c~="absent" then print "1" end'`
1828    fi
1829    
1830    if test -z "$LUADYNAMICLOADLIB"; then 
1831      AC_MSG_RESULT(no)
1832    else
1833      AC_MSG_RESULT(yes)
1834    fi
1835 fi
1836
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=])
1841 else
1842   LUA_OK="1"
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"
1849     for i in $dirs; do
1850       #echo "$i"
1851       if test -r $i/lua.h; then
1852         AC_MSG_RESULT($i/lua.h)
1853         LUAFLAGS="$ISYSTEM$i"
1854         break;
1855       fi
1856     done
1857     if test -z "$LUAFLAGS"; then
1858       AC_MSG_RESULT(not found)
1859       LUABIN="" # clear the bin
1860     fi
1861   fi
1862 fi
1863
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
1867         
1868 if test -n "$LUALIB"; then
1869   AC_CHECK_FILE($LUALIB/liblua.a,[LUALINK="-L$LUALIB -llua"],[LUABIN=])
1870 else
1871   AC_SEARCH_LIBS(lua_close, [lua lua51 lua5.1 lua50 lua5.0], [LUALINK="-l$ac_lib"],[LUABIN=])
1872 fi
1873
1874 # adding lualib for lua 5.0
1875 if test -z "$LUAV51"; then # extra for lua 5.0
1876   LUALINK="$LUALINK -llualib"
1877 fi
1878
1879 LIBS=$lua_save_LIBS     # restore LIBS
1880
1881 fi # if not disabled
1882
1883 AC_SUBST(LUADYNAMICLINKING)
1884 AC_SUBST(LUAFLAGS)
1885 AC_SUBST(LUALINK)
1886 AC_SUBST(LUABIN)
1887
1888 #----------------------------------------------------------------
1889 # Look for Allegro Common Lisp
1890 #----------------------------------------------------------------
1891
1892 ALLEGROCLBIN=
1893
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])
1896
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])
1900 ALLEGROCLBIN=
1901 else
1902
1903 # can we find allegrocl?
1904 if test "x$ALLEGROCLBIN" = xyes; then
1905    AC_PATH_PROG(ALLEGROCLBIN, alisp)
1906 fi
1907 fi
1908
1909 AC_SUBST(ALLEGROCLBIN)
1910
1911 #----------------------------------------------------------------
1912 # Look for GNU CLISP
1913 #----------------------------------------------------------------
1914
1915 CLISPBIN=
1916
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])
1919
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])
1923 CLISPBIN=
1924 else
1925
1926 # can we find clisp?
1927 if test "x$CLISPBIN" = xyes; then
1928    AC_PATH_PROG(CLISPBIN, clisp)
1929 fi
1930 fi
1931
1932 AC_SUBST(CLISPBIN)
1933
1934 #----------------------------------------------------------------
1935 # Look for GNU R
1936 #----------------------------------------------------------------
1937
1938 RBIN=
1939
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])
1942
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])
1946 RBIN=
1947 else
1948
1949 # can we find R?
1950 if test "x$RBIN" = xyes; then
1951    AC_PATH_PROG(RBIN, R)
1952 fi
1953 fi
1954
1955 AC_SUBST(RBIN)
1956
1957 #----------------------------------------------------------------
1958 # Determine which languages to use for examples/test-suite
1959 #----------------------------------------------------------------
1960
1961 SKIP_TCL=
1962 if test -z "$TCLINCLUDE" || test -z "$TCLLIB" ; then
1963     SKIP_TCL="1"
1964 fi
1965 AC_SUBST(SKIP_TCL)
1966
1967
1968 SKIP_PERL5=
1969 if test -z "$PERL" || test -z "$PERL5EXT" ; then
1970     SKIP_PERL5="1"
1971 fi
1972 AC_SUBST(SKIP_PERL5)
1973
1974
1975 SKIP_OCTAVE=
1976 if test -z "$OCTAVE" || test -z "$OCTAVEEXT" ; then
1977     SKIP_OCTAVE="1"
1978 fi
1979 AC_SUBST(SKIP_OCTAVE)
1980
1981
1982 SKIP_PYTHON=
1983 if (test -z "$PYINCLUDE" || test -z "$PYLIB") &&
1984    (test -z "$PY3INCLUDE" || test -z "PY3LIB") ; then
1985     SKIP_PYTHON="1"
1986 fi
1987 AC_SUBST(SKIP_PYTHON)
1988
1989 SKIP_PYTHON3=
1990 if test -z "$PY3INCLUDE" || test -z "$PY3LIB" ; then
1991     SKIP_PYTHON3="1"
1992 fi
1993 AC_SUBST(SKIP_PYTHON3)
1994
1995 SKIP_JAVA=
1996 if test -z "$JAVA" || test -z "$JAVAC" || test -z "$JAVAINC" ; then
1997     SKIP_JAVA="1"
1998 fi
1999 AC_SUBST(SKIP_JAVA)
2000
2001
2002 SKIP_GUILE=
2003 if test -z "$GUILEINCLUDE" || test -z "$GUILELIB" || test -z "$GUILE_GH_INTERFACE"; then
2004     SKIP_GUILE="1"
2005 fi
2006 AC_SUBST(SKIP_GUILE)
2007
2008 SKIP_GUILESCM=
2009 if test -z "$GUILEINCLUDE" || test -z "$GUILELIB" || test -z "$GUILE_SCM_INTERFACE"; then
2010     SKIP_GUILESCM="1"
2011 fi
2012 AC_SUBST(SKIP_GUILESCM)
2013
2014
2015 SKIP_MZSCHEME=
2016 if test -z "$MZC" || test -z "$MZDYNOBJ" ; then
2017     SKIP_MZSCHEME="1"
2018 fi
2019 AC_SUBST(SKIP_MZSCHEME)
2020
2021
2022 SKIP_RUBY=
2023 if test -z "$RUBY" || test -z "$RUBYINCLUDE" || test -z "$RUBYLIB" ; then
2024     SKIP_RUBY="1"
2025 fi
2026 AC_SUBST(SKIP_RUBY)
2027
2028
2029 SKIP_PHP=
2030 if test -z "$PHP" || test -z "$PHPINC" ; then
2031     SKIP_PHP="1"
2032 fi
2033 AC_SUBST(SKIP_PHP)
2034
2035
2036 SKIP_OCAML=
2037 if test -z "$OCAMLBIN" || test -z "$OCAMLINC" ; then
2038     SKIP_OCAML="1"
2039 fi
2040 AC_SUBST(SKIP_OCAML)
2041
2042
2043 SKIP_PIKE="1" # Always skipped!
2044 if test -z "$PIKE" || test -z "$PIKEINCLUDE" ; then
2045     SKIP_PIKE="1"
2046 fi
2047 AC_SUBST(SKIP_PIKE)
2048
2049
2050 SKIP_CHICKEN=
2051 if test -z "$CHICKEN_CSC" || test -z "$CHICKEN"; then
2052     SKIP_CHICKEN="1"
2053 fi
2054 AC_SUBST(SKIP_CHICKEN)
2055
2056
2057 SKIP_CSHARP=
2058 if test -z "$CSHARPCOMPILER" ; then
2059     SKIP_CSHARP="1"
2060 else
2061     if test "cscc" = "$CSHARPCOMPILER" && test -z "$CSHARPCILINTERPRETER" ; then
2062       SKIP_CSHARP="1"
2063     fi
2064 fi
2065 AC_SUBST(SKIP_CSHARP)
2066
2067 SKIP_MODULA3="1" # Always skipped!
2068 AC_SUBST(SKIP_MODULA3)
2069
2070 SKIP_LUA=
2071 # we need LUABIN & dynamic loading
2072 if test -z "$LUABIN" || test -z "$LUADYNAMICLOADLIB"; then
2073     SKIP_LUA="1"
2074 fi
2075 AC_SUBST(SKIP_LUA)
2076
2077 SKIP_ALLEGROCL=
2078 if test -z "$ALLEGROCLBIN" ; then
2079     SKIP_ALLEGROCL="1"
2080 fi
2081 AC_SUBST(SKIP_ALLEGROCL)
2082
2083 SKIP_CLISP=
2084 if test -z "$CLISPBIN" ; then
2085     SKIP_CLISP="1"
2086 fi
2087 AC_SUBST(SKIP_CLISP)
2088
2089 SKIP_R=
2090 if test -z "$RBIN" ; then
2091     SKIP_R="1"
2092 fi
2093 AC_SUBST(SKIP_R)
2094
2095 SKIP_CFFI=
2096 #if test -z "$CFFIBIN" ; then
2097     SKIP_CFFI="1"
2098 #fi
2099 AC_SUBST(SKIP_CFFI)
2100
2101 SKIP_UFFI=
2102 #if test -z "$UFFIBIN" ; then
2103     SKIP_UFFI="1"
2104 #fi
2105 AC_SUBST(SKIP_UFFI)
2106
2107 #----------------------------------------------------------------
2108 # Additional language dependencies
2109 #----------------------------------------------------------------
2110 SKIP_GCJ=
2111 if test -z "$GCJ" || test -z "$GCJH" ; then
2112   SKIP_GCJ="1"
2113 else
2114   if test "$GCC" != yes; then
2115     SKIP_GCJ="1"
2116   fi
2117 fi
2118 AC_SUBST(SKIP_GCJ)
2119
2120
2121 #----------------------------------------------------------------
2122 # Miscellaneous
2123 #----------------------------------------------------------------
2124
2125
2126 # Root directory
2127 # Translate path for native Windows compilers for use with 'make check'
2128 ROOT_DIR=`pwd`
2129 case $host in
2130 *-*-cygwin* | *-*-mingw*)
2131   if (cygpath --mixed $ROOT_DIR) >/dev/null 2>/dev/null; then
2132     ROOT_DIR=`cygpath --mixed $ROOT_DIR`
2133   fi
2134   # Extra files generated by some Windows compilers
2135   EXTRA_CLEAN="*.stackdump *.exp *.lib *.pdb *.ilk"
2136   ;;
2137 esac
2138
2139 AC_SUBST(ROOT_DIR)
2140 AC_SUBST(EXTRA_CLEAN)
2141 AC_SUBST(ac_aux_dir)
2142
2143 # Configure SWIG_LIB path
2144
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}"])
2147 AC_SUBST(swig_lib)
2148 AC_DEFINE_DIR(SWIG_LIB, swig_lib, [Directory for SWIG system-independent libraries])
2149
2150 case $host in
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="";;
2155 esac
2156 AC_DEFINE_UNQUOTED(SWIG_LIB_WIN_UNIX, ["$SWIG_LIB_WIN_UNIX"], [Directory for SWIG system-independent libraries (Unix install on native Windows)])
2157
2158 AC_CONFIG_FILES([                               \
2159     Makefile                                    \
2160     swig.spec                                   \
2161     Source/Makefile                             \
2162     Examples/Makefile                           \
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              \
2187     Lib/ocaml/swigp4.ml
2188 ])
2189 AC_CONFIG_FILES([preinst-swig], [chmod +x preinst-swig])
2190 AC_CONFIG_FILES([CCache/ccache_swig_config.h])
2191
2192 AC_OUTPUT
2193 dnl configure.in ends here