/[cvs]/eggdrop1.9/configure.in
ViewVC logotype

Diff of /eggdrop1.9/configure.in

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.8 by fabian, Tue Oct 26 21:38:35 1999 UTC revision 1.9 by fabian, Wed Nov 10 21:35:00 1999 UTC
# Line 167  case "$SYSTEM" in Line 167  case "$SYSTEM" in
167      CFLAGS="$CFLAGS -Wall"      CFLAGS="$CFLAGS -Wall"
168      MOD_LD="${CC}"      MOD_LD="${CC}"
169      SHLIB_LD="${CC} -shared -nostartfiles"      SHLIB_LD="${CC} -shared -nostartfiles"
     DEFAULT_MAKE=debug  
170      AC_DEFINE(MODULES_OK)      AC_DEFINE(MODULES_OK)
171      ;;      ;;
172    Lynx)    Lynx)
# Line 181  case "$SYSTEM" in Line 180  case "$SYSTEM" in
180      AC_MSG_RESULT([   Digital OSF])      AC_MSG_RESULT([   Digital OSF])
181      if test "x$AWK" = "xgawk"      if test "x$AWK" = "xgawk"
182      then      then
183        AWK="awk"        AWK=awk
184      fi      fi
185      if test "x$INSTALL" = "x./install-sh"      if test "x$INSTALL" = "x./install-sh"
186      then      then
187        INSTALL="installbsd"        INSTALL=installbsd
188      fi      fi
189      MOD_CC="cc"      MOD_CC=cc
190      MOD_LD="cc"      MOD_LD=cc
191      SHLIB_CC="cc"      SHLIB_CC=cc
192      SHLIB_LD="ld -shared -expect_unresolved '*'"      SHLIB_LD="ld -shared -expect_unresolved '*'"
193      SHLIB_STRIP="touch"      SHLIB_STRIP=touch
194      AC_DEFINE(MODULES_OK)      AC_DEFINE(MODULES_OK)
195      ;;      ;;
196        1.0|1.1|1.2)        1.0|1.1|1.2)
# Line 273  else Line 272  else
272    AC_CHECK_LIB(dns,gethostbyname)    AC_CHECK_LIB(dns,gethostbyname)
273    AC_CHECK_LIB(dl,dlopen)    AC_CHECK_LIB(dl,dlopen)
274  dnl this is needed for Tcl compiled with thread support  dnl this is needed for Tcl compiled with thread support
275    AC_CHECK_LIB(pthread,pthread_create,ac_cv_lib_pthread_pthread_create=yes,ac_cv_lib_pthread_pthread_create=no)    AC_CHECK_LIB(pthread,pthread_mutex_init,
276    ac_cv_lib_pthread_pthread_mutex_init=yes,
277    ac_cv_lib_pthread_pthread_mutex_init=no)
278    if test "$SUNOS" = "yes"    if test "$SUNOS" = "yes"
279    then    then
280      dnl for suns without yp or something like that      dnl for suns without yp or something like that
# Line 400  tclheadernames="tcl.h" Line 401  tclheadernames="tcl.h"
401  tclheaderpaths="/usr/local/include /usr/local/pkgs/tcl/include \  tclheaderpaths="/usr/local/include /usr/local/pkgs/tcl/include \
402      /usr/include $HOME/include $HOME/tcl/include $HOME"      /usr/include $HOME/include $HOME/tcl/include $HOME"
403    
 tclconfigfile="tclConfig.sh"  
   
