@@ -51,23 +51,23 @@ LHT_LIBDEPS="-lmicrohttpd"
5151
5252AC_ARG_WITH ( [ python] ,
5353 [ --with-python Compile PYTHON libraries] ,
54- [ python=true] )
54+ [ python=true; swig=true ] )
5555
5656AC_ARG_WITH ( [ php] ,
5757 [ --with-php Compile PHP libraries] ,
58- [ php=true] )
58+ [ php=true; swig=true ] )
5959
6060AC_ARG_WITH ( [ ruby] ,
6161 [ --with-ruby Compile RUBY libraries] ,
62- [ ruby=true] )
62+ [ ruby=true; swig=true ] )
6363
6464AC_ARG_WITH ( [ perl] ,
6565 [ --with-perl Compile PERL libraries] ,
66- [ perl=true] )
66+ [ perl=true; swig=true ] )
6767
6868AC_ARG_WITH ( [ lua] ,
6969 [ --with-lua Compile LUA libraries] ,
70- [ lua=true] )
70+ [ lua=true; swig=true ] )
7171
7272AC_ARG_WITH ( lua-include-dir ,
7373 [ --with-lua-include-dir=DIR where to look for lua headers] ,
@@ -81,7 +81,7 @@ AC_ARG_WITH(lua-include-dir,
8181
8282AC_ARG_WITH ( [ java] ,
8383 [ --with-java Compile JAVA libraries] ,
84- [ java=true] )
84+ [ java=true; swig=true ] )
8585
8686AC_ARG_WITH ( java-dir ,
8787 [ --with-java-dir=DIR where to look for jni headers and libs. We search for jni.h in 'java-dir/include/'] ,
@@ -93,6 +93,10 @@ AC_ARG_WITH(java-dir,
9393 fi
9494 ] )
9595
96+ AC_ARG_WITH ( [ guile] ,
97+ [ --with-guile Compile GUILE libraries] ,
98+ [ guile=true; swig=true] )
99+
96100AC_ARG_WITH ( doc ,
97101 [ --with-doc Compile DOC] ,
98102 [ doc=true] )
@@ -103,12 +107,21 @@ AM_CONDITIONAL([PHP], [test x$php = xtrue])
103107AM_CONDITIONAL([ PERL] , [ test x$perl = xtrue] )
104108AM_CONDITIONAL([ LUA] , [ test x$lua = xtrue] )
105109AM_CONDITIONAL([ RUBY] , [ test x$ruby = xtrue] )
110+ AM_CONDITIONAL([ GUILE] , [ test x$guile = xtrue] )
106111AM_CONDITIONAL([ DOC] , [ test x$doc = xtrue] )
107112
108113LANGUAGES="C++"
109114
115+ if test x$swig = xtrue; then
116+ AC_CHECK_PROG ( [ SWIG] , [ swig] , [ "yes"] , [ "no"] )
117+ if test "SWIG" = "no"
118+ then
119+ AC_MSG_ERROR ( swig not found )
120+ fi
121+ fi
122+
110123if test x$python = xtrue; then
111- AC_CHECK_PROG ( [ PYTHONCONFIG] ,[ python-config] ,[ "php-config "] , [ "no"] )
124+ AC_CHECK_PROG ( [ PYTHONCONFIG] ,[ python-config] ,[ "yes "] , [ "no"] )
112125 if test "$PYTHONCONFIG" = "no"
113126 then
114127 AC_MSG_ERROR ( python-config not found )
@@ -122,7 +135,7 @@ if test x$python = xtrue; then
122135 AC_SUBST ( PYLDFLAGS )
123136 AC_SUBST ( PYLIBS )
124137 AC_SUBST_FILE ( [ PYTHON_AUTOGENERATION] )
125- PYTHON_AUTOGENERATION=src/autogen_helpers/support_command
138+ PYTHON_AUTOGENERATION=$srcdir/ src/autogen_helpers/support_command
126139 LANGUAGES="$LANGUAGES Python"
127140fi
128141
@@ -152,12 +165,12 @@ if test x$java = xtrue; then
152165 AC_SUBST ( JAVALDFLAGS )
153166 AC_SUBST ( JABALIBS )
154167 AC_SUBST_FILE ( [ JAVA_AUTOGENERATION] )
155- JAVA_AUTOGENERATION=src/autogen_helpers/support_command
168+ JAVA_AUTOGENERATION=$srcdir/ src/autogen_helpers/support_command
156169 LANGUAGES="$LANGUAGES Java"
157170fi
158171
159172if test x$php = xtrue; then
160- AC_CHECK_PROG ( [ PHPCONFIG] ,[ php-config] ,[ "php-config "] , [ "no"] )
173+ AC_CHECK_PROG ( [ PHPCONFIG] ,[ php-config] ,[ "yes "] , [ "no"] )
161174 if test "$PHPCONFIG" = "no"
162175 then
163176 AC_MSG_ERROR ( php-config not found )
@@ -167,7 +180,7 @@ if test x$php = xtrue; then
167180 AC_SUBST ( PHPINCLUDES )
168181 AC_SUBST ( PHPLDFLAGS )
169182 AC_SUBST_FILE ( [ PHP_AUTOGENERATION] )
170- PHP_AUTOGENERATION=src/autogen_helpers/support_command
183+ PHP_AUTOGENERATION=$srcdir/ src/autogen_helpers/support_command
171184 LANGUAGES="$LANGUAGES PHP"
172185fi
173186
@@ -193,12 +206,12 @@ if test x$lua = xtrue; then
193206 fi
194207 AC_SUBST ( LUAINCLUDES )
195208 AC_SUBST_FILE ( [ LUA_AUTOGENERATION] )
196- LUA_AUTOGENERATION=src/autogen_helpers/support_command
209+ LUA_AUTOGENERATION=$srcdir/ src/autogen_helpers/support_command
197210 LANGUAGES="$LANGUAGES LUA"
198211fi
199212
200213if test x$perl = xtrue; then
201- AC_CHECK_PROG ( [ PERLINT] ,[ perl] ,[ "perl "] , [ "no"] )
214+ AC_CHECK_PROG ( [ PERLINT] ,[ perl] ,[ "yes "] , [ "no"] )
202215 if test "$PERLINT" = "no"
203216 then
204217 AC_MSG_ERROR ( perl interpreter not found )
@@ -208,12 +221,12 @@ if test x$perl = xtrue; then
208221 AC_SUBST ( PERLINCLUDES )
209222 AC_SUBST ( PERLDEFINES )
210223 AC_SUBST_FILE ( [ PERL_AUTOGENERATION] )
211- PERL_AUTOGENERATION=src/autogen_helpers/support_command
224+ PERL_AUTOGENERATION=$srcdir/ src/autogen_helpers/support_command
212225 LANGUAGES="$LANGUAGES Perl"
213226fi
214227
215228if test x$ruby = xtrue; then
216- AC_CHECK_PROG ( [ RUBYINT] ,[ ruby] ,[ "ruby "] , [ "no"] )
229+ AC_CHECK_PROG ( [ RUBYINT] ,[ ruby] ,[ "yes "] , [ "no"] )
217230 RUBYINCLUDES=""
218231 if test "$RUBYINT" = "no"
219232 then
@@ -238,10 +251,21 @@ if test x$ruby = xtrue; then
238251 AC_SUBST ( RUBYINCLUDES )
239252 AC_SUBST ( RUBYDEFINES )
240253 AC_SUBST_FILE ( [ RUBY_AUTOGENERATION] )
241- RUBY_AUTOGENERATION=src/autogen_helpers/support_command
254+ RUBY_AUTOGENERATION=$srcdir/ src/autogen_helpers/support_command
242255 LANGUAGES="$LANGUAGES Ruby"
243256fi
244257
258+ if test x$guile = xtrue; then
259+ AC_CHECK_PROG ( [ GUILEINT] ,[ guile] ,[ "yes"] , [ "no"] )
260+ if test "$GUILEINT" = "no"
261+ then
262+ AC_MSG_ERROR ( guile interpreter not found )
263+ fi
264+ AC_SUBST_FILE ( [ GUILE_AUTOGENERATION] )
265+ GUILE_AUTOGENERATION=$srcdir/src/autogen_helpers/support_command
266+ LANGUAGES="$LANGUAGES Guile"
267+ fi
268+
245269AC_SUBST ( LHT_LIBDEPS )
246270AC_SUBST ( CPPFLAGS )
247271AC_SUBST ( LIBS )
@@ -250,7 +274,7 @@ AC_SUBST(EXT_LIB_PATH)
250274AC_SUBST ( EXT_LIBS )
251275
252276AC_OUTPUT (
253- libhttpserver.pc Makefile src/Makefile src/python/Makefile src/java/Makefile src/php/Makefile src/lua/Makefile src/perl/Makefile src/ruby/Makefile
277+ libhttpserver.pc Makefile src/Makefile src/python/Makefile src/java/Makefile src/php/Makefile src/lua/Makefile src/perl/Makefile src/ruby/Makefile src/guile/Makefile
254278)
255279
256280AC_MSG_NOTICE ( [ Configuration Summary:
0 commit comments