diff --git a/configure.in b/configure.in index 7e1e78cfd..aadb6221c 100644 --- a/configure.in +++ b/configure.in @@ -1,4 +1,11 @@ dnl Process this file with autoconf to produce a configure script. + +dnl NOTES: +dnl * As of 1.34, we no longer use and test for "nope" to indicate +dnl an empty variable. Instead, we use `VAR=' (set the variable +dnl to nothing) and `test -z "$VAR"' or `test -n "$VAR"' as the +dnl case may be. --ttn, 2000/08/04 12:11:26 + AC_INIT(Source/Swig/swig.h) AC_PREREQ(2.0) . $srcdir/VERSION @@ -231,8 +238,8 @@ fi if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then AC_MSG_CHECKING(for X11 header files) XINCLUDES="# no special path needed" - AC_TRY_CPP([#include ], , XINCLUDES="nope") - if test "$XINCLUDES" = nope; then + AC_TRY_CPP([#include ], , XINCLUDES="") + if test -z "$XINCLUDES"; then 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" for i in $dirs ; do if test -r $i/X11/Intrinsic.h; then @@ -249,14 +256,14 @@ else XINCLUDES="# no special path needed" fi fi -if test "$XINCLUDES" = nope; then +if test -z "$XINCLUDES"; then AC_MSG_RESULT(couldn't find any!) XINCLUDES="# no include files found" fi if test "$no_x" = yes; then AC_MSG_CHECKING(for X11 libraries) - XLIBSW=nope + XLIBSW= 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" for i in $dirs ; do if test -r $i/libX11.a -o -r $i/libX11.so -o -r $i/libX11.sl; then @@ -272,10 +279,10 @@ else XLIBSW="-L$x_libraries -lX11" fi fi -if test "$XLIBSW" = nope ; then +if test -z "$XLIBSW" ; then AC_CHECK_LIB(Xwindow, XCreateWindow, XLIBSW=-lXwindow) fi -if test "$XLIBSW" = nope ; then +if test -z "$XLIBSW" ; then AC_MSG_RESULT(couldn't find any! Using -lX11.) XLIBSW=-lX11 fi @@ -287,33 +294,33 @@ AC_SUBST(XLIBSW) # Try to locate the Tcl package #-------------------------------------------------------------------- -TCLINCLUDE=nope -TCLLIB=nope -TCLPACKAGE=nope +TCLINCLUDE= +TCLLIB= +TCLPACKAGE= AC_ARG_WITH(tcl,[ --with-tcl=path Set location of Tcl package],[ - TCLPACKAGE="$withval"], [TCLPACKAGE=nope]) + TCLPACKAGE="$withval"], [TCLPACKAGE=]) AC_ARG_WITH(tclincl,[ --with-tclincl=path Set location of Tcl include directory],[ - TCLINCLUDE="-I$withval"], [TCLINCLUDE=nope]) + TCLINCLUDE="-I$withval"], [TCLINCLUDE=]) AC_ARG_WITH(tcllib,[ --with-tcllib=path Set location of Tcl library directory],[ - TCLLIB="-L$withval"], [TCLLIB=nope]) + TCLLIB="-L$withval"], [TCLLIB=]) -if test "$TCLINCLUDE" = nope; then - if test "$TCLPACKAGE" != nope; then +if test -z "$TCLINCLUDE"; then + if test -n "$TCLPACKAGE"; then TCLINCLUDE="-I$TCLPACKAGE/include" fi fi -if test "$TCLLIB" = nope; then - if test "$TCLPACKAGE" != nope; then +if test -z "$TCLLIB"; then + if test -n "$TCLPACKAGE"; then TCLLIB="-L$TCLPACKAGE/lib" fi fi AC_MSG_CHECKING(for Tcl header files) -if test "$TCLINCLUDE" = nope; then -AC_TRY_CPP([#include ], , TCLINCLUDE="nope") -if test "$TCLINCLUDE" = nope; then +if test -z "$TCLINCLUDE"; then +AC_TRY_CPP([#include ], , TCLINCLUDE="") +if test -z "$TCLINCLUDE"; then dirs="$prefix/include /usr/local/include /usr/include /opt/local/include /home/sci/local/include" for i in $dirs ; do if test -r $i/tcl.h; then @@ -323,7 +330,7 @@ if test "$TCLINCLUDE" = nope; then fi done fi -if test "$TCLINCLUDE" = nope; then +if test -z "$TCLINCLUDE"; then TCLINCLUDE="-I/usr/local/include" AC_MSG_RESULT(not found) fi @@ -332,7 +339,7 @@ else fi AC_MSG_CHECKING(for Tcl library) -if test "$TCLLIB" = nope; then +if test -z "$TCLLIB"; then dirs="$prefix/lib /usr/local/lib /usr/lib /opt/local/lib /home/sci/local/lib" for i in $dirs ; do if test -r $i/libtcl.a; then @@ -341,7 +348,7 @@ for i in $dirs ; do break fi done -if test "$TCLLIB" = nope; then +if test -z "$TCLLIB"; then AC_MSG_RESULT(not found) TCLLIB="-L/usr/local/lib" fi @@ -356,26 +363,26 @@ AC_SUBST(TCLLIB) # Look for Python #---------------------------------------------------------------- -PYINCLUDE=nope -PYLIB=nope -PYPACKAGE=nope +PYINCLUDE= +PYLIB= +PYPACKAGE= PYLINK="-lModules -lPython -lObjects -lParser" AC_ARG_WITH(py,[ --with-py=path Set location of Python],[ - PYPACKAGE="$withval"], [PYPACKAGE=nope]) + PYPACKAGE="$withval"], [PYPACKAGE=]) AC_ARG_WITH(pyincl,[ --with-pyincl=path Set location of Python include directory],[ - PYINCLUDE="$withval"], [PYINCLUDE=nope]) + PYINCLUDE="$withval"], [PYINCLUDE=]) AC_ARG_WITH(pylib,[ --with-pylib=path Set location of Python library directory],[ - PYLIB="$withval"], [PYLIB=nope]) + PYLIB="$withval"], [PYLIB=]) -if test "$PYINCLUDE" = nope; then - if test "$PYPACKAGE" != nope; then +if test -z "$PYINCLUDE"; then + if test -n "$PYPACKAGE"; then PYINCLUDE="$PYPACKAGE/include" fi fi -if test "$PYLIB" = nope; then - if test "$PYPACKAGE" != nope; then +if test -z "$PYLIB"; then + if test -n "$PYPACKAGE"; then PYLIB="$PYPACKAGE/lib" fi fi @@ -391,7 +398,7 @@ for i in $dirs ; do break fi done -if test "$PYINCLUDE" = nope; then +if test -z "$PYINCLUDE"; then PYINCLUDE="-I/usr/local/include/Py" AC_MSG_RESULT(not found) fi @@ -414,7 +421,7 @@ for i in $dirs ; do break fi done -if test "$PYLIB" = nope; then +if test -z "$PYLIB"; then AC_MSG_RESULT(not found) PYLIB="/usr/local/lib/python/lib" PYINCLUDE="$PYINCLUDE -I$PYLIB" @@ -428,19 +435,19 @@ AC_SUBST(PYLINK) # Look for Perl5 #---------------------------------------------------------------- -PERLBIN=nope +PERLBIN= -AC_ARG_WITH(perl5,[ --with-perl5=path Set location of Perl5 executable],[ PERLBIN="$withval"], [PERLBIN=nope]) +AC_ARG_WITH(perl5,[ --with-perl5=path Set location of Perl5 executable],[ PERLBIN="$withval"], [PERLBIN=]) # First figure out what the name of Perl5 is -if test "$PERLBIN" = nope; then -AC_CHECK_PROGS(PERL, perl5.004 perl5.003 perl5.002 perl5.001 perl5 perl,nope) +if test -z "$PERLBIN"; then +AC_CHECK_PROGS(PERL, perl5.004 perl5.003 perl5.002 perl5.001 perl5 perl) else PERL="$PERLBIN" fi AC_MSG_CHECKING(for Perl5 header files) -if test "$PERL" != nope; then +if test -n "$PERL"; then PERL5DIR=`($PERL -e 'use Config; print $Config{archlib};') 2>/dev/null` if test "$PERL5DIR" != ""; then dirs="$PERL5DIR $PERL5DIR/CORE" @@ -471,25 +478,25 @@ AC_SUBST(PERL5EXT) # Look for java #---------------------------------------------------------------- -AC_ARG_WITH(java, [ --with-java=path Set location of Java],[JAVABIN="$withval"], [JAVABIN=nope]) -AC_ARG_WITH(javac, [ --with-javac=path Set location of Javac],[JAVACBIN="$withval"], [JAVACBIN=nope]) +AC_ARG_WITH(java, [ --with-java=path Set location of Java],[JAVABIN="$withval"], [JAVABIN=]) +AC_ARG_WITH(javac, [ --with-javac=path Set location of Javac],[JAVACBIN="$withval"], [JAVACBIN=]) -if test "$JAVABIN" = nope ; then - AC_CHECK_PROGS(JAVA, java kaffe guavac, nope) +if test -z "$JAVABIN" ; then + AC_CHECK_PROGS(JAVA, java kaffe guavac) else JAVA="$JAVABIN" fi -if test "$JAVACBIN" = nope ; then - AC_CHECK_PROGS(JAVAC, javac, nope) +if test -z "$JAVACBIN" ; then + AC_CHECK_PROGS(JAVAC, javac) else JAVAC="$JAVACBIN" fi AC_MSG_CHECKING(for java include file jni.h) -AC_ARG_WITH(javaincl, [ --with-javaincl=path Set location of Java include directory], [JAVAINCDIR="$withval"], [JAVAINCDIR=nope]) +AC_ARG_WITH(javaincl, [ --with-javaincl=path Set location of Java include directory], [JAVAINCDIR="$withval"], [JAVAINCDIR=]) -if test "$JAVAINCDIR" = nope; then +if test -z "$JAVAINCDIR"; then JAVAINCDIR="/usr/jdk*/include /usr/local/jdk*/include /opt/jdk*/include /usr/java/include /usr/local/java/include /opt/java/include /usr/include/java /usr/local/include/java /usr/include/kaffe /usr/local/include/kaffe /usr/include /usr/local/include" fi @@ -528,31 +535,31 @@ AC_SUBST(ROOT_DIR)ROOT_DIR=`pwd` # Look for Guile #---------------------------------------------------------------- -GUILEINCLUDE=nope -GUILELIB=nope -GUILELINK=nope +GUILEINCLUDE= +GUILELIB= +GUILELINK= AC_PATH_PROG(GUILE_CONFIG, guile-config) if test -n "$GUILE_CONFIG" ; then - GUILEPACKAGE=nope + GUILEPACKAGE= AC_ARG_WITH(guile,[ --with-guile=path Set location of Guile],[ - GUILEPACKAGE="$withval"], [GUILEPACKAGE=nope]) + GUILEPACKAGE="$withval"], [GUILEPACKAGE=]) AC_ARG_WITH(guilencl,[ --with-guileincl=path Set location of Guile include directory],[ - GUILEINCLUDE="$withval"], [GUILEINCLUDE=nope]) + GUILEINCLUDE="$withval"], [GUILEINCLUDE=]) AC_ARG_WITH(guilelib,[ --with-guilelib=path Set location of Guile library directory],[ - GUILELIB="$withval"], [GUILELIB=nope]) + GUILELIB="$withval"], [GUILELIB=]) - if test "$GUILEINCLUDE" = nope; then - if test "$GUILEPACKAGE" != nope; then + if test -z "$GUILEINCLUDE"; then + if test -n "$GUILEPACKAGE"; then GUILEINCLUDE="$GUILEPACKAGE/include" fi fi - if test "$GUILELIB" = nope; then - if test "$GUILEPACKAGE" != nope; then + if test -z "$GUILELIB"; then + if test -n "$GUILEPACKAGE"; then GUILELIB="$GUILEPACKAGE/lib" fi fi @@ -567,7 +574,7 @@ if test -n "$GUILE_CONFIG" ; then break fi done - if test "$GUILEINCLUDE" = nope; then + if test -z "$GUILEINCLUDE"; then GUILEINCLUDE="-I/usr/local/include/guile" AC_MSG_RESULT(not found) fi @@ -581,7 +588,7 @@ if test -n "$GUILE_CONFIG" ; then break fi done - if test "$GUILELIB" = nope; then + if test -z "$GUILELIB"; then AC_MSG_RESULT(not found) GUILELIB="/usr/local/lib" fi @@ -604,19 +611,19 @@ AC_PATH_PROG(MZC, mzc) # Look for Ruby #---------------------------------------------------------------- -RUBYBIN=nope +RUBYBIN= -AC_ARG_WITH(ruby,[ --with-ruby=path Set location of Ruby executable],[ RUBYBIN="$withval"], [RUBYBIN=nope]) +AC_ARG_WITH(ruby,[ --with-ruby=path Set location of Ruby executable],[ RUBYBIN="$withval"], [RUBYBIN=]) # First figure out what the name of Ruby is -if test "$RUBYBIN" = nope; then -AC_CHECK_PROGS(RUBY, ruby, nope) +if test -z "$RUBYBIN"; then +AC_CHECK_PROGS(RUBY, ruby) else RUBY="$RUBYBIN" fi AC_MSG_CHECKING(for Ruby header files) -if test "$RUBY" != nope; then +if test -n "$RUBY"; then RUBYDIR=`($RUBY -rmkmf -e 'print $archdir') 2>/dev/null` if test "$RUBYDIR" != ""; then dirs="$RUBYDIR"