404  dnl oohh new configure --variables for those with multiple tcl libs  dnl oohh new configure --variables for those with multiple tcl libs
405  AC_ARG_WITH(tcllib, [  --with-tcllib=PATH      full path to tcl library], tcllibname=$withval)  AC_ARG_WITH(tcllib, [  --with-tcllib=PATH      full path to tcl library], tcllibname=$withval)
406  AC_ARG_WITH(tclinc, [  --with-tclinc=PATH      full path to tcl header], tclincname=$withval)  AC_ARG_WITH(tclinc, [  --with-tclinc=PATH      full path to tcl header], tclincname=$withval)
# Line 678  if test ! "x${TCLLIBFN}" = "x" && test ! Line 677  if test ! "x${TCLLIBFN}" = "x" && test !
677  then  then
678    
679    # find Tcl's version    # find Tcl's version
   TCL_PATCH_LEVEL=`grep TCL_PATCH_LEVEL $TCLINC/$TCLINCFN | head -1 | $AWK '{gsub(/\"/, "", $3); print $3}'`  
   if test ! "x${TCL_PATCH_LEVEL}" = "x"  
   then  
     TCL_VERSION=$TCL_PATCH_LEVEL  
   else  
680      TCL_VERSION=`grep TCL_VERSION $TCLINC/$TCLINCFN | head -1 | $AWK '{gsub(/\"/, "", $3); print $3}'`      TCL_VERSION=`grep TCL_VERSION $TCLINC/$TCLINCFN | head -1 | $AWK '{gsub(/\"/, "", $3); print $3}'`
681    fi    TCL_PATCH_LEVEL=`grep TCL_PATCH_LEVEL $TCLINC/$TCLINCFN | head -1 | $AWK '{gsub(/\"/, "", $3); print $3}'`
682  fi  fi
683    
684  # check if we found Tcl's version  # check if we found Tcl's version
685  AC_MSG_CHECKING(for Tcl version)  AC_MSG_CHECKING(for Tcl version)
686  if test ! "x${TCL_VERSION}" = "x"  if test ! "x${TCL_VERSION}" = "x"
687  then  then
688      if test ! "x${TCL_PATCH_LEVEL}" = "x"
689      then
690        AC_MSG_RESULT($TCL_PATCH_LEVEL)
691        TCL_FOUND=1
692      else
693    AC_MSG_RESULT($TCL_VERSION)    AC_MSG_RESULT($TCL_VERSION)
694    TCL_FOUND=1    TCL_FOUND=1
695      fi
696  else  else
697    AC_MSG_RESULT(not found)    AC_MSG_RESULT(not found)
698    TCL_FOUND=0    TCL_FOUND=0
# Line 739  TCL_VER_PRE75=`echo $TCL_VERSION | $AWK Line 739  TCL_VER_PRE75=`echo $TCL_VERSION | $AWK
739  changequote([, ])dnl  changequote([, ])dnl
740  if test "x${TCL_VER_PRE75}" = "xyes"  if test "x${TCL_VER_PRE75}" = "xyes"
741  then  then
742    AC_DEFINE(HAVE_OLD_TCL)    AC_DEFINE(HAVE_PRE7_5_TCL)
743  fi  fi
744    
745  # check for Tcl threads  # set TCL_TESTLIBS for Tcl library tests
746  AC_MSG_CHECKING(for Tcl threads)  if test ! "x${TCLLIBEXT}" = "x.a"
747  changequote(,)dnl  then
748  TCL_VER_POST81=`echo $TCL_VERSION | $AWK '{split($1, i, "."); if (((i[1] == 8) && (i[2] >= 1)) || (i[1] >= 9)) print "yes"; else print "no"}'`    TCL_TESTLIBS="-L$TCLLIB -l$TCLLIBFNS -lm $LIBS"
749  changequote([, ])dnl  else
750  if test "x${TCL_VER_POST81}" = "xyes"    if test ! "x${tcllibname}" = "x"
751      then
752        TCL_TESTLIBS="$TCLLIB/lib$TCLLIBFN -lm $LIBS"
753      else
754        TCL_TESTLIBS="-L$TCLLIB -l$TCLLIBFNS -lm $LIBS"
755      fi
756    fi
757    if test "x${ac_cv_lib_pthread_pthread_mutex_init}" = "xyes"
758  then  then
759      TCL_TESTLIBS="-lpthread $TCL_TESTLIBS"
760    fi
761    
762    # check for TclpFinalizeThreadData()  # check for Tcl_Free()
763    if eval "test \"`echo '$''{'ac_cv_var_tcl_threads'+set}'`\" = set"  AC_MSG_CHECKING(if Tcl library has Tcl_Free)
764    if eval "test \"`echo '$''{'ac_cv_var_tcl_free'+set}'`\" = set"
765    then    then
766      echo $ac_n "(cached) $ac_c" 1>&6      echo $ac_n "(cached) $ac_c" 1>&6
767    else    else
768      ac_save_LIBS="$LIBS"      ac_save_LIBS="$LIBS"
769      if test "x${ac_cv_lib_pthread_pthread_create}" = "xyes"    LIBS="$TCL_TESTLIBS"
770      cat > conftest.$ac_ext << EOF
771    #include "confdefs.h"
772    char Tcl_Free();
773    
774    int main() {
775      Tcl_Free();
776      return 0;
777    }
778    EOF
779      if { (eval echo configure: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}
780      then      then
781        LIBS="-lpthread $LIBS"      rm -rf conftest*
782        eval "ac_cv_var_tcl_free=yes"
783      else
784        echo "configure: failed program was:" >&5
785        cat conftest.$ac_ext >&5
786        rm -rf conftest*
787        eval "ac_cv_var_tcl_free=no"
788      fi      fi
789      if test ! "x${TCLLIBEXT}" = "x.a"    rm -f conftest*
790      LIBS="$ac_save_LIBS"
791    fi
792    
793    if test "x${ac_cv_var_tcl_free}" = "xyes"
794      then      then
795        LIBS="-L$TCLLIB -l$TCLLIBFNS -lm $LIBS"    AC_MSG_RESULT(yes)
796      AC_DEFINE(HAVE_TCL_FREE)
797      else      else
798        if test ! "x${tcllibname}" = "x"    AC_MSG_RESULT(no)
799    fi
800    
801    # check for TclpFinalizeThreadData()
802    AC_MSG_CHECKING(if Tcl library has threads)
803    if eval "test \"`echo '$''{'ac_cv_var_tcl_threads'+set}'`\" = set"
804        then        then
805      LIBS="$TCLLIB/lib$TCLLIBFN -lm $LIBS"    echo $ac_n "(cached) $ac_c" 1>&6
806        else        else
807      LIBS="-L$TCLLIB -l$TCLLIBFNS -lm $LIBS"    ac_save_LIBS="$LIBS"
808        fi    LIBS="$TCL_TESTLIBS"
     fi  
809      cat > conftest.$ac_ext << EOF      cat > conftest.$ac_ext << EOF
810  #include "confdefs.h"  #include "confdefs.h"
811  char TclpFinalizeThreadData();  char TclpFinalizeThreadData();
# Line 793  EOF Line 828  EOF
828      rm -f conftest*      rm -f conftest*
829      LIBS="$ac_save_LIBS"      LIBS="$ac_save_LIBS"
830    fi    fi
 fi  
831    
832  if test "x${ac_cv_var_tcl_threads}" = "xyes"  if test "x${ac_cv_var_tcl_threads}" = "xyes"
833  then  then
# Line 805  configure: warning: Line 839  configure: warning:
839    There are known problems, but we will attempt to work around them.    There are known problems, but we will attempt to work around them.
840    
841  EOF  EOF
842    AC_DEFINE(HAVE_BUGGY_TCL_THREADS)    AC_DEFINE(HAVE_TCL_THREADS)
843    
844    # add -lpthread to $LIBS if we have it    # add -lpthread to $LIBS if we have it
845    if test "x${ac_cv_lib_pthread_pthread_create}" = "xyes"    if test "x${ac_cv_lib_pthread_pthread_mutex_init}" = "xyes"
846    then    then
847      LIBS="-lpthread $LIBS"      LIBS="-lpthread $LIBS"
848    fi    fi

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

webmaster@eggheads.org
ViewVC Help
Powered by ViewVC 1.1.23