annotate lib/swig/swigwin-2.0.11/configure.ac @ 2241:9df0477a5e2b

restoring deleted line in mm7_4.cpp
author Grumpy7
date Sun, 23 Feb 2014 18:44:01 +0100
parents b3009adc0e2f
children
rev   line source
1899
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1 dnl Process this file with autoconf to produce a configure script.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2 dnl The macros which aren't shipped with the autotools are stored in the
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
3 dnl Tools/config directory in .m4 files.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
4
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
5 AC_INIT([swig],[2.0.11],[http://www.swig.org])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
6
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
7 dnl NB: When this requirement is increased to 2.60 or later, AC_PROG_SED
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
8 dnl definition below can be removed
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
9 AC_PREREQ(2.58)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
10
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
11 AC_CONFIG_SRCDIR([Source/Swig/swig.h])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
12 AC_CONFIG_AUX_DIR([Tools/config])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
13 AC_CONFIG_HEADERS([Source/Include/swigconfig.h])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
14 AC_CANONICAL_HOST
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
15 AM_INIT_AUTOMAKE
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
16
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
17 dnl Some extra defines for the config file
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
18 AH_BOTTOM([
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
19 /* Default language */
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
20 #define SWIG_LANG "-tcl"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
21
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
22 /* Deal with Microsofts attempt at deprecating C standard runtime functions */
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
23 #if defined(_MSC_VER)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
24 # define _CRT_SECURE_NO_DEPRECATE
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
25 #endif
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
26 ])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
27
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
28 dnl Check for programs that a user requires to build SWIG
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
29 AC_PROG_CC
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
30 AC_PROG_CXX
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
31 AC_EXEEXT
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
32 AC_OBJEXT
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
33 AM_PROG_CC_C_O # Needed for subdir-objects in AUTOMAKE_OPTIONS
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
34
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
35 AC_COMPILE_WARNINGS # Increase warning levels
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
36
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
37 AC_DEFINE_UNQUOTED(SWIG_CXX, ["$CXX"], [Compiler that built SWIG])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
38 AC_DEFINE_UNQUOTED(SWIG_PLATFORM, ["$host"], [Platform that SWIG is built for])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
39
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
40 dnl Checks for header files.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
41 AC_HEADER_STDC
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
42
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
43 dnl Checks for types.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
44 AC_LANG_PUSH([C++])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
45 AC_CHECK_TYPES([bool])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
46 AC_LANG_POP([C++])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
47
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
48 dnl Look for popen
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
49 AC_ARG_WITH(popen, AS_HELP_STRING([--without-popen], [Disable popen]), with_popen="$withval")
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
50 if test x"${with_popen}" = xno ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
51 AC_MSG_NOTICE([Disabling popen])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
52 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
53 AC_CHECK_FUNC(popen, AC_DEFINE(HAVE_POPEN, 1, [Define if popen is available]), AC_MSG_NOTICE([Disabling popen]))
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
54 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
55
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
56 dnl PCRE
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
57
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
58 dnl AX_PATH_GENERIC() relies on AC_PROG_SED() but it is defined only in
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
59 dnl autoconf 2.60 so trivially predefine it ourselves for the older versions
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
60 m4_ifdef([AC_PROG_SED],, [AC_DEFUN([AC_PROG_SED], [AC_PATH_PROG([SED], sed)])])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
61
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
62 AC_ARG_WITH([pcre],
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
63 [AS_HELP_STRING([--without-pcre],
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
64 [Disable support for regular expressions using PCRE])],
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
65 [],
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
66 [with_pcre=yes])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
67
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
68 AC_MSG_CHECKING([whether to enable PCRE support])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
69 AC_MSG_RESULT([$with_pcre])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
70
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
71 dnl To make configuring easier, check for a locally built PCRE using the Tools/pcre-build.sh script
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
72 if test x"${with_pcre}" = xyes ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
73 AC_MSG_CHECKING([whether to use local PCRE])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
74 local_pcre_config=no
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
75 if test -z $PCRE_CONFIG; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
76 if test -f `pwd`/pcre/pcre-swig-install/bin/pcre-config; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
77 PCRE_CONFIG=`pwd`/pcre/pcre-swig-install/bin/pcre-config
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
78 local_pcre_config=$PCRE_CONFIG
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
79 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
80 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
81 AC_MSG_RESULT([$local_pcre_config])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
82 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
83 AS_IF([test "x$with_pcre" != xno],
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
84 [AX_PATH_GENERIC([pcre],
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
85 [], dnl Minimal version of PCRE we need -- accept any
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
86 [], dnl custom sed script for version parsing is not needed
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
87 [AC_DEFINE([HAVE_PCRE], [1], [Define if you have PCRE library])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
88 LIBS="$LIBS $PCRE_LIBS"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
89 CPPFLAGS="$CPPFLAGS $PCRE_CFLAGS"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
90 ],
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
91 [AC_MSG_FAILURE([
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
92 Cannot find pcre-config script from PCRE (Perl Compatible Regular Expressions)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
93 library package. This dependency is needed for configure to complete,
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
94 Either:
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
95 - Install the PCRE developer package on your system (preferred approach).
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
96 - Download the PCRE source tarball, build and install on your system
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
97 as you would for any package built from source distribution.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
98 - Use the Tools/pcre-build.sh script to build PCRE just for SWIG to statically
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
99 link against. Run 'Tools/pcre-build.sh --help' for instructions.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
100 (quite easy and does not require privileges to install PCRE on your system)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
101 - Use configure --without-pcre to disable regular expressions support in SWIG
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
102 (not recommended).])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
103 ])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
104 ])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
105
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
106
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
107 dnl CCache
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
108 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])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
109 AC_MSG_CHECKING([whether to enable ccache-swig])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
110 AC_MSG_RESULT([$enable_ccache])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
111
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
112 if test "$enable_ccache" = yes; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
113 AC_CONFIG_SUBDIRS(CCache)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
114 ENABLE_CCACHE=1
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
115 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
116 AC_SUBST(ENABLE_CCACHE)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
117
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
118
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
119 echo ""
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
120 echo "Checking packages required for SWIG developers."
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
121 echo "Note : None of the following packages are required for users to compile and install SWIG from the distributed tarball"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
122 echo ""
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
123
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
124 AC_PROG_YACC
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
125 AC_PROG_RANLIB
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
126 AC_CHECK_PROGS(AR, ar aal, ar)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
127 AC_SUBST(AR)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
128 AC_CHECK_PROGS(YODL2MAN, yodl2man)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
129 AC_CHECK_PROGS(YODL2HTML, yodl2html)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
130
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
131 if test -n "$YODL2MAN"; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
132 AC_MSG_CHECKING([yodl2man version >= 2.02])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
133 yodl_version=`$YODL2MAN --version 2>&1 | grep 'yodl version' | sed 's/.*\([0-9][0-9]*\.[0-9][0-9]*\.*[0-9]*\).*/\1/g'`
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
134 AX_COMPARE_VERSION([$yodl_version],[ge],[2.02], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no - $yodl_version found])])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
135 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
136
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
137 if test -n "$YODL2HTML"; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
138 AC_MSG_CHECKING([yodl2html version >= 2.02])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
139 yodl_version=`$YODL2HTML --version 2>&1 | grep 'yodl version' | sed 's/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/g'`
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
140 AX_COMPARE_VERSION([$yodl_version],[ge],[2.02], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no - $yodl_version found])])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
141 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
142
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
143 echo ""
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
144 echo "Checking for installed target languages and other information in order to compile and run"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
145 echo "the examples and test-suite invoked by 'make check'."
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
146 echo "Note : None of the following packages are required for users to compile and install SWIG from the distributed tarball"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
147 echo ""
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
148
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
149 dnl Some test cases require Boost
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
150 AX_BOOST_BASE(,,,)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
151 AC_SUBST(BOOST_CPPFLAGS)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
152
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
153 dnl How to specify include directories that may be system directories.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
154 # -I should not be used on system directories (GCC)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
155 if test "$GCC" = yes; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
156 ISYSTEM="-isystem "
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
157 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
158 ISYSTEM="-I"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
159 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
160 AC_MSG_NOTICE(ISYSTEM: $ISYSTEM)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
161
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
162 dnl Info for building shared libraries ... in order to run the examples
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
163
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
164 # SO is the extension of shared libraries (including the dot!)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
165 AC_MSG_CHECKING(SO)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
166 if test -z "$SO"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
167 then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
168 case $host in
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
169 *-*-hp*) SO=.sl;;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
170 *-*-darwin*) SO=.bundle;;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
171 *-*-cygwin* | *-*-mingw*) SO=.dll;;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
172 *) SO=.so;;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
173 esac
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
174 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
175 AC_MSG_RESULT($SO)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
176
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
177 # LDSHARED is the ld *command* used to create shared library
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
178 # -- "ld" on SunOS 4.x.x, "ld -G" on SunOS 5.x, "ld -shared" on IRIX 5
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
179 # (Shared libraries in this instance are shared modules to be loaded into
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
180 # Python, as opposed to building Python itself as a shared library.)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
181 AC_MSG_CHECKING(LDSHARED)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
182 if test -z "$LDSHARED"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
183 then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
184 case $host in
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
185 *-*-aix*) LDSHARED="\$(srcdir)/ld_so_aix \$(CC)";;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
186 *-*-cygwin* | *-*-mingw*)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
187 if test "$GCC" = yes; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
188 LDSHARED="$CC -shared"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
189 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
190 if test "cl" = $CC ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
191 # Microsoft Visual C++ (MSVC)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
192 LDSHARED="$CC -nologo -LD"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
193 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
194 # Unknown compiler try gcc approach
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
195 LDSHARED="$CC -shared"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
196 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
197 fi ;;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
198 *-*-irix5*) LDSHARED="ld -shared";;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
199 *-*-irix6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
200 *-*-sunos4*) LDSHARED="ld";;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
201 *-*-solaris*) LDSHARED="ld -G";;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
202 *-*-hp*) LDSHARED="ld -b";;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
203 *-*-osf*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
204 *-sequent-sysv4) LDSHARED="ld -G";;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
205 *-*-next*)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
206 if test "$ns_dyld"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
207 then LDSHARED='$(CC) $(LDFLAGS) -bundle -prebind'
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
208 else LDSHARED='$(CC) $(CFLAGS) -nostdlib -r'
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
209 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
210 if test "$with_next_framework" ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
211 LDSHARED="$LDSHARED \$(LDLIBRARY)"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
212 fi ;;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
213 *-*-linux*) LDSHARED="gcc -shared";;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
214 *-*-dgux*) LDSHARED="ld -G";;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
215 *-*-freebsd3*) LDSHARED="gcc -shared";;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
216 *-*-freebsd* | *-*-openbsd*) LDSHARED="ld -Bshareable";;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
217 *-*-netbsd*)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
218 if [[ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]]
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
219 then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
220 LDSHARED="cc -shared"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
221 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
222 LDSHARED="ld -Bshareable"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
223 fi;;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
224 *-sco-sysv*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
225 *-*-darwin*) LDSHARED="cc -bundle -undefined suppress -flat_namespace";;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
226 *) LDSHARED="ld";;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
227 esac
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
228 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
229 AC_MSG_RESULT($LDSHARED)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
230 # CXXSHARED is the ld *command* used to create C++ shared library
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
231 # -- "ld" on SunOS 4.x.x, "ld -G" on SunOS 5.x, "ld -shared" on IRIX 5
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
232 # (Shared libraries in this instance are shared modules to be loaded into
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
233 # Python, as opposed to building Python itself as a shared library.)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
234 AC_MSG_CHECKING(CXXSHARED)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
235 if test -z "$CXXSHARED"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
236 then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
237 CXXSHARED="$LDSHARED"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
238 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
239 AC_MSG_RESULT($CXXSHARED)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
240
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
241 #
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
242 AC_MSG_CHECKING(TRYLINKINGWITHCXX)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
243 if test -z "$TRYLINKINGWITHCXX"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
244 then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
245 case $host in
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
246 *-*-solaris*) if test "$GCC" = yes
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
247 then TRYLINKINGWITHCXX="CXXSHARED= $CXX -Wl,-G"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
248 else TRYLINKINGWITHCXX="CXXSHARED= $CXX -G -L/opt/SUNWspro/lib -lCrun -lCstd"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
249 fi;;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
250 *-*-hp*) TRYLINKINGWITHCXX="CXXSHARED= $CXX +z ";;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
251 *-*-darwin*) TRYLINKINGWITHCXX="CXXSHARED= $CXX -bundle -undefined suppress -flat_namespace";;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
252 *-*-cygwin* | *-*-mingw*)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
253 if test "$GCC" = yes; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
254 TRYLINKINGWITHCXX="CXXSHARED= $CXX -shared "
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
255 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
256 if test "cl" = $CXX ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
257 # Microsoft Visual C++ (MSVC)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
258 TRYLINKINGWITHCXX="CXXSHARED= $CXX -nologo -LD"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
259 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
260 TRYLINKINGWITHCXX="#unknown Windows compiler"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
261 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
262 fi ;;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
263 *) TRYLINKINGWITHCXX="CXXSHARED= $CXX -shared ";;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
264 esac
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
265 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
266 AC_MSG_RESULT($TRYLINKINGWITHCXX)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
267 # CCSHARED are the C *flags* used to create objects to go into a shared
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
268 # library (module) -- this is only needed for a few systems
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
269 AC_MSG_CHECKING(CCSHARED)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
270 if test -z "$CCSHARED"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
271 then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
272 case $host in
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
273 *-*-hp*) if test "$GCC" = yes
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
274 then CCSHARED="-fpic"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
275 else CCSHARED="+z"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
276 fi;;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
277 *-*-linux*) CCSHARED="-fpic";;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
278 *-*-freebsd* | *-*-openbsd*) CCSHARED="-fpic";;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
279 *-*-netbsd*) CCSHARED="-fPIC";;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
280 *-sco-sysv*) CCSHARED="-KPIC -dy -Bdynamic";;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
281 *-*-irix6*) case $CC in
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
282 *gcc*) CCSHARED="-shared";;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
283 *) CCSHARED="";;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
284 esac;;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
285 esac
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
286 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
287 AC_MSG_RESULT($CCSHARED)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
288
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
289 # RPATH is the path used to look for shared library files.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
290 AC_MSG_CHECKING(RPATH)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
291 if test -z "$RPATH"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
292 then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
293 case $host in
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
294 *-*-solaris*) RPATH='-R. -R$(exec_prefix)/lib';;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
295 *-*-irix*) RPATH='-rpath .:$(exec_prefix)/lib';;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
296 *-*-linux*) RPATH='-Xlinker -rpath $(exec_prefix)/lib -Xlinker -rpath .';;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
297 *) RPATH='';;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
298 esac
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
299 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
300 AC_MSG_RESULT($RPATH)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
301
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
302 # LINKFORSHARED are the flags passed to the $(CC) command that links
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
303 # the a few executables -- this is only needed for a few systems
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
304
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
305 AC_MSG_CHECKING(LINKFORSHARED)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
306 if test -z "$LINKFORSHARED"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
307 then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
308 case $host in
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
309 *-*-aix*) LINKFORSHARED='-Wl,-bE:$(srcdir)/python.exp -lld';;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
310 *-*-hp*)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
311 LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
312 *-*-linux*) LINKFORSHARED="-Xlinker -export-dynamic";;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
313 *-*-next*) LINKFORSHARED="-u libsys_s";;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
314 *-sco-sysv*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
315 *-*-irix6*) LINKFORSHARED="-all";;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
316 esac
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
317 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
318 AC_MSG_RESULT($LINKFORSHARED)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
319
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
320 # Optional CFLAGS used to silence/enhance compiler warnings on some platforms.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
321 AC_MSG_CHECKING(PLATFLAGS)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
322 case $host in
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
323 *-*-solaris*) if test "$GCC" = yes
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
324 then PLATFLAGS=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
325 else PLATFLAGS=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
326 # else PLATFLAGS="-errtags=yes" # Need more work as C examples use ld for linking
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
327 fi;;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
328 *) PLATFLAGS=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
329 esac
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
330 AC_MSG_RESULT($PLATFLAGS)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
331
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
332 # Set info about shared libraries.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
333 AC_SUBST(SO)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
334 AC_SUBST(LDSHARED)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
335 AC_SUBST(CCSHARED)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
336 AC_SUBST(CXXSHARED)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
337 AC_SUBST(TRYLINKINGWITHCXX)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
338 AC_SUBST(RPATH)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
339 AC_SUBST(PLATFLAGS)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
340 AC_SUBST(LINKFORSHARED)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
341
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
342 # This variation is needed on OS-X because there is no (apparent) consistency in shared library naming.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
343 # Sometimes .bundle works, but sometimes .so is needed. It depends on the target language
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
344
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
345 AC_SUBST(PYTHON_SO)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
346 case $host in
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
347 *-*-mingw*) PYTHON_SO=.pyd;;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
348 *-*-darwin*) PYTHON_SO=.so;;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
349 *) PYTHON_SO=$SO;;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
350 esac
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
351
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
352 AC_SUBST(TCL_SO)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
353 case $host in
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
354 *-*-darwin*) TCL_SO=.dylib;;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
355 *) TCL_SO=$SO;;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
356 esac
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
357
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
358 AC_SUBST(GUILE_SO)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
359 case $host in
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
360 *-*-darwin*) GUILE_SO=.so;;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
361 *) GUILE_SO=$SO;;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
362 esac
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
363
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
364 AC_SUBST(PHP_SO)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
365 case $host in
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
366 *-*-darwin*) PHP_SO=.so;;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
367 *) PHP_SO=$SO;;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
368 esac
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
369
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
370 AC_SUBST(MZSCHEME_SO)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
371 case $host in
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
372 *) MZSCHEME_SO=.so;;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
373 esac
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
374
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
375 AC_SUBST(LUA_SO)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
376 case $host in
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
377 *-*-darwin*) LUA_SO=.so;;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
378 *) LUA_SO=$SO;;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
379 esac
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
380
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
381 # Check for specific libraries. Used for SWIG examples
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
382 AC_CHECK_LIB(dl, dlopen) # Dynamic linking for SunOS/Solaris and SYSV
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
383 AC_CHECK_LIB(dld, shl_load) # Dynamic linking for HP-UX
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
384
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
385 dnl The following three libraries (nsl,inet,socket) are needed on Sequent,
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
386 dnl and must be checked for in this order since each library depends on the
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
387 dnl preceding one.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
388 dnl
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
389 dnl Most SVR4 platforms will need -lsocket and -lnsl. However on SGI IRIX 5,
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
390 dnl these exist but are broken, so we use AC_SEARCH_LIBS which will only try
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
391 dnl the library if the function isn't already available without it.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
392 AC_SEARCH_LIBS(t_open, nsl) # SVR4
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
393 AC_SEARCH_LIBS(gethostbyname, inet) # Sequent
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
394 AC_SEARCH_LIBS(socket, socket) # SVR4 sockets
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
395
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
396 AC_CHECK_LIB(swill, swill_init, [SWIGLIBS="-lswill $LIBS" SWILL="-DSWIG_SWILL"])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
397 AC_SUBST(SWIGLIBS)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
398 AC_SUBST(SWILL)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
399
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
400 # check for --with-libm=...
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
401 AC_SUBST(LIBM)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
402 LIBM=-lm
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
403 AC_ARG_WITH(libm, [ --with-libm=STRING math library], [
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
404 if test "$withval" != yes
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
405 then LIBM=$withval
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
406 else AC_MSG_ERROR([proper usage is --with-libm=STRING])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
407 fi])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
408 AC_CHECK_LIB(ieee, main, [LIBM="-lieee $LIBM"])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
409 AC_CHECK_LIB(crypt,crypt, [LIBCRYPT="-lcrypt"])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
410 AC_SUBST(LIBCRYPT)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
411
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
412 # check for --with-libc=...
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
413 AC_SUBST(LIBC)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
414 AC_ARG_WITH(libc, [ --with-libc=STRING C library], [
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
415 if test "$withval" != yes
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
416 then LIBC=$withval
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
417 else AC_MSG_ERROR([proper usage is --with-libc=STRING])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
418 fi])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
419
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
420 #--------------------------------------------------------------------
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
421 # Locate the X11 header files and the X11 library archive. Try
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
422 # the ac_path_x macro first, but if it doesn't find the X stuff
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
423 # (e.g. because there's no xmkmf program) then check through
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
424 # a list of possible directories. Under some conditions the
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
425 # autoconf macro will return an include directory that contains
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
426 # no include files, so double-check its result just to be safe.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
427 #--------------------------------------------------------------------
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
428
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
429 AC_PATH_X
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
430 not_really_there=""
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
431 if test "$no_x" = ""; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
432 if test "$x_includes" = ""; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
433 AC_TRY_CPP([#include <X11/XIntrinsic.h>], , not_really_there="yes")
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
434 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
435 if test ! -r $x_includes/X11/Intrinsic.h; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
436 not_really_there="yes"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
437 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
438 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
439 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
440 if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
441 AC_MSG_CHECKING(for X11 header files)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
442 XINCLUDES="# no special path needed"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
443 AC_TRY_CPP([#include <X11/Intrinsic.h>], , XINCLUDES="")
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
444 if test -z "$XINCLUDES"; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
445 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"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
446 for i in $dirs ; do
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
447 if test -r $i/X11/Intrinsic.h; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
448 XINCLUDES=" -I$i"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
449 break
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
450 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
451 done
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
452 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
453 AC_MSG_RESULT($XINCLUDES)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
454 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
455 if test "$x_includes" != ""; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
456 XINCLUDES=-I$x_includes
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
457 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
458 XINCLUDES="# no special path needed"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
459 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
460 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
461 if test -z "$XINCLUDES"; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
462 AC_MSG_RESULT(couldn't find any!)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
463 XINCLUDES="# no include files found"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
464 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
465
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
466 if test "$no_x" = yes; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
467 AC_MSG_CHECKING(for X11 libraries)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
468 XLIBSW=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
469 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"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
470 for i in $dirs ; do
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
471 if test -r $i/libX11.a -o -r $i/libX11.so -o -r $i/libX11.sl; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
472 AC_MSG_RESULT($i)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
473 XLIBSW="-L$i -lX11"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
474 break
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
475 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
476 done
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
477 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
478 if test "$x_libraries" = ""; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
479 XLIBSW=-lX11
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
480 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
481 XLIBSW="-L$x_libraries -lX11"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
482 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
483 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
484 if test -z "$XLIBSW" ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
485 AC_CHECK_LIB(Xwindow, XCreateWindow, XLIBSW=-lXwindow)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
486 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
487 if test -z "$XLIBSW" ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
488 AC_MSG_RESULT(couldn't find any! Using -lX11.)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
489 XLIBSW=-lX11
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
490 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
491
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
492 AC_SUBST(XINCLUDES)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
493 AC_SUBST(XLIBSW)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
494
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
495 AC_ARG_WITH(alllang, AS_HELP_STRING([--without-alllang], [Disable all languages]), with_alllang="$withval")
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
496
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
497 #--------------------------------------------------------------------
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
498 # Look for Tcl
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
499 #--------------------------------------------------------------------
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
500
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
501 TCLINCLUDE=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
502 TCLLIB=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
503 TCLPACKAGE=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
504
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
505 AC_ARG_WITH(tclconfig, AS_HELP_STRING([--without-tcl], [Disable Tcl])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
506 AS_HELP_STRING([--with-tclconfig=path], [Set location of tclConfig.sh]), [with_tclconfig="$withval"], [with_tclconfig=])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
507 AC_ARG_WITH(tcl,
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
508 [ --with-tcl=path Set location of Tcl package],[
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
509 TCLPACKAGE="$withval"], [TCLPACKAGE=yes])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
510 AC_ARG_WITH(tclincl,[ --with-tclincl=path Set location of Tcl include directory],[
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
511 TCLINCLUDE="$ISYSTEM$withval"], [TCLINCLUDE=])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
512 AC_ARG_WITH(tcllib,[ --with-tcllib=path Set location of Tcl library directory],[
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
513 TCLLIB="-L$withval"], [TCLLIB=])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
514
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
515 # First, check for "--without-tcl" or "--with-tcl=no".
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
516 if test x"${TCLPACKAGE}" = xno -o x"${with_alllang}" = xno; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
517 AC_MSG_NOTICE([Disabling Tcl])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
518 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
519 AC_MSG_CHECKING([for Tcl configuration])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
520 # First check to see if --with-tclconfig was specified.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
521 if test x"${with_tclconfig}" != x ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
522 if test -f "${with_tclconfig}/tclConfig.sh" ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
523 TCLCONFIG=`(cd ${with_tclconfig}; pwd)`
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
524 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
525 AC_MSG_ERROR([${with_tcl} directory doesn't contain tclConfig.sh])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
526 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
527 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
528 # check in a few common install locations
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
529 if test x"${TCLCONFIG}" = x ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
530 for i in `ls -d /usr/lib/ 2>/dev/null` \
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
531 `ls -d -r /usr/lib/tcl*/ 2>/dev/null` \
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
532 `ls -d /usr/local/lib/ 2>/dev/null` \
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
533 `ls -d -r /usr/local/lib/tcl*/ 2>/dev/null` ; do
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
534 if test -f $i"tclConfig.sh" ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
535 TCLCONFIG=`(cd $i; pwd)`
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
536 break
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
537 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
538 done
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
539 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
540 if test x"${TCLCONFIG}" = x ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
541 AC_MSG_RESULT(no)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
542 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
543 AC_MSG_RESULT(found $TCLCONFIG/tclConfig.sh)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
544 . $TCLCONFIG/tclConfig.sh
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
545 if test -z "$TCLINCLUDE"; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
546 TCLINCLUDE=`echo $TCL_INCLUDE_SPEC | sed "s/-I/$ISYSTEM/"`
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
547 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
548 if test -z "$TCLLIB"; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
549 TCLLIB=$TCL_LIB_SPEC
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
550 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
551 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
552
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
553 if test -z "$TCLINCLUDE"; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
554 if test "x$TCLPACKAGE" != xyes; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
555 TCLINCLUDE="$ISYSTEM$TCLPACKAGE/include"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
556 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
557 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
558
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
559 if test -z "$TCLLIB"; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
560 if test "x$TCLPACKAGE" != xyes; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
561 TCLLIB="-L$TCLPACKAGE/lib -ltcl"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
562 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
563 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
564
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
565 AC_MSG_CHECKING(for Tcl header files)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
566 if test -z "$TCLINCLUDE"; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
567 AC_TRY_CPP([#include <tcl.h>], , TCLINCLUDE="")
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
568 if test -z "$TCLINCLUDE"; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
569 dirs="/usr/local/include /usr/include /opt/local/include"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
570 for i in $dirs ; do
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
571 if test -r $i/tcl.h; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
572 AC_MSG_RESULT($i)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
573 TCLINCLUDE="$ISYSTEM$i"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
574 break
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
575 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
576 done
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
577 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
578 if test -z "$TCLINCLUDE"; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
579 AC_MSG_RESULT(not found)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
580 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
581 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
582 AC_MSG_RESULT($TCLINCLUDE)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
583 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
584
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
585 AC_MSG_CHECKING(for Tcl library)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
586 if test -z "$TCLLIB"; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
587 dirs="/usr/local/lib /usr/lib /opt/local/lib"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
588 for i in $dirs ; do
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
589 if test -r $i/libtcl.a; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
590 AC_MSG_RESULT($i)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
591 TCLLIB="-L$i -ltcl"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
592 break
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
593 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
594 done
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
595 if test -z "$TCLLIB"; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
596 AC_MSG_RESULT(not found)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
597 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
598 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
599 AC_MSG_RESULT($TCLLIB)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
600 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
601
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
602 # Cygwin (Windows) needs the library for dynamic linking
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
603 case $host in
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
604 *-*-cygwin* | *-*-mingw*) TCLDYNAMICLINKING="$TCLLIB";;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
605 *)TCLDYNAMICLINKING="";;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
606 esac
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
607
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
608 case $host in
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
609 *-*-darwin*)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
610 TCLLDSHARED='$(CC) -dynamiclib -undefined suppress -flat_namespace'
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
611 TCLCXXSHARED='$(CXX) -dynamiclib -undefined suppress -flat_namespace'
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
612 ;;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
613 *)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
614 TCLLDSHARED='$(LDSHARED)'
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
615 TCLCXXSHARED='$(CXXSHARED)'
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
616 ;;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
617 esac
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
618
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
619 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
620
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
621 AC_SUBST(TCLINCLUDE)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
622 AC_SUBST(TCLLIB)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
623 AC_SUBST(TCLDYNAMICLINKING)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
624 AC_SUBST(TCLLDSHARED)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
625 AC_SUBST(TCLCXXSHARED)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
626
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
627 #----------------------------------------------------------------
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
628 # Look for Python
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
629 #----------------------------------------------------------------
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
630
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
631 PYINCLUDE=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
632 PYLIB=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
633 PYPACKAGE=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
634
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
635 AC_ARG_WITH(python, AS_HELP_STRING([--without-python], [Disable Python])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
636 AS_HELP_STRING([--with-python=path], [Set location of Python executable]),[ PYBIN="$withval"], [PYBIN=yes])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
637
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
638 # First, check for "--without-python" or "--with-python=no".
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
639 if test x"${PYBIN}" = xno -o x"${with_alllang}" = xno ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
640 AC_MSG_NOTICE([Disabling Python])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
641 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
642 # First figure out the name of the Python executable
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
643 if test "x$PYBIN" = xyes; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
644 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])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
645 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
646 PYTHON="$PYBIN"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
647 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
648
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
649 if test -n "$PYTHON"; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
650 AC_MSG_CHECKING(for Python prefix)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
651 PYPREFIX=`($PYTHON -c "import sys; print sys.prefix") 2>/dev/null`
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
652 AC_MSG_RESULT($PYPREFIX)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
653 AC_MSG_CHECKING(for Python exec-prefix)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
654 PYEPREFIX=`($PYTHON -c "import sys; print sys.exec_prefix") 2>/dev/null`
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
655 AC_MSG_RESULT($PYEPREFIX)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
656
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
657
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
658 # Note: I could not think of a standard way to get the version string from different versions.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
659 # This trick pulls it out of the file location for a standard library file.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
660
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
661 AC_MSG_CHECKING(for Python version)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
662
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
663 # Need to do this hack since autoconf replaces __file__ with the name of the configure file
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
664 filehack="file__"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
665 PYVERSION=`($PYTHON -c "import string,operator,os.path; print operator.getitem(os.path.split(operator.getitem(os.path.split(string.__$filehack),0)),1)")`
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
666 AC_MSG_RESULT($PYVERSION)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
667
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
668 # Find the directory for libraries this is necessary to deal with
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
669 # platforms that can have apps built for multiple archs: e.g. x86_64
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
670 AC_MSG_CHECKING(for Python lib dir)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
671 PYLIBDIR=`($PYTHON -c "import sys; print sys.lib") 2>/dev/null`
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
672 if test -z "$PYLIBDIR"; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
673 # Fedora patch Python to add sys.lib, for other distros we assume "lib".
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
674 PYLIBDIR="lib"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
675 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
676 AC_MSG_RESULT($PYLIBDIR)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
677
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
678 # Set the include directory
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
679
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
680 AC_MSG_CHECKING(for Python header files)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
681 if test -r $PYPREFIX/include/$PYVERSION/Python.h; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
682 PYINCLUDE="-I$PYPREFIX/include/$PYVERSION -I$PYEPREFIX/$PYLIBDIR/$PYVERSION/config"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
683 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
684 if test -z "$PYINCLUDE"; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
685 if test -r $PYPREFIX/include/Py/Python.h; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
686 PYINCLUDE="-I$PYPREFIX/include/Py -I$PYEPREFIX/$PYLIBDIR/python/lib"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
687 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
688 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
689 AC_MSG_RESULT($PYINCLUDE)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
690
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
691 # Set the library directory blindly. This probably won't work with older versions
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
692 AC_MSG_CHECKING(for Python library)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
693 dirs="$PYVERSION/config $PYVERSION/$PYLIBDIR python/$PYLIBDIR"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
694 for i in $dirs; do
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
695 if test -d $PYEPREFIX/$PYLIBDIR/$i; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
696 PYLIB="$PYEPREFIX/$PYLIBDIR/$i"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
697 break
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
698 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
699 done
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
700 if test -z "$PYLIB"; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
701 AC_MSG_RESULT(Not found)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
702 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
703 AC_MSG_RESULT($PYLIB)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
704 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
705
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
706 PYLINK="-l$PYVERSION"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
707 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
708
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
709 # Cygwin (Windows) needs the library for dynamic linking
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
710 case $host in
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
711 *-*-cygwin* | *-*-mingw*)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
712 PYTHONDYNAMICLINKING="-L$PYLIB $PYLINK"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
713 DEFS="-DUSE_DL_IMPORT $DEFS"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
714 ;;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
715 *)PYTHONDYNAMICLINKING="";;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
716 esac
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
717 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
718
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
719 AC_SUBST(PYINCLUDE)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
720 AC_SUBST(PYLIB)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
721 AC_SUBST(PYLINK)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
722 AC_SUBST(PYTHONDYNAMICLINKING)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
723
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
724
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
725 #----------------------------------------------------------------
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
726 # Look for Python 3.x
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
727 #----------------------------------------------------------------
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
728
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
729 # mostly copy & pasted from "Look for Python" section,
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
730 # did some trim, fix and rename
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
731
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
732 PY3INCLUDE=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
733 PY3LIB=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
734 PY3PACKAGE=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
735
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
736 AC_ARG_WITH(python3, AS_HELP_STRING([--without-python3], [Disable Python 3.x support])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
737 AS_HELP_STRING([--with-python3=path], [Set location of Python 3.x executable]),[ PY3BIN="$withval"], [PY3BIN=yes])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
738
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
739 # First, check for "--without-python3" or "--with-python3=no".
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
740 if test x"${PY3BIN}" = xno -o x"${with_alllang}" = xno ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
741 AC_MSG_NOTICE([Disabling Python 3.x support])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
742 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
743 for py_ver in 3 3.6 3.5 3.4 3.3 3.2 3.1 3.0; do
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
744 AC_CHECK_PROGS(PYTHON3, [python$py_ver])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
745 if test -n "$PYTHON3"; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
746 AC_CHECK_PROGS(PY3CONFIG, [$PYTHON3-config])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
747 if test -n "$PY3CONFIG"; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
748 break
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
749 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
750 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
751 done
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
752
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
753 if test -n "$PYTHON3" -a -n "$PY3CONFIG"; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
754 AC_MSG_CHECKING([for Python 3.x prefix])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
755 PY3PREFIX=`($PY3CONFIG --prefix) 2>/dev/null`
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
756 AC_MSG_RESULT($PY3PREFIX)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
757 AC_MSG_CHECKING(for Python 3.x exec-prefix)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
758 PY3EPREFIX=`($PY3CONFIG --exec-prefix) 2>/dev/null`
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
759 AC_MSG_RESULT($PY3EPREFIX)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
760
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
761 # Note: I could not think of a standard way to get the version string from different versions.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
762 # This trick pulls it out of the file location for a standard library file.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
763
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
764 AC_MSG_CHECKING([for Python 3.x version])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
765
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
766 # Need to do this hack since autoconf replaces __file__ with the name of the configure file
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
767 filehack="file__"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
768 PY3VERSION=`($PYTHON3 -c "import string,operator,os.path; print(operator.getitem(os.path.split(operator.getitem(os.path.split(string.__$filehack),0)),1))")`
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
769 AC_MSG_RESULT($PY3VERSION)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
770
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
771 # Find the directory for libraries this is necessary to deal with
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
772 # platforms that can have apps built for multiple archs: e.g. x86_64
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
773 AC_MSG_CHECKING([for Python 3.x lib dir])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
774 PY3LIBDIR=`($PYTHON3 -c "import sys; print(sys.lib)") 2>/dev/null`
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
775 if test -z "$PY3LIBDIR"; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
776 # some dists don't have sys.lib so the best we can do is assume lib
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
777 PY3LIBDIR="lib"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
778 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
779 AC_MSG_RESULT($PY3LIBDIR)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
780
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
781 # Set the include directory
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
782
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
783 AC_MSG_CHECKING([for Python 3.x header files])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
784 PY3INCLUDE=`($PY3CONFIG --includes) 2>/dev/null`
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
785 AC_MSG_RESULT($PY3INCLUDE)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
786
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
787 # Set the library directory blindly. This probably won't work with older versions
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
788 AC_MSG_CHECKING([for Python 3.x library])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
789 dirs="$PY3VERSION/config $PY3VERSION/$PY3LIBDIR python/$PY3LIBDIR"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
790 for i in $dirs; do
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
791 if test -d $PY3EPREFIX/$PY3LIBDIR/$i; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
792 PY3LIB="$PY3EPREFIX/$PY3LIBDIR/$i"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
793 break
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
794 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
795 done
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
796 if test -z "$PY3LIB"; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
797 AC_MSG_RESULT([Not found])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
798 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
799 AC_MSG_RESULT($PY3LIB)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
800 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
801
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
802 PY3LINK="-l$PY3VERSION"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
803 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
804
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
805 # Cygwin (Windows) needs the library for dynamic linking
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
806 case $host in
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
807 *-*-cygwin* | *-*-mingw*)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
808 PYTHON3DYNAMICLINKING="-L$PYLIB $PY3LINK"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
809 DEFS="-DUSE_DL_IMPORT $DEFS"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
810 ;;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
811 *)PYTHON3DYNAMICLINKING="";;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
812 esac
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
813 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
814
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
815 AC_SUBST(PY3INCLUDE)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
816 AC_SUBST(PY3LIB)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
817 AC_SUBST(PY3LINK)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
818 AC_SUBST(PYTHON3DYNAMICLINKING)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
819
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
820
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
821 #----------------------------------------------------------------
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
822 # Look for Perl5
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
823 #----------------------------------------------------------------
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
824
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
825 PERLBIN=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
826
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
827 AC_ARG_WITH(perl5, AS_HELP_STRING([--without-perl5], [Disable Perl5])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
828 AS_HELP_STRING([--with-perl5=path], [Set location of Perl5 executable]),[ PERLBIN="$withval"], [PERLBIN=yes])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
829
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
830 # First, check for "--without-perl5" or "--with-perl5=no".
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
831 if test x"${PERLBIN}" = xno -o x"${with_alllang}" = xno ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
832 AC_MSG_NOTICE([Disabling Perl5])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
833 PERL=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
834 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
835
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
836 # First figure out what the name of Perl5 is
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
837
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
838 if test "x$PERLBIN" = xyes; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
839 AC_CHECK_PROGS(PERL, perl perl5.6.1 perl5.6.0 perl5.004 perl5.003 perl5.002 perl5.001 perl5 perl)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
840 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
841 PERL="$PERLBIN"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
842 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
843
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
844
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
845 # 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:
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
846 # perl -MExtUtils::Embed -e ccopts
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
847 AC_MSG_CHECKING(for Perl5 header files)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
848 if test -n "$PERL"; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
849 PERL5DIR=`($PERL -e 'use Config; print $Config{archlib}, "\n";') 2>/dev/null`
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
850 if test -n "$PERL5DIR" ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
851 dirs="$PERL5DIR $PERL5DIR/CORE"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
852 PERL5EXT=none
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
853 for i in $dirs; do
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
854 if test -r $i/perl.h; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
855 AC_MSG_RESULT($i)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
856 PERL5EXT="$i"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
857 break
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
858 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
859 done
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
860 if test "$PERL5EXT" = none; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
861 PERL5EXT="$PERL5DIR/CORE"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
862 AC_MSG_RESULT(could not locate perl.h...using $PERL5EXT)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
863 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
864
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
865 AC_MSG_CHECKING(for Perl5 library)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
866 PERL5LIB=`($PERL -e 'use Config; $_=$Config{libperl}; s/^lib//; s/$Config{_a}$//; s/\.$Config{so}.*//; print $_, "\n"') 2>/dev/null`
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
867 if test -z "$PERL5LIB" ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
868 AC_MSG_RESULT(not found)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
869 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
870 AC_MSG_RESULT($PERL5LIB)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
871 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
872 AC_MSG_CHECKING(for Perl5 ccflags)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
873 PERL5CCFLAGS=`($PERL -e 'use Config; print $Config{ccflags}, "\n"' | sed "s/-Wdeclaration-after-statement//" | sed "s/-I/$ISYSTEM/") 2>/dev/null`
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
874 if test -z "$PERL5CCFLAGS" ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
875 AC_MSG_RESULT(not found)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
876 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
877 AC_MSG_RESULT($PERL5CCFLAGS)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
878 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
879 AC_MSG_CHECKING(for Perl5 ccdlflags)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
880 PERL5CCDLFLAGS=`($PERL -e 'use Config; print $Config{ccdlflags}, "\n"') 2>/dev/null`
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
881 if test -z "$PERL5CCDLFLAGS" ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
882 AC_MSG_RESULT(not found)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
883 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
884 AC_MSG_RESULT($PERL5CCDLFLAGS)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
885 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
886 AC_MSG_CHECKING(for Perl5 cccdlflags)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
887 PERL5CCCDLFLAGS=`($PERL -e 'use Config; print $Config{cccdlflags}, "\n"') 2>/dev/null`
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
888 if test -z "$PERL5CCCDLFLAGS" ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
889 AC_MSG_RESULT(not found)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
890 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
891 AC_MSG_RESULT($PERL5CCCDLFLAGS)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
892 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
893 AC_MSG_CHECKING(for Perl5 ldflags)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
894 PERL5LDFLAGS=`($PERL -e 'use Config; print $Config{ldflags}, "\n"') 2>/dev/null`
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
895 if test -z "$PERL5LDFLAGS" ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
896 AC_MSG_RESULT(not found)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
897 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
898 AC_MSG_RESULT($PERL5LDFLAGS)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
899 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
900 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
901 AC_MSG_RESULT(unable to determine perl5 configuration)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
902 PERL5EXT=$PERL5DIR
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
903 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
904 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
905 AC_MSG_RESULT(could not figure out how to run perl5)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
906 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
907
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
908 # Cygwin (Windows) needs the library for dynamic linking
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
909 case $host in
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
910 *-*-cygwin* | *-*-mingw*) PERL5DYNAMICLINKING="-L$PERL5EXT -l$PERL5LIB";;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
911 *)PERL5DYNAMICLINKING="";;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
912 esac
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
913 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
914
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
915 AC_SUBST(PERL)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
916 AC_SUBST(PERL5EXT)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
917 AC_SUBST(PERL5DYNAMICLINKING)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
918 AC_SUBST(PERL5LIB)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
919 AC_SUBST(PERL5CCFLAGS)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
920 AC_SUBST(PERL5CCDLFLAGS)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
921 AC_SUBST(PERL5CCCDLFLAGS)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
922 AC_SUBST(PERL5LDFLAGS)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
923
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
924 #----------------------------------------------------------------
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
925 # Look for Octave
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
926 #----------------------------------------------------------------
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
927
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
928 OCTAVEBIN=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
929 OCTAVE_SO=.oct
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
930
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
931 AC_ARG_WITH(octave, AS_HELP_STRING([--without-octave], [Disable Octave])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
932 AS_HELP_STRING([--with-octave=path], [Set location of Octave executable]),[OCTAVEBIN="$withval"], [OCTAVEBIN=yes])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
933
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
934 # First, check for "--without-octave" or "--with-octave=no".
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
935 if test x"${OCTAVEBIN}" = xno -o x"${with_alllang}" = xno ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
936 AC_MSG_NOTICE([Disabling Octave])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
937 OCTAVE=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
938
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
939 # First figure out what the name of Octave is
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
940 elif test "x$OCTAVEBIN" = xyes; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
941 AC_PATH_PROG(OCTAVE, [octave])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
942
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
943 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
944 OCTAVE="$OCTAVEBIN"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
945 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
946
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
947 if test -n "$OCTAVE"; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
948 AC_MSG_CHECKING([for mkoctfile])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
949 mkoctfile="`dirname ${OCTAVE}`/mkoctfile"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
950 AS_IF([test -x "${mkoctfile}"],[
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
951 AC_MSG_RESULT([${mkoctfile}])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
952 ],[
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
953 AC_MSG_RESULT([not found, disabling Octave])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
954 OCTAVE=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
955 ])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
956 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
957 if test -n "$OCTAVE"; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
958 AC_MSG_CHECKING([for Octave preprocessor flags])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
959 OCTAVE_CPPFLAGS=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
960 for n in CPPFLAGS INCFLAGS; do
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
961 OCTAVE_CPPFLAGS="${OCTAVE_CPPFLAGS} "`${mkoctfile} -p $n`
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
962 done
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
963 AC_MSG_RESULT([$OCTAVE_CPPFLAGS])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
964 AC_MSG_CHECKING([for Octave compiler flags])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
965 OCTAVE_CXXFLAGS=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
966 for n in ALL_CXXFLAGS; do
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
967 OCTAVE_CXXFLAGS="${OCTAVE_CXXFLAGS} "`${mkoctfile} -p $n`
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
968 done
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
969 AC_MSG_RESULT([$OCTAVE_CXXFLAGS])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
970 AC_MSG_CHECKING([for Octave linker flags])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
971 OCTAVE_LDFLAGS=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
972 for n in RDYNAMIC_FLAG LFLAGS RLD_FLAG OCTAVE_LIBS LIBS; do
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
973 OCTAVE_LDFLAGS="${OCTAVE_LDFLAGS} "`${mkoctfile} -p $n`
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
974 done
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
975 AC_MSG_RESULT([$OCTAVE_LDFLAGS])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
976 for octave_opt in --silent --norc --no-history --no-window-system; do
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
977 AC_MSG_CHECKING([if Octave option '${octave_opt}' is supported])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
978 octave_out=`${OCTAVE} ${octave_opt} /dev/null 2>&1 | sed -n '1{/unrecognized/p}'`
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
979 AS_IF([test "x${octave_out}" = x],[
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
980 AC_MSG_RESULT([yes])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
981 OCTAVE="${OCTAVE} ${octave_opt}"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
982 ],[
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
983 AC_MSG_RESULT([no])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
984 ])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
985 done
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
986 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
987
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
988 AC_SUBST(OCTAVE)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
989 AC_SUBST(OCTAVE_SO)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
990 AC_SUBST(OCTAVE_CPPFLAGS)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
991 AC_SUBST(OCTAVE_CXXFLAGS)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
992 AC_SUBST(OCTAVE_LDFLAGS)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
993
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
994 #----------------------------------------------------------------
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
995 # Look for java
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
996 #----------------------------------------------------------------
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
997
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
998 AC_ARG_WITH(java, AS_HELP_STRING([--without-java], [Disable Java])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
999 AS_HELP_STRING([--with-java=path], [Set location of java executable]),[JAVABIN="$withval"], [JAVABIN=yes])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1000 AC_ARG_WITH(javac, [ --with-javac=path Set location of javac executable],[JAVACBIN="$withval"], [JAVACBIN=])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1001
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1002 # First, check for "--without-java" or "--with-java=no".
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1003 if test x"${JAVABIN}" = xno -o x"${with_alllang}" = xno ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1004 AC_MSG_NOTICE([Disabling Java])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1005 JAVA=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1006 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1007
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1008 if test "x$JAVABIN" = xyes; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1009 AC_CHECK_PROGS(JAVA, java kaffe guavac)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1010 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1011 JAVA="$JAVABIN"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1012 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1013
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1014 if test -z "$JAVACBIN"; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1015 AC_CHECK_PROGS(JAVAC, javac)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1016 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1017 JAVAC="$JAVACBIN"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1018 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1019
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1020 AC_MSG_CHECKING(for java include file jni.h)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1021 AC_ARG_WITH(javaincl, [ --with-javaincl=path Set location of Java include directory], [JAVAINCDIR="$withval"], [JAVAINCDIR=])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1022
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1023 if test -z "$JAVAINCDIR" ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1024 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"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1025
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1026 # Add in default installation directory on Windows for Cygwin
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1027 case $host in
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1028 *-*-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";;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1029 *-*-darwin*) JAVAINCDIR="/System/Library/Frameworks/JavaVM.framework/Headers $JAVAINCDIR";;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1030 *);;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1031 esac
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1032 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1033
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1034 JAVAINC=""
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1035 for d in $JAVAINCDIR ; do
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1036 if test -r "$d/jni.h" ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1037 AC_MSG_RESULT($d)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1038 JAVAINCDIR=$d
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1039 JAVAINC=-I\"$d\"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1040 break
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1041 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1042 done
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1043
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1044 if test "$JAVAINC" = "" ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1045 AC_MSG_RESULT(not found)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1046 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1047 # now look for <arch>/jni_md.h
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1048 AC_MSG_CHECKING(for java include file jni_md.h)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1049 JAVAMDDIR=`find "$JAVAINCDIR" -follow -name jni_md.h -print`
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1050 if test "$JAVAMDDIR" = "" ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1051 AC_MSG_RESULT(not found)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1052 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1053 JAVAMDDIR=`dirname "$JAVAMDDIR" | tail -1`
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1054 JAVAINC="${JAVAINC} -I\"$JAVAMDDIR\""
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1055 AC_MSG_RESULT($JAVAMDDIR)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1056 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1057 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1058
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1059 # java.exe on Cygwin requires the Windows standard (Pascal) calling convention as it is a normal Windows executable and not a Cygwin built executable
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1060 case $host in
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1061 *-*-cygwin* | *-*-mingw*)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1062 if test "$GCC" = yes; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1063 JAVADYNAMICLINKING=" -mno-cygwin -mthreads -Wl,--add-stdcall-alias"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1064 JAVACFLAGS="-mno-cygwin -mthreads"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1065 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1066 JAVADYNAMICLINKING=""
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1067 JAVACFLAGS=""
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1068 fi ;;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1069 *-*-darwin*)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1070 JAVADYNAMICLINKING="-dynamiclib -framework JavaVM"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1071 JAVACFLAGS=""
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1072 ;;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1073 *)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1074 JAVADYNAMICLINKING=""
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1075 JAVACFLAGS=""
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1076 ;;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1077 esac
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1078
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1079 # Java on Windows platforms including Cygwin doesn't use libname.dll, rather name.dll when loading dlls
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1080 case $host in
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1081 *-*-cygwin* | *-*-mingw*) JAVALIBRARYPREFIX="";;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1082 *)JAVALIBRARYPREFIX="lib";;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1083 esac
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1084
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1085 # Java on Mac OS X tweaks
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1086 case $host in
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1087 *-*-darwin*)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1088 JAVASO=".jnilib"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1089 JAVALDSHARED='$(CC)'
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1090 JAVACXXSHARED='$(CXX)'
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1091 ;;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1092 *)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1093 JAVASO=$SO
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1094 JAVALDSHARED='$(LDSHARED)'
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1095 JAVACXXSHARED='$(CXXSHARED)'
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1096 ;;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1097 esac
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1098 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1099
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1100 AC_SUBST(JAVA)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1101 AC_SUBST(JAVAC)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1102 AC_SUBST(JAVAINC)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1103 AC_SUBST(JAVADYNAMICLINKING)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1104 AC_SUBST(JAVALIBRARYPREFIX)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1105 AC_SUBST(JAVASO)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1106 AC_SUBST(JAVALDSHARED)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1107 AC_SUBST(JAVACXXSHARED)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1108 AC_SUBST(JAVACFLAGS)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1109
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1110 #----------------------------------------------------------------
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1111 # Look for gcj
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1112 #----------------------------------------------------------------
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1113
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1114 AC_ARG_WITH(gcj, AS_HELP_STRING([--without-gcj], [Disable GCJ])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1115 AS_HELP_STRING([--with-gcj=path], [Set location of gcj executable]),[GCJBIN="$withval"], [GCJBIN=yes])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1116 AC_ARG_WITH(gcjh, [ --with-gcjh=path Set location of gcjh executable],[GCJHBIN="$withval"], [GCJHBIN=])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1117
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1118 # First, check for "--without-gcj" or "--with-gcj=no".
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1119 if test x"${GCJBIN}" = xno -o x"${with_alllang}" = xno ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1120 AC_MSG_NOTICE([Disabling GCJ])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1121 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1122 if test "x$GCJBIN" = xyes; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1123 AC_CHECK_PROGS(GCJ, gcj)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1124 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1125 GCJ="$GCJBIN"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1126 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1127
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1128 if test -z "$GCJCBIN"; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1129 AC_CHECK_PROGS(GCJH, gcjh)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1130 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1131 GCJH="$GCJHBIN"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1132 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1133 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1134
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1135 AC_SUBST(GCJ)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1136 AC_SUBST(GCJH)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1137
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1138 #----------------------------------------------------------------
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1139 # Look for Android
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1140 #----------------------------------------------------------------
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1141
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1142 AC_ARG_WITH(android, AS_HELP_STRING([--without-android], [Disable Android])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1143 AS_HELP_STRING([--with-android=path], [Set location of android executable]),[ANDROIDBIN="$withval"], [ANDROIDBIN=yes])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1144 AC_ARG_WITH(adb, [ --with-adb=path Set location of adb executable - Android Debug Bridge],[ADBBIN="$withval"], [ADBBIN=])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1145 AC_ARG_WITH(ant, [ --with-ant=path Set location of ant executable for Android],[ANTBIN="$withval"], [ANTBIN=])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1146 AC_ARG_WITH(ndk-build, [ --with-ndk-build=path Set location of Android ndk-build executable],[NDKBUILDBIN="$withval"], [NDKBUILDBIN=])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1147
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1148 # First, check for "--without-android" or "--with-android=no".
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1149 if test x"${ANDROIDBIN}" = xno -o x"${with_alllang}" = xno ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1150 AC_MSG_NOTICE([Disabling Android])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1151 ANDROID=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1152 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1153 if test "x$ANDROIDBIN" = xyes; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1154 AC_CHECK_PROGS(ANDROID, android)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1155 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1156 ANDROID="$ANDROIDBIN"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1157 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1158
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1159 if test -z "$ADBBIN"; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1160 AC_CHECK_PROGS(ADB, adb)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1161 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1162 ADB="$ADBBIN"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1163 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1164
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1165 if test -z "$ANTBIN"; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1166 AC_CHECK_PROGS(ANT, ant)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1167 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1168 ANT="$ANTBIN"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1169 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1170
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1171 if test -z "$NDKBUILDBIN"; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1172 AC_CHECK_PROGS(NDKBUILD, ndk-build)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1173 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1174 NDKBUILD="$NDKBUILDBIN"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1175 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1176 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1177
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1178 AC_SUBST(ANDROID)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1179 AC_SUBST(ADB)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1180 AC_SUBST(ANT)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1181 AC_SUBST(NDKBUILD)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1182
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1183 #----------------------------------------------------------------
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1184 # Look for Guile
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1185 #----------------------------------------------------------------
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1186
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1187 GUILE=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1188 GUILE_CFLAGS=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1189 GUILE_LIBS=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1190
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1191 AC_ARG_WITH(guile-config, AS_HELP_STRING([--without-guile], [Disable Guile])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1192 AS_HELP_STRING([--with-guile-config=path], [Set location of guile-config]),[ GUILE_CONFIG="$withval"], [GUILE_CONFIG=])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1193 AC_ARG_WITH(guile,[ --with-guile=path Set location of Guile executable],[
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1194 GUILE="$withval"], [GUILE=yes])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1195 AC_ARG_WITH(guile-cflags,[ --with-guile-cflags=cflags Set cflags required to compile against Guile],[
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1196 GUILE_CFLAGS="$withval"])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1197 AC_ARG_WITH(guile-libs,[ --with-guile-libs=ldflags Set ldflags needed to link with Guile],[
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1198 GUILE_LIBS="$withval"])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1199
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1200 # First, check for "--without-guile" or "--with-guile=no".
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1201 if test x"${GUILE}" = xno -o x"${with_alllang}" = xno ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1202 AC_MSG_NOTICE([Disabling Guile])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1203 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1204 if test -z "$GUILE_CONFIG" ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1205 AC_PATH_PROG(GUILE_CONFIG, guile-config)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1206 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1207 if test -n "$GUILE_CONFIG" ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1208 if test x"$GUILE" = xyes; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1209 AC_MSG_CHECKING([for guile bindir])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1210 guile_bindir="`$GUILE_CONFIG info bindir`"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1211 AC_MSG_RESULT([$guile_bindir])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1212 GUILE=$guile_bindir/guile
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1213 if ! test -f "$GUILE" ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1214 GUILE=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1215 AC_PATH_PROG(GUILE, guile)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1216 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1217 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1218
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1219 if test -f "$GUILE" ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1220 AC_MSG_CHECKING([for guile version])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1221 guile_version=`$GUILE -c '(display (effective-version))'`
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1222 AC_MSG_RESULT([$guile_version])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1223 AC_MSG_CHECKING([for guile version >= 1.8])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1224 guile_good_version=`$GUILE -c '(if (>= (string->number (effective-version)) 1.8) (display "yes") (display "no"))'`
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1225 AC_MSG_RESULT([$guile_good_version])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1226 if test x"$guile_good_version" != xyes ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1227 GUILE=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1228 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1229 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1230
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1231 if test -z "$GUILE_CFLAGS" ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1232 AC_MSG_CHECKING([for guile compile flags])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1233 GUILE_CFLAGS="`$GUILE_CONFIG compile`" # Note that this can sometimes be empty
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1234 AC_MSG_RESULT([$GUILE_CFLAGS])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1235 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1236
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1237 if test -z "$GUILE_LIBS" ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1238 AC_MSG_CHECKING([for guile link flags])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1239 GUILE_LIBS="`$GUILE_CONFIG link`"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1240 AC_MSG_RESULT([$GUILE_LIBS])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1241 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1242 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1243 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1244
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1245 AC_SUBST(GUILE)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1246 AC_SUBST(GUILE_CFLAGS)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1247 AC_SUBST(GUILE_LIBS)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1248
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1249 #----------------------------------------------------------------
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1250 # Look for MzScheme
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1251 #----------------------------------------------------------------
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1252
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1253 AC_ARG_WITH(mzscheme, AS_HELP_STRING([--without-mzscheme], [Disable MzScheme])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1254 AS_HELP_STRING([--with-mzscheme=path], [Set location of MzScheme executable]),[ MZSCHEMEBIN="$withval"], [MZSCHEMEBIN=yes])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1255 AC_ARG_WITH(mzc, AS_HELP_STRING([--with-mzc=path], [Set location of MzScheme's mzc]), [ MZCBIN="$withval"], [MZCBIN=])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1256
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1257 # First, check for "--without-mzscheme" or "--with-mzscheme=no".
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1258 if test x"${MZSCHEMEBIN}" = xno -o x"${with_alllang}" = xno ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1259 AC_MSG_NOTICE([Disabling MzScheme])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1260 MZC=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1261 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1262 if test "x$MZSCHEMEBIN" = xyes; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1263 AC_PATH_PROG(MZSCHEME, mzscheme)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1264 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1265 MZSCHEME="$MZSCHEMEBIN"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1266 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1267
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1268 if test -z "$MZCBIN"; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1269 AC_PATH_PROG(MZC, mzc)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1270 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1271
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1272 if test -n "$MZSCHEME"; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1273 AC_MSG_CHECKING(for MzScheme dynext object)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1274 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`
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1275 if test -f "$MZDYNOBJ"; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1276 :
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1277 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1278 # older versions (3.72 approx and earlier)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1279 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`
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1280 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1281 if test -f "$MZDYNOBJ"; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1282 AC_MSG_RESULT($MZDYNOBJ)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1283 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1284 AC_MSG_RESULT(not found)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1285 MZDYNOBJ=""
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1286 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1287 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1288 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1289 AC_SUBST(MZDYNOBJ)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1290
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1291 #----------------------------------------------------------------
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1292 # Look for Ruby
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1293 #----------------------------------------------------------------
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1294
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1295 RUBYBIN=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1296
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1297 AC_ARG_WITH(ruby, AS_HELP_STRING([--without-ruby], [Disable Ruby])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1298 AS_HELP_STRING([--with-ruby=path], [Set location of Ruby executable]),[ RUBYBIN="$withval"], [RUBYBIN=yes])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1299
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1300 # First, check for "--without-ruby" or "--with-ruby=no".
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1301 if test x"${RUBYBIN}" = xno -o x"${with_alllang}" = xno ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1302 AC_MSG_NOTICE([Disabling Ruby])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1303 RUBY=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1304 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1305
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1306 # First figure out what the name of Ruby is
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1307
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1308 if test "x$RUBYBIN" = xyes; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1309 AC_CHECK_PROGS(RUBY, ruby)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1310 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1311 RUBY="$RUBYBIN"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1312 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1313
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1314 AC_MSG_CHECKING(for Ruby header files)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1315 if test -n "$RUBY"; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1316 # Try Ruby1.9 first
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1317 RUBYDIR=`($RUBY -rrbconfig -e 'print RbConfig::CONFIG[["rubyhdrdir"]] || $rubyhdrdir') 2>/dev/null`
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1318 if test x"$RUBYDIR" = x"" || test x"$RUBYDIR" = x"nil"; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1319 RUBYDIR=`($RUBY -rmkmf -e 'print Config::CONFIG[["archdir"]] || $archdir') 2>/dev/null`
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1320 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1321 RUBYARCH=`($RUBY -rrbconfig -e 'print RbConfig::CONFIG[["arch"]] || $arch') 2>/dev/null`
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1322 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1323 if test x"$RUBYDIR" != x""; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1324 dirs="$RUBYDIR"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1325 RUBYINCLUDE=none
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1326 for i in $dirs; do
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1327 if test -r $i/ruby.h; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1328 AC_MSG_RESULT($i)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1329 RUBYINCLUDE="-I$i"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1330 break
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1331 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1332 done
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1333 if test x"$RUBYARCH" != x""; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1334 RUBYINCLUDE="-I$RUBYDIR -I$RUBYDIR/$RUBYARCH"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1335 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1336 if test "$RUBYINCLUDE" = none; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1337 RUBYINCLUDE="-I$RUBYDIR"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1338 AC_MSG_RESULT(could not locate ruby.h...using $RUBYINCLUDE)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1339 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1340
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1341 # Find library and path for linking.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1342 AC_MSG_CHECKING(for Ruby library)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1343 RUBYLIB=""
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1344 rb_libdir=`($RUBY -rrbconfig -e 'print Config::CONFIG[["libdir"]]') 2>/dev/null`
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1345 rb_bindir=`($RUBY -rrbconfig -e 'print Config::CONFIG[["bindir"]]') 2>/dev/null`
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1346 dirs="$dirs $rb_libdir $rb_bindir"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1347
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1348 rb_libruby=`($RUBY -rrbconfig -e 'print Config::CONFIG[["LIBRUBY_A"]]') 2>/dev/null`
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1349 RUBYLINK=`($RUBY -rrbconfig -e '
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1350 c = Config::CONFIG
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1351 if c.has_key? "LIBRUBYARG_STATIC" # 1.8.x
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1352 if c[["LIBRUBY"]] == c[["LIBRUBY_A"]]
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1353 link = c[["LIBRUBYARG_STATIC"]]
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1354 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1355 link = c[["LIBRUBYARG_SHARED"]]
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1356 end
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1357 else # 1.6.x
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1358 link = "-l" + c[["RUBY_INSTALL_NAME"]]
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1359 end
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1360
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1361 # Get the target Ruby was built for
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1362 target = c[["target"]]
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1363
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1364 if target == "i386-pc-mswin32"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1365 # Need to change msvcrt-ruby*.lib to -lmsvcrt-ruby*
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1366 ext = File.extname(link)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1367 # Get index that counts backwards from end of string
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1368 index = -1 - ext.size
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1369 # Strip off the extension
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1370 link = link.slice(0..index)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1371 puts "-l#{link}"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1372 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1373 puts link
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1374 end') 2>/dev/null`
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1375
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1376 if test "$rb_libruby" != ""; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1377 for i in $dirs; do
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1378 if (test -r $i/$rb_libruby;) then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1379 RUBYLIB="$i"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1380 break
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1381 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1382 done
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1383 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1384 if test "$RUBYLIB" = ""; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1385 RUBYLIB="$RUBYDIR"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1386 AC_MSG_RESULT(not found... using $RUBYDIR)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1387 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1388 AC_MSG_RESULT($RUBYLINK in $RUBYLIB)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1389 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1390 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1391 AC_MSG_RESULT(unable to determine ruby configuration)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1392 RUBYINCLUDE="-I$RUBYDIR"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1393 RUBYLIB="$RUBYDIR"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1394 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1395
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1396 case $host in
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1397 *-*-mingw*) ;; # do nothing, the default windows libraries are already included
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1398 *) RUBYLINK="$RUBYLINK `($RUBY -rrbconfig -e 'print Config::CONFIG[["LIBS"]]') 2>/dev/null`";;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1399 esac
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1400
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1401 RUBYCCDLFLAGS=`($RUBY -rrbconfig -e 'print Config::CONFIG[["CCDLFLAGS"]]') 2>/dev/null`
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1402 RUBYSO=.`($RUBY -rrbconfig -e 'print Config::CONFIG[["DLEXT"]]') 2>/dev/null`
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1403 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1404 AC_MSG_RESULT(could not figure out how to run ruby)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1405 RUBYINCLUDE="-I/usr/local/lib/ruby/1.4/arch"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1406 RUBYLIB="/usr/local/lib/ruby/1.4/arch"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1407 RUBYLINK="-lruby -lm"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1408 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1409
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1410 case $host in
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1411 *-*-cygwin* | *-*-mingw*) RUBYDYNAMICLINKING="-L$RUBYLIB $RUBYLINK";;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1412 *) RUBYDYNAMICLINKING="";;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1413 esac
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1414 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1415
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1416 AC_SUBST(RUBYINCLUDE)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1417 AC_SUBST(RUBYLIB)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1418 AC_SUBST(RUBYLINK)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1419 AC_SUBST(RUBYCCDLFLAGS)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1420 AC_SUBST(RUBYSO)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1421 AC_SUBST(RUBYDYNAMICLINKING)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1422
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1423 #-------------------------------------------------------------------------
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1424 # Look for PHP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1425 #-------------------------------------------------------------------------
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1426
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1427 PHPBIN=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1428
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1429 AC_ARG_WITH(php, AS_HELP_STRING([--without-php], [Disable PHP])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1430 AS_HELP_STRING([--with-php=path], [Set location of PHP executable]),[ PHPBIN="$withval"], [PHPBIN=yes])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1431
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1432 # First, check for "--without-php" or "--with-php=no".
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1433 if test x"${PHPBIN}" = xno -o x"${with_alllang}" = xno ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1434 AC_MSG_NOTICE([Disabling PHP])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1435 PHP=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1436 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1437
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1438 if test "x$PHPBIN" = xyes; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1439 AC_CHECK_PROGS(PHP, [php5 php])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1440 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1441 PHP=$PHPBIN
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1442 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1443
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1444 AC_MSG_CHECKING(for PHP header files)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1445 dnl /usr/bin/php5 -> /usr/bin/php-config5
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1446 case $PHP in
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1447 *5)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1448 PHPCONFIG=`echo "$PHP"|sed 's/5$/-config5/'` ;;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1449 *)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1450 PHPCONFIG=$PHP-config ;;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1451 esac
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1452 php_version=`$PHPCONFIG --version 2>/dev/null`
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1453 case $php_version in
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1454 5*)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1455 PHPINC=`$PHPCONFIG --includes 2>/dev/null`
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1456 if test -n "$PHPINC"; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1457 AC_MSG_RESULT($PHPINC)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1458 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1459 AC_MSG_RESULT(not found)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1460 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1461 ;;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1462 *)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1463 AC_MSG_RESULT([found PHP $version, but only PHP 5 is supported]) ;;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1464 esac
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1465 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1466 AC_SUBST(PHP)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1467 AC_SUBST(PHPINC)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1468
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1469 #----------------------------------------------------------------
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1470 # Look for ocaml
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1471 #----------------------------------------------------------------
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1472
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1473 AC_ARG_WITH(ocaml, AS_HELP_STRING([--without-ocaml], [Disable OCaml])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1474 AS_HELP_STRING([--with-ocaml=path], [Set location of ocaml executable]),[ OCAMLBIN="$withval"], [OCAMLBIN=yes])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1475 AC_ARG_WITH(ocamlc,[ --with-ocamlc=path Set location of ocamlc executable],[ OCAMLC="$withval"], [OCAMLC=])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1476 AC_ARG_WITH(ocamldlgen,[ --with-ocamldlgen=path Set location of ocamldlgen],[ OCAMLDLGEN="$withval" ], [OCAMLDLGEN=])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1477 AC_ARG_WITH(ocamlfind,[ --with-ocamlfind=path Set location of ocamlfind],[OCAMLFIND="$withval"],[OCAMLFIND=])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1478 AC_ARG_WITH(ocamlmktop,[ --with-ocamlmktop=path Set location of ocamlmktop executable],[ OCAMLMKTOP="$withval"], [OCAMLMKTOP=])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1479
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1480 # First, check for "--without-ocaml" or "--with-ocaml=no".
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1481 if test x"${OCAMLBIN}" = xno -o x"${with_alllang}" = xno ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1482 AC_MSG_NOTICE([Disabling OCaml])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1483 OCAMLBIN=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1484 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1485
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1486 AC_MSG_CHECKING(for Ocaml DL load generator)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1487 if test -z "$OCAMLDLGEN"; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1488 AC_CHECK_PROGS(OCAMLDLGEN, ocamldlgen, :)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1489 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1490
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1491 AC_MSG_CHECKING(for Ocaml package tool)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1492 if test -z "$OCAMLFIND"; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1493 AC_CHECK_PROGS(OCAMLFIND, ocamlfind, :)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1494 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1495
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1496 AC_MSG_CHECKING(for Ocaml compiler)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1497 if test -z "$OCAMLC"; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1498 AC_CHECK_PROGS(OCAMLC, ocamlc, :)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1499 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1500
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1501 AC_MSG_CHECKING(for Ocaml interpreter)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1502 if test "x$OCAMLBIN" = xyes; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1503 AC_CHECK_PROGS(OCAMLBIN, ocaml, :)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1504 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1505
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1506 AC_MSG_CHECKING(for Ocaml toplevel creator)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1507 if test -z "$OCAMLMKTOP"; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1508 AC_CHECK_PROGS(OCAMLMKTOP, ocamlmktop, :)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1509 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1510
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1511 OCAMLLOC=loc
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1512 if test "$OCAMLC" != ":" ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1513 AC_MSG_CHECKING(for Ocaml header files)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1514 dirs="/usr/lib/ocaml/caml /usr/local/lib/ocaml/caml"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1515 dir="`$OCAMLC -where 2>/dev/null`"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1516 if test "$dir"; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1517 dirs="$dir/caml $dirs"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1518 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1519 for i in $dirs; do
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1520 if test -r $i/mlvalues.h; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1521 AC_MSG_RESULT($i)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1522 OCAMLEXT="$i"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1523 OCAMLINC="-I$OCAMLEXT"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1524 break
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1525 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1526 done
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1527 if test -z "$OCAMLINC"; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1528 AC_MSG_RESULT(not found)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1529 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1530
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1531 AC_MSG_CHECKING(for Ocaml version 3.08.2 or higher)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1532 OCAMLVER=`$OCAMLC -version | sed -e 's/.*version //g'`
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1533 AC_COMPARE_VERSION([$OCAMLVER],[3.08.2],[:],[:],[OCAMLLOC=_loc])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1534 AC_MSG_RESULT($OCAMLVER)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1535 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1536 fi # Disabling ocaml
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1537
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1538 export OCAMLLOC
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1539 export OCAMLVER
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1540 export OCAMLINC
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1541 export OCAMLBIN
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1542 export OCAMLC
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1543 export OCAMLDLGEN
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1544 export OCAMLFIND
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1545 export OCAMLMKTOP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1546
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1547 AC_SUBST(OCAMLLOC)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1548 AC_SUBST(OCAMLVER)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1549 AC_SUBST(OCAMLINC)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1550 AC_SUBST(OCAMLBIN)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1551 AC_SUBST(OCAMLC)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1552 AC_SUBST(OCAMLDLGEN)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1553 AC_SUBST(OCAMLFIND)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1554 AC_SUBST(OCAMLMKTOP)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1555
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1556 #----------------------------------------------------------------
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1557 # Look for Pike
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1558 #----------------------------------------------------------------
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1559
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1560 # Identify the name of the Pike executable
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1561 # Priority: configure option, automatic search
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1562 PIKEBIN=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1563 AC_ARG_WITH(pike, AS_HELP_STRING([--without-pike], [Disable Pike])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1564 AS_HELP_STRING([--with-pike=path], [Set location of Pike executable]),[PIKEBIN="$withval"], [PIKEBIN=yes])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1565
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1566 # First, check for "--without-pike" or "--with-pike=no".
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1567 if test x"${PIKEBIN}" = xno -o x"${with_alllang}" = xno ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1568 AC_MSG_NOTICE([Disabling Pike])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1569 PIKEBIN=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1570 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1571
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1572 if test "x$PIKEBIN" = xyes; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1573 AC_CHECK_PROGS(PIKE, pike pike7.8 pike7.6 pike7.4 pike7.2)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1574 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1575 PIKE="$PIKEBIN"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1576 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1577
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1578
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1579 # Check for pike-config
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1580 # Priority: configure option, guessed from $PIKE, search from list
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1581 AC_ARG_WITH(pike-config, AS_HELP_STRING([--with-pike-config=path],
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1582 [Set location of pike-config script]),
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1583 [PIKECONFIG="$withval"], [PIKECONFIG=""])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1584
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1585 if test -z "$PIKECONFIG" -a -n "$PIKE"; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1586 AC_CHECK_PROGS(PIKECONFIG, $PIKE-config pike-config \
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1587 pike7.6-config pike7.4-config pike7.2-config)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1588 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1589
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1590 # Check for a --with-pikeincl option to configure
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1591 # Priority: configure option, info from $PIKECONFIG, guessed by pike script
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1592 AC_ARG_WITH(pikeincl, AS_HELP_STRING([--with-pikeincl=path],
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1593 [Set location of Pike include directory]),
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1594 [PIKEINCLUDE="-I$withval"], [PIKEINCLUDE=])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1595
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1596 if test -n "$PIKE"; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1597 AC_MSG_CHECKING([for Pike header files])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1598 if test -z "$PIKEINCLUDE" -a -n "$PIKECONFIG"; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1599 PIKEINCLUDE=`$PIKECONFIG --cflags`
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1600 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1601 if test -z "$PIKEINCLUDE" -a -n "$PIKE"; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1602 PIKEINCLUDE=`$PIKE -x cflags`
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1603 if test -z "$PIKEINCLUDE"; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1604 PIKEPATH=`which $PIKE`
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1605 PIKEINCLUDE=`$PIKE Tools/check-include-path.pike $PIKEPATH`
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1606 PIKEINCLUDE="-I$PIKEINCLUDE"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1607 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1608 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1609
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1610 if test -z "$PIKEINCLUDE"; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1611 AC_MSG_RESULT(not found)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1612 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1613 AC_MSG_RESULT($PIKEINCLUDE)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1614 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1615 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1616 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1617
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1618 AC_SUBST(PIKEINCLUDE)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1619 AC_SUBST(PIKECCDLFLAGS) dnl XXX: where is this used/defined?
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1620 AC_SUBST(PIKEDYNAMICLINKING) dnl XXX: where is this used/defined?
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1621
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1622 #----------------------------------------------------------------
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1623 # Look for CHICKEN
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1624 #----------------------------------------------------------------
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1625
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1626 CHICKEN=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1627 CHICKEN_CONFIG=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1628 CHICKENHOME=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1629 CHICKENOPTS=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1630 CHICKENLIB=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1631
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1632
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1633 AC_ARG_WITH(chicken, AS_HELP_STRING([--without-chicken], [Disable CHICKEN])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1634 AS_HELP_STRING([--with-chicken=path], [Set location of CHICKEN executable]),[ CHICKENBIN="$withval"], [CHICKENBIN=yes])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1635
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1636 # First, check for "--without-chicken" or "--with-chicken=no".
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1637 if test x"${CHICKENBIN}" = xno -o x"${with_alllang}" = xno ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1638 AC_MSG_NOTICE([Disabling CHICKEN])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1639 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1640
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1641 if test "x$CHICKENBIN" = xyes; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1642 AC_CHECK_PROGS(CHICKEN, chicken)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1643 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1644 CHICKEN="$CHICKENBIN"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1645 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1646
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1647 AC_ARG_WITH(chickencsc,[ --with-chickencsc=path Set location of csc executable],[ CHICKEN_CSC="$withval"], [CHICKEN_CSC=])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1648
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1649 if test -z "$CHICKEN_CSC"; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1650 AC_CHECK_PROGS(CHICKEN_CSC, csc)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1651 # Both the Microsoft C# compiler and chicken have an executable called csc, so check that this csc is really the chicken one
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1652 if test -n "$CHICKEN_CSC" ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1653 AC_MSG_CHECKING(whether csc is the chicken compiler)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1654 $CHICKEN_CSC -version 2>/dev/null | grep "chicken" > /dev/null || CHICKEN_CSC=""
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1655 if test -z "$CHICKEN_CSC"; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1656 AC_MSG_RESULT(no)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1657 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1658 AC_MSG_RESULT(yes)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1659 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1660 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1661 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1662
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1663 AC_ARG_WITH(chickencsi,[ --with-chickencsi=path Set location of csi executable],[ CHICKEN_CSI="$withval"], [CHICKEN_CSI=])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1664
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1665 if test -z "$CHICKEN_CSI"; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1666 AC_CHECK_PROGS(CHICKEN_CSI, csi)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1667 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1668
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1669 if test -n "$CHICKEN_CSC" ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1670
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1671 AC_ARG_WITH(chickenopts,[ --with-chickenopts=args Set compiler options for static CHICKEN generated code],[
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1672 CHICKENOPTS="$withval"], [CHICKENOPTS=])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1673 AC_ARG_WITH(chickensharedlib,[ --with-chickensharedlib=args Set linker options for shared CHICKEN generated code],[
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1674 CHICKENSHAREDLIB="$withval"], [CHICKENSHAREDLIB=])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1675 AC_ARG_WITH(chickenlib,[ --with-chickenlib=args Set linker options for static CHICKEN generated code],[
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1676 CHICKENLIB="$withval"], [CHICKENLIB=])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1677
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1678 AC_MSG_CHECKING(for compiler options for static CHICKEN generated code)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1679 if test -z "$CHICKENOPTS"; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1680 CHICKENOPTS="`$CHICKEN_CSC -cflags`"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1681 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1682 CHICKENOPTS="`$CHICKEN_CSC -cflags` $CHICKENOPTS"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1683 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1684 if test -z "$CHICKENOPTS"; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1685 AC_MSG_RESULT(not found)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1686 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1687 AC_MSG_RESULT($CHICKENOPTS)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1688 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1689
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1690 AC_MSG_CHECKING(for linker options for shared CHICKEN generated code)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1691 if test -z "$CHICKENSHAREDLIB"; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1692 CHICKENSHAREDLIB="`$CHICKEN_CSC -shared -libs`"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1693 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1694 CHICKENSHAREDLIB="`$CHICKEN_CSC -shared -libs` $CHICKENSHAREDLIB"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1695 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1696 if test -z "$CHICKENSHAREDLIB"; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1697 AC_MSG_RESULT(not found)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1698 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1699 AC_MSG_RESULT($CHICKENSHAREDLIB)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1700 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1701
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1702 AC_MSG_CHECKING(for linker options for static CHICKEN generated code)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1703 if test -z "$CHICKENLIB"; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1704 CHICKENLIB="`$CHICKEN_CSC -libs`"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1705 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1706 CHICKENLIB="`$CHICKEN_CSC -libs` $CHICKENLIB"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1707 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1708 if test -z "$CHICKENLIB"; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1709 AC_MSG_RESULT(not found)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1710 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1711 AC_MSG_RESULT($CHICKENLIB)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1712 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1713
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1714 fi # have CHICKEN_CONFIG
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1715 fi # Check for --without-chicken
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1716
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1717 AC_SUBST(CHICKEN)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1718 AC_SUBST(CHICKEN_CSC)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1719 AC_SUBST(CHICKEN_CSI)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1720 AC_SUBST(CHICKENOPTS)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1721 AC_SUBST(CHICKENLIB)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1722 AC_SUBST(CHICKENSHAREDLIB)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1723
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1724 #----------------------------------------------------------------
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1725 # Look for C#
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1726 #----------------------------------------------------------------
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1727
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1728 AC_ARG_WITH(csharp, AS_HELP_STRING([--without-csharp], [Disable CSharp]), [with_csharp="$withval"], [with_csharp=yes])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1729 AC_ARG_WITH(cil-interpreter, [ --with-cil-interpreter=path Set location of CIL interpreter for CSharp],[CSHARPBIN="$withval"], [CSHARPBIN=])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1730 AC_ARG_WITH(csharp-compiler, [ --with-csharp-compiler=path Set location of CSharp compiler],[CSHARPCOMPILERBIN="$withval"], [CSHARPCOMPILERBIN=])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1731
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1732 # First, check for "--without-csharp" or "--with-csharp=no".
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1733 if test x"${with_csharp}" = xno -o x"${with_alllang}" = xno ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1734 AC_MSG_NOTICE([Disabling CSharp])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1735 CSHARPCOMPILER=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1736 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1737
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1738 if test -z "$CSHARPCOMPILERBIN" ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1739 case $host in
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1740 *-*-cygwin* | *-*-mingw*)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1741 # prefer Mono gmcs (.NET 2.0) over mcs (.NET 1.1) - note mcs-1.2.3 has major pinvoke bug
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1742 AC_CHECK_PROGS(CSHARPCOMPILER, csc mono-csc gmcs mcs cscc)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1743 if test -n "$CSHARPCOMPILER" && test "$CSHARPCOMPILER" = "csc" ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1744 AC_MSG_CHECKING(whether csc is the Microsoft CSharp compiler)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1745 csc 2>/dev/null | grep "C#" > /dev/null || CSHARPCOMPILER=""
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1746 if test -z "$CSHARPCOMPILER" ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1747 AC_MSG_RESULT(no)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1748 AC_CHECK_PROGS(CSHARPCOMPILER, mono-csc gmcs mcs cscc)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1749 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1750 AC_MSG_RESULT(yes)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1751 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1752 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1753 ;;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1754 *)AC_CHECK_PROGS(CSHARPCOMPILER, mono-csc gmcs mcs cscc);;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1755 esac
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1756 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1757 CSHARPCOMPILER="$CSHARPCOMPILERBIN"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1758 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1759
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1760 CSHARPPATHSEPARATOR="/"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1761 CSHARPCYGPATH_W=echo
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1762 if test -z "$CSHARPBIN" ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1763 CSHARPCILINTERPRETER=""
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1764 CSHARPCILINTERPRETER_FLAGS=""
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1765 if test "cscc" = "$CSHARPCOMPILER" ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1766 AC_CHECK_PROGS(CSHARPCILINTERPRETER, ilrun)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1767 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1768 if test "mcs" = "$CSHARPCOMPILER"; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1769 # Check that mcs is the C# compiler and not the Unix mcs utility by examining the output of 'mcs --version'
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1770 # The Mono compiler should emit: Mono C# compiler version a.b.c.d
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1771 csharp_version_raw=`(mcs --version) 2>/dev/null`
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1772 csharp_version_searched=`(mcs --version | sed -e "/C#/b" -e "/Mono/b" -e d) 2>/dev/null` # return string if contains 'Mono' or 'C#'
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1773 CSHARPCOMPILER=""
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1774 if test -n "$csharp_version_raw" ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1775 if test "$csharp_version_raw" = "$csharp_version_searched" ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1776 CSHARPCOMPILER="mcs"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1777 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1778 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1779 if test "mcs" != "$CSHARPCOMPILER" ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1780 echo "mcs is not a working Mono C# compiler"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1781 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1782 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1783 if test "mcs" = "$CSHARPCOMPILER" || test "gmcs" = "$CSHARPCOMPILER"; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1784 AC_CHECK_PROGS(CSHARPCILINTERPRETER, mono) # Mono JIT
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1785 CSHARPCILINTERPRETER_FLAGS="--debug"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1786 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1787 if test "csc" = "$CSHARPCOMPILER"; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1788 CSHARPPATHSEPARATOR="\\\\"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1789 CSHARPCYGPATH_W='cygpath -w'
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1790 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1791 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1792 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1793 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1794 CSHARPCILINTERPRETER="$CSHARPBIN"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1795 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1796
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1797 # Cygwin requires the Windows standard (Pascal) calling convention as it is a Windows executable and not a Cygwin built executable
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1798 case $host in
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1799 *-*-cygwin* | *-*-mingw*)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1800 if test "$GCC" = yes; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1801 CSHARPDYNAMICLINKING=" -mno-cygwin -mthreads -Wl,--add-stdcall-alias"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1802 CSHARPCFLAGS="-mno-cygwin -mthreads"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1803 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1804 CSHARPDYNAMICLINKING=""
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1805 CSHARPCFLAGS=""
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1806 fi ;;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1807 *)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1808 CSHARPDYNAMICLINKING=""
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1809 CSHARPCFLAGS=""
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1810 ;;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1811 esac
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1812
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1813 # CSharp on Windows platforms including Cygwin doesn't use libname.dll, rather name.dll when loading dlls
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1814 case $host in
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1815 *-*-cygwin* | *-*-mingw*) CSHARPLIBRARYPREFIX="";;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1816 *)CSHARPLIBRARYPREFIX="lib";;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1817 esac
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1818
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1819 # C#/Mono on Mac OS X tweaks
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1820 case $host in
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1821 *-*-darwin*)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1822 CSHARPSO=".so"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1823 ;;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1824 *)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1825 CSHARPSO=$SO
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1826 ;;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1827 esac
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1828 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1829
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1830 AC_SUBST(CSHARPCILINTERPRETER_FLAGS)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1831 AC_SUBST(CSHARPCILINTERPRETER)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1832 AC_SUBST(CSHARPPATHSEPARATOR)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1833 AC_SUBST(CSHARPCYGPATH_W)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1834 AC_SUBST(CSHARPCOMPILER)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1835 AC_SUBST(CSHARPDYNAMICLINKING)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1836 AC_SUBST(CSHARPLIBRARYPREFIX) # Is this going to be used?
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1837 AC_SUBST(CSHARPCFLAGS)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1838 AC_SUBST(CSHARPSO)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1839
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1840 #----------------------------------------------------------------
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1841 # Look for Lua
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1842 #----------------------------------------------------------------
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1843
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1844 LUABIN=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1845 LUAINCLUDE=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1846 LUALIB=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1847 LUADYNAMICLOADLIB=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1848 LUAFLAGS=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1849 LUALINK=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1850 # note: if LUABIN is empty then lua tests will not be done
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1851 # LUABIN will be cleared if certain dependencies cannot be found
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1852
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1853 AC_ARG_WITH(lua, AS_HELP_STRING([--without-lua], [Disable Lua])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1854 AS_HELP_STRING([--with-lua=path], [Set location of Lua executable]),[ LUABIN="$withval"], [LUABIN=yes])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1855 AC_ARG_WITH(luaincl,[ --with-luaincl=path Set location of Lua include directory],[
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1856 LUAINCLUDE="$withval"], [LUAINCLUDE=])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1857 AC_ARG_WITH(lualib,[ --with-lualib=path Set location of Lua library directory],[
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1858 LUALIB="$withval"], [LUALIB=])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1859
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1860 # First, check for "--without-lua" or "--with-lua=no".
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1861 if test x"${LUABIN}" = xno -o x"${with_alllang}" = xno ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1862 AC_MSG_NOTICE([Disabling Lua])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1863 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1864
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1865 # can we find lua?
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1866 if test "x$LUABIN" = xyes; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1867 # We look for a versioned Lua binary first, as there can be
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1868 # multiple versions of Lua installed on some systems (like Debian).
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1869 # The search order should match the include-file and library search
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1870 # orders below (a Lua shared library built for one version may not
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1871 # work with a Lua binary of a different version).
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1872 AC_PATH_PROGS(LUABIN, [lua5.2 lua5.1 lua])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1873 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1874
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1875 # check version: we need Lua 5.x
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1876 if test "$LUABIN"; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1877 AC_MSG_CHECKING(Lua version)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1878 # if version 5.x
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1879 LUAV5=`$LUABIN -e 'if string.sub(_VERSION,5,5)=="5" then print "1" end'`
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1880 # if not version 5.0
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1881 LUAV51=`$LUABIN -e 'if string.sub(_VERSION,5,7)~="5.0" then print "1" end'`
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1882
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1883 if test -z "$LUAV5"; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1884 AC_MSG_WARN(Not Lua 5.x, SWIG does not support this version of Lua)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1885 LUABIN=""
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1886 elif test -z "$LUAV51"; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1887 AC_MSG_RESULT(Lua 5.0.x)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1888 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1889 AC_MSG_RESULT(Lua 5.1 or later)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1890 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1891 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1892
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1893 if test "$LUABIN"; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1894 AC_MSG_CHECKING(whether Lua dynamic loading is enabled)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1895 # using Lua to check Lua
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1896 # lua 5.0 & 5.1 have different fn names
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1897 if test -z "$LUAV51"; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1898 LUADYNAMICLOADLIB=`$LUABIN -e '_,_,c=loadlib("no_such_lib","") if c~="absent" then print "1" end'`
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1899 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1900 LUADYNAMICLOADLIB=`$LUABIN -e '_,_,c=package.loadlib("no_such_lib","") if c~="absent" then print "1" end'`
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1901 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1902
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1903 if test -z "$LUADYNAMICLOADLIB"; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1904 AC_MSG_RESULT(no)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1905 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1906 AC_MSG_RESULT(yes)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1907 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1908 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1909
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1910 # look for the header files & set LUAFLAGS accordingly
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1911 # will clear LUABIN if not present
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1912 if test -n "$LUAINCLUDE"; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1913 AC_CHECK_FILE($LUAINCLUDE/lua.h,[LUAFLAGS="$ISYSTEM$LUAINCLUDE"],[LUABIN=])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1914 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1915 LUA_OK="1"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1916 AC_CHECK_HEADER(lua.h,[LUAFLAGS=""],[LUA_OK=""])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1917 # if we didn't get it, going to have to look elsewhere (the hard way)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1918 if test -z "$LUA_OK"; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1919 AC_MSG_CHECKING(for lua.h in other locations)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1920 # note: Debian/Ubuntu seem to like /usr/include/lua5.1/lua.h
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1921 # The ordering of the include directories to search should match
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1922 # the ordering of libraries to search in the library test below.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1923 inc=/usr/include
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1924 dirs="$inc/lua5.2 $inc/lua5.1 $inc/lua51 $inc/lua5.0 $inc/lua50 /usr/local/include"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1925 for i in $dirs; do
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1926 #echo "$i"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1927 if test -r $i/lua.h; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1928 AC_MSG_RESULT($i/lua.h)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1929 LUAFLAGS="$ISYSTEM$i"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1930 break
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1931 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1932 done
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1933 if test -z "$LUAFLAGS"; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1934 AC_MSG_RESULT(not found)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1935 LUABIN="" # clear the bin
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1936 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1937 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1938 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1939
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1940 # look for the library files & set LUALINK accordingly
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1941 # will clear LUABIN if not present
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1942 lua_save_LIBS=$LIBS # the code seems to disrupt LIBS, so saving
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1943
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1944 if test -n "$LUALIB"; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1945 AC_CHECK_FILE($LUALIB/liblua.a,[LUALINK="-L$LUALIB -llua"],[LUABIN=])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1946 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1947 AC_SEARCH_LIBS(lua_close, [lua lua5.2 lua5.1 lua51 lua5.0 lua50], [LUALINK="-l$ac_lib"],[LUABIN=])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1948 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1949
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1950 # adding lualib for lua 5.0
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1951 if test -z "$LUAV51"; then # extra for lua 5.0
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1952 LUALINK="$LUALINK -llualib"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1953 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1954
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1955 LIBS=$lua_save_LIBS # restore LIBS
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1956
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1957 fi # if not disabled
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1958
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1959 AC_SUBST(LUADYNAMICLINKING)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1960 AC_SUBST(LUAFLAGS)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1961 AC_SUBST(LUALINK)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1962 AC_SUBST(LUABIN)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1963
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1964 #----------------------------------------------------------------
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1965 # Look for Allegro Common Lisp
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1966 #----------------------------------------------------------------
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1967
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1968 ALLEGROCLBIN=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1969
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1970 AC_ARG_WITH(allegrocl, AS_HELP_STRING([--without-allegrocl], [Disable Allegro CL])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1971 AS_HELP_STRING([--with-allegrocl=path], [Set location of Allegro CL executable (alisp)]),[ ALLEGROCLBIN="$withval"], [ALLEGROCLBIN=yes])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1972
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1973 # First, check for "--without-allegrocl" or "--with-allegrocl=no".
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1974 if test x"${ALLEGROCLBIN}" = xno -o x"${with_alllang}" = xno ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1975 AC_MSG_NOTICE([Disabling Allegro CL])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1976 ALLEGROCLBIN=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1977 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1978
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1979 # can we find allegrocl?
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1980 if test "x$ALLEGROCLBIN" = xyes; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1981 AC_PATH_PROG(ALLEGROCLBIN, alisp)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1982 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1983 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1984
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1985 AC_SUBST(ALLEGROCLBIN)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1986
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1987 #----------------------------------------------------------------
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1988 # Look for GNU CLISP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1989 #----------------------------------------------------------------
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1990
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1991 CLISPBIN=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1992
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1993 AC_ARG_WITH(clisp, AS_HELP_STRING([--without-clisp], [Disable CLISP])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1994 AS_HELP_STRING([--with-clisp=path], [Set location of CLISP executable (clisp)]),[ CLISPBIN="$withval"], [CLISPBIN=yes])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1995
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1996 # First, check for "--without-clisp" or "--with-clisp=no".
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1997 if test x"${CLISPBIN}" = xno -o x"${with_alllang}" = xno ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1998 AC_MSG_NOTICE([Disabling CLISP])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1999 CLISPBIN=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2000 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2001
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2002 # can we find clisp?
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2003 if test "x$CLISPBIN" = xyes; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2004 AC_PATH_PROG(CLISPBIN, clisp)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2005 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2006 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2007
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2008 AC_SUBST(CLISPBIN)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2009
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2010 #----------------------------------------------------------------
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2011 # Look for GNU R
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2012 #----------------------------------------------------------------
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2013
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2014 RBIN=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2015
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2016 AC_ARG_WITH(r, AS_HELP_STRING([--without-r], [Disable R])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2017 AS_HELP_STRING([--with-r=path], [Set location of R executable (r)]),[ RBIN="$withval"], [RBIN=yes])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2018
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2019 # First, check for "--without-r" or "--with-r=no".
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2020 if test x"${RBIN}" = xno -o x"${with_alllang}" = xno ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2021 AC_MSG_NOTICE([Disabling R])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2022 RBIN=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2023 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2024
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2025 # can we find R?
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2026 if test "x$RBIN" = xyes; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2027 AC_PATH_PROG(RBIN, R)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2028 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2029 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2030
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2031 AC_SUBST(RBIN)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2032
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2033 #----------------------------------------------------------------
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2034 # Look for Go compilers
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2035 #----------------------------------------------------------------
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2036
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2037 AC_ARG_WITH(go, AS_HELP_STRING([--without-go], [Disable Go])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2038 AS_HELP_STRING([--with-go=path], [Set location of Go compiler]),[GOBIN="$withval"], [GOBIN=yes])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2039
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2040 if test x"${GOBIN}" = xno -o x"${with_alllang}" = xno ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2041 AC_MSG_NOTICE([Disabling Go])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2042 GO=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2043 GOC=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2044 GO1=false
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2045 GOGCC=false
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2046 GOOPT=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2047 GOVERSIONOPTION=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2048 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2049
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2050 if test "x$GOBIN" = xyes; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2051 AC_CHECK_PROGS(GO, go 6g 8g gccgo)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2052 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2053 GO="$GOBIN"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2054 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2055
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2056 GOGCC=false
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2057 GO1=false
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2058 GOOPT=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2059 GOVERSIONOPTION=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2060 if test -n "$GO" ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2061 if $GO --help 2>/dev/null | grep gccgo >/dev/null 2>&1 ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2062 GOGCC=true
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2063 GOVERSIONOPTION=--version
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2064 AC_MSG_CHECKING([whether gccgo version is too old])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2065 go_version=`$GO $GOVERSIONOPTION | sed -e 's/[^0-9]* \([0-9.]*\) .*$/\1/' -e 's/[.]//g'`
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2066 if test "$go_version" -lt 470; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2067 AC_MSG_RESULT([yes - minimum version is 4.7.0])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2068 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2069 AC_MSG_RESULT([no])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2070 if test "$go_version" -lt 480; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2071 GOOPT="-intgosize 32"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2072 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2073 AC_CHECK_SIZEOF([void *], [4])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2074 if test "$ac_cv_sizeof_void_p" = "8"; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2075 GOOPT="-intgosize 64"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2076 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2077 GOOPT="-intgosize 32"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2078 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2079 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2080 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2081 elif test "`echo $GO | sed -e 's|.*/||'`" = "go"; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2082 GO1=true
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2083 GOVERSIONOPTION=version
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2084 GOC=$(sh -c "$(go env) && echo \$GOCHAR")c
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2085 go_version=$($GO $GOVERSIONOPTION | sed -e 's/go version //')
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2086 case $go_version in
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2087 go1.0*) GOOPT="-intgosize 32" ;;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2088 *) if test "$GOC" = "6c"; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2089 GOOPT="-intgosize 64"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2090 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2091 GOOPT="-intgosize 32"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2092 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2093 ;;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2094 esac
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2095 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2096 GOC=`echo $GO | sed -e 's/g/c/'`
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2097 GOVERSIONOPTION=-V
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2098 AC_MSG_CHECKING([whether Go ($GO) version is too old])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2099 go_version=`$GO $GOVERSIONOPTION 2>/dev/null | sed -e 's/.*version.* \([[0-9]]*\).*/\1/'`
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2100 go_min_version=7077
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2101 if test "$go_version" != "" -a "$go_version" -lt $go_min_version; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2102 AC_MSG_RESULT([yes - minimum version is $go_min_version])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2103 GO=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2104 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2105 AC_MSG_RESULT([no])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2106 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2107 GOOPT="-intgosize 32"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2108 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2109 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2110 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2111
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2112 AC_SUBST(GOGCC)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2113 AC_SUBST(GO)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2114 AC_SUBST(GOC)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2115 AC_SUBST(GO1)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2116 AC_SUBST(GOOPT)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2117 AC_SUBST(GOVERSIONOPTION)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2118
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2119 #----------------------------------------------------------------
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2120 # Look for D
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2121 #----------------------------------------------------------------
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2122
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2123 AC_ARG_WITH(d, AS_HELP_STRING([--without-d], [Disable D]), [with_d="$withval"], [with_d=yes])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2124 AC_ARG_WITH(d1-compiler, [ --with-d1-compiler=path Set location of D1/Tango compiler (DMD compatible)],[D1COMPILERBIN="$withval"], [D1COMPILERBIN=])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2125 AC_ARG_WITH(d2-compiler, [ --with-d2-compiler=path Set location of D2 compiler (DMD compatible)],[D2COMPILERBIN="$withval"], [D2COMPILERBIN=])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2126
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2127
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2128 # First, check for "--without-d" or "--with-d=no".
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2129 if test x"${with_d}" = xno -o x"${with_alllang}" = xno ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2130 AC_MSG_NOTICE([Disabling D])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2131 D1COMPILER=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2132 D2COMPILER=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2133 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2134 old_ac_ext=$ac_ext
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2135 ac_ext=d
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2136
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2137 if test -z "$D1COMPILERBIN" ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2138 AC_CHECK_PROGS(D1COMPILER, dmd ldmd gdmd)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2139
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2140 if test -n "$D1COMPILER" ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2141 AC_MSG_CHECKING(whether the D1/Tango compiler works)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2142 cat > conftest.$ac_ext <<_ACEOF
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2143 import tango.io.Stdout;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2144 void main() {
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2145 }
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2146 _ACEOF
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2147 rm -f conftest.$ac_objext
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2148 AS_IF(
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2149 [_AC_DO_STDERR($D1COMPILER conftest.$ac_ext) && test ! -s conftest.err && test -s conftest.$ac_objext],
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2150 [AC_MSG_RESULT([yes])],
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2151 [_AC_MSG_LOG_CONFTEST AC_MSG_RESULT([no])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2152 D1COMPILER=]
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2153 )
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2154 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2155 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2156 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2157 D1COMPILER="$D1COMPILERBIN"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2158 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2159
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2160 if test -z "$D2COMPILERBIN" ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2161 AC_CHECK_PROGS(D2COMPILER, dmd gdmd)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2162
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2163 if test -n "$D2COMPILER" ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2164 AC_MSG_CHECKING(whether the D2 compiler works)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2165 cat > conftest.$ac_ext <<_ACEOF
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2166 import std.algorithm;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2167 void main() {
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2168 }
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2169 _ACEOF
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2170 rm -f conftest.$ac_objext
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2171 AS_IF(
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2172 [_AC_DO_STDERR($D2COMPILER conftest.$ac_ext) && test ! -s conftest.err && test -s conftest.$ac_objext],
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2173 [AC_MSG_RESULT([yes])],
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2174 [_AC_MSG_LOG_CONFTEST AC_MSG_RESULT([no])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2175 D2COMPILER=]
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2176 )
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2177 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2178 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2179 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2180 D2COMPILER="$D2COMPILERBIN"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2181 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2182
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2183 ac_ext=$old_ac_ext
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2184 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2185
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2186 if test -n "$D1COMPILER"; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2187 DDEFAULTVERSION=1
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2188 elif test -n "$D2COMPILER"; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2189 DDEFAULTVERSION=2
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2190 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2191
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2192 # Do not prefix library file names with "lib" on Windows.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2193 case $host in
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2194 *-*-cygwin* | *-*-mingw*) DLIBPREFIX="";;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2195 *)DLIBPREFIX="lib";;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2196 esac
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2197
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2198 AC_SUBST(D1COMPILER)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2199 AC_SUBST(D2COMPILER)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2200 AC_SUBST(DDEFAULTVERSION)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2201 AC_SUBST(DLIBPREFIX)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2202
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2203 #----------------------------------------------------------------
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2204 # Determine which languages to use for examples/test-suite
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2205 #----------------------------------------------------------------
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2206
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2207 SKIP_TCL=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2208 if test -z "$TCLINCLUDE" || test -z "$TCLLIB" ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2209 SKIP_TCL="1"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2210 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2211 AC_SUBST(SKIP_TCL)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2212
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2213
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2214 SKIP_PERL5=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2215 if test -z "$PERL" || test -z "$PERL5EXT" ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2216 SKIP_PERL5="1"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2217 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2218 AC_SUBST(SKIP_PERL5)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2219
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2220
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2221 SKIP_OCTAVE=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2222 if test -z "$OCTAVE" ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2223 SKIP_OCTAVE="1"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2224 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2225 AC_SUBST(SKIP_OCTAVE)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2226
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2227
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2228 SKIP_PYTHON=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2229 if (test -z "$PYINCLUDE") &&
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2230 (test -z "$PY3INCLUDE") ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2231 SKIP_PYTHON="1"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2232 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2233 AC_SUBST(SKIP_PYTHON)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2234
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2235 SKIP_PYTHON3=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2236 if test -z "$PY3INCLUDE" ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2237 SKIP_PYTHON3="1"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2238 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2239 AC_SUBST(SKIP_PYTHON3)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2240
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2241 SKIP_JAVA=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2242 if test -z "$JAVA" || test -z "$JAVAC" || test -z "$JAVAINC" ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2243 SKIP_JAVA="1"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2244 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2245 AC_SUBST(SKIP_JAVA)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2246
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2247
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2248 SKIP_GUILE=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2249 if test -z "$GUILE" || test -z "$GUILE_LIBS" ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2250 SKIP_GUILE="1"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2251 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2252 AC_SUBST(SKIP_GUILE)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2253
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2254
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2255 SKIP_MZSCHEME=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2256 if test -z "$MZC" || test -z "$MZDYNOBJ" ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2257 SKIP_MZSCHEME="1"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2258 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2259 AC_SUBST(SKIP_MZSCHEME)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2260
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2261
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2262 SKIP_RUBY=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2263 if test -z "$RUBY" || test -z "$RUBYINCLUDE" || test -z "$RUBYLIB" ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2264 SKIP_RUBY="1"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2265 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2266 AC_SUBST(SKIP_RUBY)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2267
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2268
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2269 SKIP_PHP=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2270 if test -z "$PHP" || test -z "$PHPINC" ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2271 SKIP_PHP="1"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2272 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2273 AC_SUBST(SKIP_PHP)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2274
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2275
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2276 SKIP_OCAML=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2277 if test -z "$OCAMLBIN" || test -z "$OCAMLINC" ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2278 SKIP_OCAML="1"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2279 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2280 AC_SUBST(SKIP_OCAML)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2281
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2282
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2283 SKIP_PIKE=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2284 if test -z "$PIKE" || test -z "$PIKEINCLUDE" ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2285 SKIP_PIKE="1"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2286 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2287 AC_SUBST(SKIP_PIKE)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2288
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2289
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2290 SKIP_CHICKEN=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2291 if test -z "$CHICKEN_CSC" || test -z "$CHICKEN"; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2292 SKIP_CHICKEN="1"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2293 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2294 AC_SUBST(SKIP_CHICKEN)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2295
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2296
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2297 SKIP_CSHARP=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2298 if test -z "$CSHARPCOMPILER" ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2299 SKIP_CSHARP="1"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2300 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2301 if test "cscc" = "$CSHARPCOMPILER" && test -z "$CSHARPCILINTERPRETER" ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2302 SKIP_CSHARP="1"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2303 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2304 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2305 AC_SUBST(SKIP_CSHARP)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2306
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2307 SKIP_MODULA3="1" # Always skipped!
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2308 AC_SUBST(SKIP_MODULA3)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2309
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2310 SKIP_LUA=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2311 # we need LUABIN & dynamic loading
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2312 if test -z "$LUABIN" || test -z "$LUADYNAMICLOADLIB"; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2313 SKIP_LUA="1"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2314 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2315 AC_SUBST(SKIP_LUA)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2316
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2317 SKIP_ALLEGROCL=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2318 if test -z "$ALLEGROCLBIN" ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2319 SKIP_ALLEGROCL="1"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2320 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2321 AC_SUBST(SKIP_ALLEGROCL)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2322
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2323 SKIP_CLISP=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2324 if test -z "$CLISPBIN" ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2325 SKIP_CLISP="1"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2326 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2327 AC_SUBST(SKIP_CLISP)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2328
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2329 SKIP_R=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2330 if test -z "$RBIN" ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2331 SKIP_R="1"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2332 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2333 AC_SUBST(SKIP_R)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2334
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2335 SKIP_CFFI=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2336 #if test -z "$CFFIBIN" ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2337 SKIP_CFFI="1"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2338 #fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2339 AC_SUBST(SKIP_CFFI)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2340
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2341 SKIP_UFFI=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2342 #if test -z "$UFFIBIN" ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2343 SKIP_UFFI="1"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2344 #fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2345 AC_SUBST(SKIP_UFFI)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2346
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2347 SKIP_GO=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2348 if test -z "$GO" ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2349 SKIP_GO="1"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2350 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2351 AC_SUBST(SKIP_GO)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2352
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2353 SKIP_D=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2354 if test -z "$DDEFAULTVERSION" ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2355 SKIP_D="1"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2356 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2357 AC_SUBST(SKIP_D)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2358
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2359 #----------------------------------------------------------------
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2360 # Additional language dependencies
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2361 #----------------------------------------------------------------
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2362 SKIP_GCJ=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2363 if test -z "$GCJ" || test -z "$GCJH" ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2364 SKIP_GCJ="1"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2365 else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2366 if test "$GCC" != yes; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2367 SKIP_GCJ="1"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2368 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2369 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2370 AC_SUBST(SKIP_GCJ)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2371
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2372
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2373 SKIP_ANDROID=
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2374 if test -z "$ANDROID" || test -z "$ADB" || test -z "$ANT" || test -z "$NDKBUILD" ; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2375 SKIP_ANDROID="1"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2376 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2377 AC_SUBST(SKIP_ANDROID)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2378
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2379
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2380
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2381 #----------------------------------------------------------------
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2382 # Miscellaneous
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2383 #----------------------------------------------------------------
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2384
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2385
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2386 # Root directory
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2387 # Translate path for native Windows compilers for use with 'make check'
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2388 ROOT_DIR=`pwd`
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2389 case $host in
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2390 *-*-cygwin* | *-*-mingw*)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2391 if (cygpath --mixed $ROOT_DIR) >/dev/null 2>/dev/null; then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2392 ROOT_DIR=`cygpath --mixed $ROOT_DIR`
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2393 fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2394 # Extra files generated by some Windows compilers
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2395 EXTRA_CLEAN="*.stackdump *.exp *.lib *.pdb *.ilk"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2396 ;;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2397 esac
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2398
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2399 AC_SUBST(ROOT_DIR)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2400 AC_SUBST(EXTRA_CLEAN)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2401 AC_SUBST(ac_aux_dir)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2402
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2403 # Configure SWIG_LIB path
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2404
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2405 AC_ARG_WITH(swiglibdir,[ --with-swiglibdir=DIR Put SWIG system-independent libraries into DIR.],
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2406 [swig_lib="$withval"], [swig_lib="${datadir}/swig/${PACKAGE_VERSION}"])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2407 AC_SUBST(swig_lib)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2408 AC_DEFINE_DIR(SWIG_LIB, swig_lib, [Directory for SWIG system-independent libraries])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2409
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2410 case $build in
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2411 # Windows does not understand unix directories. Convert into a windows directory with drive letter.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2412 *-*-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.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2413 *-*-cygwin*) SWIG_LIB_WIN_UNIX=`cygpath --mixed "$SWIG_LIB"`;;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2414 *) SWIG_LIB_WIN_UNIX="";;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2415 esac
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2416 AC_DEFINE_UNQUOTED(SWIG_LIB_WIN_UNIX, ["$SWIG_LIB_WIN_UNIX"], [Directory for SWIG system-independent libraries (Unix install on native Windows)])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2417
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2418 AC_CONFIG_FILES([ \
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2419 Makefile \
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2420 swig.spec \
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2421 Source/Makefile \
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2422 Examples/Makefile \
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2423 Examples/xml/Makefile \
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2424 Examples/test-suite/chicken/Makefile \
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2425 Examples/test-suite/csharp/Makefile \
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2426 Examples/test-suite/d/Makefile \
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2427 Examples/test-suite/guile/Makefile \
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2428 Examples/test-suite/java/Makefile \
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2429 Examples/test-suite/mzscheme/Makefile \
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2430 Examples/test-suite/ocaml/Makefile \
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2431 Examples/test-suite/octave/Makefile \
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2432 Examples/test-suite/perl5/Makefile \
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2433 Examples/test-suite/php/Makefile \
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2434 Examples/test-suite/pike/Makefile \
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2435 Examples/test-suite/python/Makefile \
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2436 Examples/test-suite/ruby/Makefile \
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2437 Examples/test-suite/tcl/Makefile \
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2438 Examples/test-suite/lua/Makefile \
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2439 Examples/test-suite/allegrocl/Makefile \
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2440 Examples/test-suite/clisp/Makefile \
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2441 Examples/test-suite/cffi/Makefile \
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2442 Examples/test-suite/uffi/Makefile \
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2443 Examples/test-suite/r/Makefile \
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2444 Examples/test-suite/go/Makefile \
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2445 Lib/ocaml/swigp4.ml
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2446 ])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2447 AC_CONFIG_FILES([preinst-swig], [chmod +x preinst-swig])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2448 AC_CONFIG_FILES([CCache/ccache_swig_config.h])
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2449
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2450 AC_OUTPUT
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2451 dnl configure.ac ends here