/[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.12 by fabian, Tue Nov 16 21:06:49 1999 UTC revision 1.13 by fabian, Wed Dec 1 00:09:42 1999 UTC
# Line 1  Line 1 
1  dnl Process this file with autoconf to produce a configure script.  dnl Process this file with autoconf to produce a configure script.
2  AC_INIT(eggdrop.conf.dist)  AC_INIT(eggdrop.conf.dist)
3  ac_default_prefix=\${HOME}/eggdrop  AC_PREFIX_DEFAULT([\${HOME}/eggdrop])
4  AC_CONFIG_HEADER(config.h)  AC_CONFIG_HEADER(config.h)
5    
6  AC_MSG_RESULT()  EGG_MSG_CONFIGURE_START
 AC_MSG_RESULT(This is eggdrop's GNU configure script.)  
 AC_MSG_RESULT(It's going to run a bunch of strange tests to hopefully)  
 AC_MSG_RESULT(make your compile work without much twiddling.)  
 AC_MSG_RESULT()  
7    
8    # Setup build environment
9  AC_PROG_CC  AC_PROG_CC
10    EGG_CHECK_CC
11    EGG_CHECK_STRIP
12    
13  dnl no cross-compiling!  # Crazy machines
 if test ! "x${cross_compiling}" = "xno"  
 then  
   cat << 'EOF' >&2  
 configure: error:  
   
   This system does not appear to have a working C compiler.  
   A working C compiler is required to compile eggdrop.  
   
 EOF  
   exit 1  
 fi  
   
 dnl crazy machines  
14  AC_AIX  AC_AIX
15  AC_ISC_POSIX  AC_ISC_POSIX
16  AC_MINIX  AC_MINIX
17    
18  dnl Checks for programs.  # Checks for programs
19  AC_PROG_MAKE_SET  AC_PROG_MAKE_SET
20  AC_PROG_RANLIB  AC_PROG_RANLIB
21  AC_PROG_INSTALL  AC_PROG_INSTALL
22  AC_PROG_LN_S  AC_PROG_LN_S
23  AC_CHECK_PROG(STRIP,strip,strip)  AC_CHECK_PROG(STRIP,strip,strip)
24  AC_CHECK_PROG(UNAME,uname,uname)  AC_CHECK_PROG(UNAME,uname,uname)
25    EGG_PROG_AWK
26    EGG_PROG_BASENAME
27    
28    # Test the os and set the module linking settings
29    EGG_CHECK_OS
30    
31  dnl awk is needed for Tcl library stuff and version number checking.  # Checks for system libraries
32  AC_PROG_AWK  EGG_CHECK_LIBS
33  if test "x${AWK}" = "x"  EGG_CHECK_RES_LIBS
 then  
   cat << 'EOF' >&2  
 configure: error:  
   
   This system seems to lack a working 'awk' command.  
   A working 'awk' command is required to compile eggdrop.  
   
 EOF  
   exit 1  
 fi  
   
 dnl basename is needed for Tcl library stuff.  
 AC_CHECK_PROG(BASENAME,basename,basename)  
 if test "x${BASENAME}" = "x"  
 then  
   cat << 'EOF' >&2  
 configure: error:  
   
   This system seems to lack a working 'basename' command.  
   A working 'basename' command is required to compile eggdrop.  
   
 EOF  
   exit 1  
 fi  
   
 dnl dirname is needed for Tcl library stuff.  
 AC_CHECK_PROG(DIRNAME,dirname,dirname)  
 if test "x${DIRNAME}" = "x"  
 then  
   cat << 'EOF' >&2  
 configure: error:  
   
   This system seems to lack a working 'dirname' command.  
   A working 'dirname' command is required to compile eggdrop.  
   
 EOF  
   exit 1  
 fi  
   
 dnl stop putting -g in there!  @#$!#$%!  
 if test "x${CFLAGS}" = "x"  
 then  
   if test "x${CC}" = "xgcc"  
   then  
     CFLAGS="-O2"  
   else  
     CFLAGS="-O"  
   fi  
 fi  
   
 if test "x${STRIP}" = "x"  
 then  
   STRIP=touch  
 fi  
   
 dnl test the os and set the module linking settings  
 EGGEXEC=eggdrop  
 LINUX=no  
 IRIX=no  
 SUNOS=no  
 HPUX=no  
 MOD_CC="${CC}"  
 MOD_LD="${CC}"  
 MOD_STRIP="${STRIP}"  
 SHLIB_CC="${CC}"  
 SHLIB_LD="${CC}"  
 SHLIB_STRIP="${STRIP}"  
 NEED_DL=1  
 DEFAULT_MAKE=debug  
 AC_MSG_CHECKING(your OS)  
 SYSTEM=`${UNAME}`  
 case "$SYSTEM" in  
   BSD/OS)  
     if test "x`${UNAME} -r | cut -d . -f 1`" = "x2"  
     then  
       AC_MSG_RESULT(BSD/OS 2! statically linked modules are the only choice)  
       NEED_DL=0  
       DEFAULT_MAKE=static  
     else  
       AC_MSG_RESULT(BSD/OS 3+! ok I spose)  
       MOD_CC=shlicc  
       MOD_LD=shlicc  
       MOD_STRIP="${STRIP} -d"  
       SHLIB_LD="shlicc -r"  
       SHLIB_STRIP=touch  
       AC_DEFINE(MODULES_OK)  
     fi  
     ;;  
   CYGWIN*)  
     AC_MSG_RESULT(Cygwin)  
     NEED_DL=0  
     DEFAULT_MAKE=static  
     ;;  
   HP-UX)  
     AC_MSG_RESULT([HP-UX, just shoot yourself now])  
     HPUX=yes  
     MOD_LD="gcc -Wl,-E"  
     SHLIB_CC="gcc -fPIC"  
     SHLIB_LD="ld -b"  
     NEED_DL=0  
     AC_DEFINE(MODULES_OK)  
     AC_DEFINE(HPUX_HACKS)  
     if test "x`${UNAME} -r | cut -d . -f 2`" = "x10"  
     then  
        AC_DEFINE(HPUX10_HACKS)  
     fi  
     ;;  
   IRIX)  
     AC_MSG_RESULT(you are cursed with IRIX)  
     IRIX=yes  
     SHLIB_STRIP=touch  
     NEED_DL=0  
     DEFAULT_MAKE=static  
     ;;  
   IRIX64)  
     AC_MSG_RESULT(IRIX64)  
     IRIX=yes  
     SHLIB_STRIP=strip  
     NEED_DL=0  
     DEFAULT_MAKE=static  
     ;;  
   Linux)  
     AC_MSG_RESULT(Linux! The choice of the GNU generation)  
     LINUX=yes  
     CFLAGS="$CFLAGS -Wall"  
     MOD_LD="${CC}"  
     SHLIB_LD="${CC} -shared -nostartfiles"  
     AC_DEFINE(MODULES_OK)  
     ;;  
   Lynx)  
     SHLIB_STRIP=touch  
     AC_MSG_RESULT(Lynx OS)  
     ;;  
   OSF1)  
     AC_MSG_RESULT(OSF...)  
     case `${UNAME} -r | cut -d . -f 1` in  
       V*)  
     AC_MSG_RESULT([   Digital OSF])  
     if test "x$AWK" = "xgawk"  
     then  
       AWK=awk  
     fi  
     if test "x$INSTALL" = "x./install-sh"  
     then  
       INSTALL=installbsd  
     fi  
     MOD_CC=cc  
     MOD_LD=cc  
     SHLIB_CC=cc  
     SHLIB_LD="ld -shared -expect_unresolved '*'"  
     SHLIB_STRIP=touch  
     AC_DEFINE(MODULES_OK)  
     ;;  
       1.0|1.1|1.2)  
     AC_MSG_RESULT([   pre 1.3])  
     SHLIB_LD="ld -R -export $@:"  
     AC_DEFINE(MODULES_OK)  
     AC_DEFINE(OSF1_HACKS)  
     ;;  
       1.*)  
     AC_MSG_RESULT([   1.3+])  
     SHLIB_CC="${CC} -fpic"  
     SHLIB_LD="ld -shared"  
     AC_DEFINE(MODULES_OK)  
     AC_DEFINE(OSF1_HACKS)  
     ;;  
       *)  
     AC_MSG_RESULT([   Some other weird OSF! No modules for you...])  
     NEED_DL=0  
     DEFAULT_MAKE=static  
     ;;  
     esac  
     AC_DEFINE(STOP_UAC)  
     ;;  
   SunOS)  
     if test "x`${UNAME} -r | cut -d . -f 1`" = "x5"  
     then  
       AC_MSG_RESULT(Solaris -- yay)  
       SHLIB_LD="/usr/ccs/bin/ld -G -z text"  
     else  
       AC_MSG_RESULT(SunOS -- sigh)  
       SUNOS=yes  
       SHLIB_LD=ld  
       SHLIB_STRIP=touch  
       AC_DEFINE(DLOPEN_1)  
     fi  
     MOD_CC="${CC} -fPIC"  
     SHLIB_CC="${CC} -fPIC"  
     AC_DEFINE(MODULES_OK)  
     ;;  
   *BSD)  
     AC_MSG_RESULT(FreeBSD/NetBSD/OpenBSD - choose your poison)  
     SHLIB_CC="${CC} -fpic"  
     SHLIB_LD="ld -Bshareable -x"  
     AC_DEFINE(MODULES_OK)  
     ;;  
   *)  
     if test -r "/mach"  
     then  
       AC_MSG_RESULT([NeXT...We are borg, you will be assimilated])  
       AC_MSG_RESULT([break out the static modules, it's all you'll ever get :P])  
       AC_MSG_RESULT(Hiya DK :P)  
       NEED_DL=0  
       DEFAULT_MAKE=static  
       AC_DEFINE(BORGCUBES)  
     else  
       if test -r "/cmds"  
       then  
     AC_MSG_RESULT(QNX)  
     NEED_DL=0  
     SHLIB_STRIP=touch  
     DEFAULT_MAKE=static  
       else  
     AC_MSG_RESULT(Something unknown!)  
     AC_MSG_RESULT([If you get dynamic modules to work, be sure to let the devel team know HOW :)])  
     NEED_DL=0  
     DEFAULT_MAKE=static  
       fi  
     fi  
     ;;  
 esac  
   
 dnl Checks for system libraries.  
 if test "$IRIX" = "yes"  
 then  
   AC_MSG_WARN(Skipping library tests because they CONFUSE Irix.)  
 else  
   AC_CHECK_LIB(socket,socket)  
   AC_CHECK_LIB(nsl,connect)  
   AC_CHECK_LIB(dns,gethostbyname)  
   AC_CHECK_LIB(dl,dlopen)  
 dnl this is needed for Tcl compiled with thread support  
   AC_CHECK_LIB(pthread,pthread_mutex_init,  
 ac_cv_lib_pthread_pthread_mutex_init=yes,  
 ac_cv_lib_pthread_pthread_mutex_init=no)  
   if test "$SUNOS" = "yes"  
   then  
     dnl for suns without yp or something like that  
     AC_CHECK_LIB(dl,main)  
   else  
     if test "$HPUX" = "yes"  
     then  
       AC_CHECK_LIB(dld,shl_load)  
     fi  
   fi  
 fi  
   
 AC_CHECK_FUNC(res_init, ,  
   AC_CHECK_LIB(bind, res_init, RESLIB="-lbind",  
    AC_CHECK_LIB(resolv, res_init, RESLIB="-lresolv", AC_MSG_ERROR(No resolver library found))))  
   
 AC_CHECK_FUNC(res_mkquery, ,  
   AC_CHECK_LIB(bind, res_mkquery, RESLIB="-lbind",  
    AC_CHECK_LIB(resolv, res_mkquery, RESLIB="-lresolv", AC_MSG_ERROR(No resolver library found))))  
34    
35  dnl Checks for header files.  # Checks for header files
36  AC_HEADER_DIRENT  AC_HEADER_DIRENT
37  AC_HEADER_SYS_WAIT  AC_HEADER_SYS_WAIT
38  AC_CHECK_HEADERS(sys/time.h)  AC_CHECK_HEADERS(sys/time.h)
39  AC_HEADER_TIME  AC_HEADER_TIME
40  AC_CHECK_HEADERS(sys/select.h sys/rusage.h unistd.h dlfcn.h stdarg.h std_args.h)  AC_CHECK_HEADERS(sys/select.h sys/rusage.h unistd.h dlfcn.h stdarg.h std_args.h)
41    
42  dnl Checks for typedefs, structures, and compiler characteristics.  # Checks for typedefs, structures, and compiler characteristics
43  AC_TYPE_PID_T  AC_TYPE_PID_T
44  AC_C_BIGENDIAN  AC_C_BIGENDIAN
45  AC_C_INLINE  AC_C_INLINE
46  AC_CHECK_SIZEOF(long,0)  AC_CHECK_SIZEOF(long,0)
47  AC_CHECK_SIZEOF(int,0)  AC_CHECK_SIZEOF(int,0)
48    
49  dnl Checks for library functions.  # Checks for library functions
50  AC_CHECK_FUNCS(clock getrusage setpgid uname sigaction sigemptyset)  AC_CHECK_FUNCS(clock getrusage setpgid uname sigaction sigemptyset rename strcasecmp getdtablesize bzero random srandom dlopen dprintf snprintf vsnprintf)
51  AC_CHECK_FUNCS(rename strcasecmp getdtablesize bzero random srandom)  EGG_CHECK_FUNC_VSPRINTF
52  AC_CHECK_FUNCS(dprintf snprintf vsprintf vsnprintf dlopen)  
53    # Make sure we have stdc headers, since we can't compile without them
54  if test "x${ac_cv_func_vsprintf}" = "xno"  EGG_HEADER_STDC
55  then  
56    cat << 'EOF' >&2  # Checks for cygwin
57  configure: error:  EGG_CYGWIN
58    EGG_EXEEXT
   Your system does not have the sprintf/vsprintf libraries.  
   These are required to compile almost anything.  Sorry.  
   
 EOF  
   exit 1  
 fi  
   
 if test "x${ac_cv_header_stdc}" = "xno"  
 then  
   cat << 'EOF' >&2  
 configure: error:  
   
   Your system must support ANSI C Header files.  
   These are required for the language support.  Sorry.  
   
 EOF  
   exit 1  
 fi  
   
 AC_CYGWIN  
 if test ! "x${CYGWIN}" = "x"  
 then  
   AC_DEFINE(CYGWIN_HACKS)  
 fi  
   
 AC_EXEEXT  
 if test ! "x${EXEEXT}" = "x"  
 then  
   EGGEXEC=eggdrop${EXEEXT}  
 fi  
59    
60  dnl where is tcl?  is it here?  # Where is tcl?  Is it here?
61  # ---------- begin robey's tcl thingies  # ---------- begin robey's tcl thingies
62  # (well, what used to be robey's tcl thingies...)  # (well, what used to be robey's tcl thingies...)
63    
64  tclrecommendver="8.2.1"  # Latest tested Tcl version to recommend if Tcl isn't found
65    tclrecommendver="8.2.2"
66    
67    # Site recommended to download Tcl from
68    tclrecommendsite="ftp://ftp.scriptics.com/pub/tcl/tcl8_2/"
69    
70    # Tcl library filename prefixes (also used for Tcl header dir on FreeBSD)
71  tcllibnames="tcl tcl8.3 tcl83 tcl8.2 tcl82 tcl8.1 tcl81 \  tcllibnames="tcl tcl8.3 tcl83 tcl8.2 tcl82 tcl8.1 tcl81 \
72      tcl8.0 tcl80 tcl7.6 tcl76 tcl7.5 tcl75 tcl7.4 tcl74 \      tcl8.0 tcl80 tcl7.6 tcl76 tcl7.5 tcl75 tcl7.4 tcl74 \
73      tcl7.3 tcl73 tcl7.2 tcl72 tcl7.1 tcl71 tcl7.0 tcl70"      tcl7.3 tcl73 tcl7.2 tcl72 tcl7.1 tcl71 tcl7.0 tcl70"
74    
75    # Tcl library filename suffixes
76  tcllibextensions=".so .so.1 .so.1.0 .so.1.2 .a"  tcllibextensions=".so .so.1 .so.1.0 .so.1.2 .a"
77    
78    # Tcl library search paths
79  tcllibpaths="/usr/local/lib /usr/local/pkgs/tcl/lib \  tcllibpaths="/usr/local/lib /usr/local/pkgs/tcl/lib \
80      /usr/lib /lib /usr/i486-linuxaout/lib \      /usr/lib /lib /usr/i486-linuxaout/lib \
81      $HOME/lib $HOME/tcl/lib $HOME"      $HOME/lib $HOME/tcl/lib $HOME"
82    
83    # Tcl header filenames
84  tclheadernames="tcl.h"  tclheadernames="tcl.h"
85    
86    # Tcl header search paths
87  tclheaderpaths="/usr/local/include /usr/local/pkgs/tcl/include \  tclheaderpaths="/usr/local/include /usr/local/pkgs/tcl/include \
88      /usr/include $HOME/include $HOME/tcl/include $HOME"      /usr/include $HOME/include $HOME/tcl/include $HOME"
89    
90  dnl oohh new configure --variables for those with multiple tcl libs  EGG_TCL_ARG_WITH
91  AC_ARG_WITH(tcllib, [  --with-tcllib=PATH      full path to tcl library], tcllibname=$withval)  EGG_TCL_ENV
92  AC_ARG_WITH(tclinc, [  --with-tclinc=PATH      full path to tcl header], tclincname=$withval)  EGG_TCL_WITH_TCLLIB
93    EGG_TCL_WITH_TCLINC
94  # make sure either both or neither $tcllibname and $tclincname are set  EGG_TCL_FIND_LIBRARY
95  if test ! "x${tcllibname}" = "x"  EGG_TCL_FIND_HEADER
96  then  EGG_TCL_CHECK_LIBRARY
97    if test "x${tclincname}" = "x"  EGG_TCL_CHECK_HEADER
98    then  EGG_TCL_CHECK_VERSION
99      cat << 'EOF' >&2  EGG_TCL_CHECK_PRE70
100  configure: warning:  EGG_TCL_CHECK_PRE75
101    EGG_TCL_TESTLIBS
102    You must specify both --with-tcllib and --with-tclinc for them to work.  EGG_TCL_CHECK_FREE
103    configure will now attempt to autodetect both the Tcl library and header...  EGG_TCL_CHECK_THREADS
104    EGG_TCL_LIB_REQS
105  EOF  # ---------- end of (what used to be) robey's tcl thingies
106      tcllibname=""  
107      TCLLIB=""  EGG_FUNC_DLOPEN
108      TCLINC=""  
109    fi  EGG_SUBST_EGGVERSION
110  else  EGG_SUBST_DEST
111    if test ! "x${tclincname}" = "x"  
   then  
     cat << 'EOF' >&2  
 configure: warning:  
   
   You must specify both --with-tcllib and --with-tclinc for them to work.  
   configure will now attempt to autodetect both the Tcl library and header...  
   
 EOF  
     tclincname=""  
     TCLLIB=""  
     TCLINC=""  
   fi  
 fi  
   
 # make sure either both or neither $TCLLIB and $TCLINC are set  
 if test ! "x${TCLLIB}" = "x"  
 then  
   if test "x${TCLINC}" = "x"  
   then  
     cat << 'EOF' >&2  
 configure: warning:  
   
   Environment variable TCLLIB was set, but I did not detect TCLINC.  
   Please set both TCLLIB and TCLINC correctly if you wish to use them.  
   configure will now attempt to autodetect both the Tcl library and header...  
   
 EOF  
     TCLLIB=""  
   fi  
 else  
   if test ! "x${TCLINC}" = "x"  
   then  
     cat << 'EOF' >&2  
 configure: warning:  
   
   Environment variable TCLINC was set, but I did not detect TCLLIB.  
   Please set both TCLLIB and TCLINC correctly if you wish to use them.  
   configure will now attempt to autodetect both the Tcl library and header...  
   
 EOF  
     TCLINC=""  
   fi  
 fi  
   
 # look for Tcl library: if $tcllibname is set, check there first  
 if test ! "x${tcllibname}" = "x"  
 then  
   if test -f "$tcllibname" && test -r "$tcllibname"  
   then  
     TCLLIB=`$DIRNAME $tcllibname`  
     TCLLIBFN=`$BASENAME $tcllibname | cut -c4-`  
 changequote(,)dnl  
     TCLLIBEXT=".`echo $TCLLIBFN | $AWK '{j=split($1, i, "."); print i[j]}'`"  
 changequote([, ])dnl  
     TCLLIBFNS=`$BASENAME $tcllibname $TCLLIBEXT | cut -c4-`  
   else  
     cat << EOF >&2  
 configure: warning:  
   
   The file '$tcllibname' given to option --with-tcllib is not valid.  
   configure will now attempt to autodetect both the Tcl library and header...  
   
 EOF  
     tcllibname=""  
     tclincname=""  
     TCLLIB=""  
     TCLLIBFN=""  
     TCLINC=""  
     TCLINCFN=""  
   fi  
 fi  
   
 # look for Tcl header: if $tclincname is set, check there first  
 if test ! "x${tclincname}" = "x"  
 then  
   if test -f "$tclincname" && test -r "$tclincname"  
   then  
     TCLINC=`$DIRNAME $tclincname`  
     TCLINCFN=`$BASENAME $tclincname`  
   else  
     cat << EOF >&2  
 configure: warning:  
   
   The file '$tclincname' given to option --with-tclinc is not valid.  
   configure will now attempt to autodetect both the Tcl library and header...  
   
 EOF  
     tcllibname=""  
     tclincname=""  
     TCLLIB=""  
     TCLLIBFN=""  
     TCLINC=""  
     TCLINCFN=""  
   fi  
 fi  
   
 # look for Tcl library: if $TCLLIB is set, check there first  
 if test "x${TCLLIBFN}" = "x"  
 then  
   if test ! "x${TCLLIB}" = "x"  
   then  
     if test -d "${TCLLIB}"  
     then  
       for tcllibfns in $tcllibnames  
       do  
     for tcllibext in $tcllibextensions  
     do  
       if test -r "$TCLLIB/lib$tcllibfns$tcllibext"  
       then  
         TCLLIBFN=$tcllibfns$tcllibext  
         TCLLIBEXT=$tcllibext  
         TCLLIBFNS=$tcllibfns  
         break 2  
       fi  
     done  
       done  
     fi  
     if test "x${TCLLIBFN}" = "x"  
     then  
       cat << 'EOF' >&2  
 configure: warning:  
   
   Environment variable TCLLIB was set, but incorrect.  
   Please set both TCLLIB and TCLINC correctly if you wish to use them.  
   configure will now attempt to autodetect both the Tcl library and header...  
   
 EOF  
       TCLLIB=""  
       TCLLIBFN=""  
       TCLINC=""  
       TCLINCFN=""  
     fi  
   fi  
 fi  
   
 # look for Tcl header: if $TCLINC is set, check there first  
 if test "x${TCLINCFN}" = "x"  
 then  
   if test ! "x${TCLINC}" = "x"  
   then  
     if test -d "${TCLINC}"  
     then  
       for tclheaderfn in $tclheadernames  
       do  
     if test -r "$TCLINC/$tclheaderfn"  
     then  
       TCLINCFN=$tclheaderfn  
     fi  
       done  
     fi  
     if test "x${TCLINCFN}" = "x"  
     then  
       cat << 'EOF' >&2  
 configure: warning:  
   
   Environment variable TCLINC was set, but incorrect.  
   Please set both TCLLIB and TCLINC correctly if you wish to use them.  
   configure will now attempt to autodetect both the Tcl library and header...  
   
 EOF  
       TCLLIB=""  
       TCLLIBFN=""  
       TCLINC=""  
       TCLINCFN=""  
     fi  
   fi  
 fi  
   
 AC_MSG_CHECKING(for Tcl library)  
   
 # attempt autodetect for $TCLLIBFN if it's not set  
 if test ! "x${TCLLIBFN}" = "x"  
 then  
   AC_MSG_RESULT(using $TCLLIB/lib$TCLLIBFN)  
 else  
   for tcllibfns in $tcllibnames  
   do  
     for tcllibext in $tcllibextensions  
     do  
       for tcllibpath in $tcllibpaths  
       do  
     if test -r "$tcllibpath/lib$tcllibfns$tcllibext"  
     then  
       AC_MSG_RESULT(found $tcllibpath/lib$tcllibfns$tcllibext)  
       TCLLIB=$tcllibpath  
       TCLLIBFN=$tcllibfns$tcllibext  
       TCLLIBEXT=$tcllibext  
       TCLLIBFNS=$tcllibfns  
       break 3  
     fi  
       done  
     done  
   done  
 fi  
   
 # show if $TCLLIBFN wasn't found  
 if test "x${TCLLIBFN}" = "x"  
 then  
   AC_MSG_RESULT(not found)  
 fi  
   
 AC_MSG_CHECKING(for Tcl header)  
   
 # attempt autodetect for $TCLINCFN if it's not set  
 if test ! "x${TCLINCFN}" = "x"  
 then  
   AC_MSG_RESULT(using $TCLINC/$TCLINCFN)  
 else  
   for tclheaderpath in $tclheaderpaths  
   do  
     for tclheaderfn in $tclheadernames  
     do  
       if test -r "$tclheaderpath/$tclheaderfn"  
       then  
     AC_MSG_RESULT(found $tclheaderpath/$tclheaderfn)  
     TCLINC=$tclheaderpath  
     TCLINCFN=$tclheaderfn  
     break 2  
       fi  
     done  
   done  
   # FreeBSD hack ...  
   if test "x${TCLINCFN}" = "x"  
   then  
     for tcllibfns in $tcllibnames  
     do  
       for tclheaderpath in $tclheaderpaths  
       do  
     for tclheaderfn in $tclheadernames  
     do  
       if test -r "$tclheaderpath/$tcllibfns/$tclheaderfn"  
       then  
         AC_MSG_RESULT(found $tclheaderpath/$tcllibfns/$tclheaderfn)  
         TCLINC=$tclheaderpath/$tcllibfns  
         TCLINCFN=$tclheaderfn  
         break 3  
       fi  
     done  
       done  
     done  
   fi  
 fi  
   
 # show if $TCLINCFN wasn't found  
 if test "x${TCLINCFN}" = "x"  
 then  
   AC_MSG_RESULT(not found)  
 fi  
   
 # done looking, now either TCLLIBFN & TCLINCFN are both set, or we bail  
 if test ! "x${TCLLIBFN}" = "x" && test ! "x${TCLINCFN}" = "x"  
 then  
   
   # find Tcl's version  
   TCL_VERSION=`grep TCL_VERSION $TCLINC/$TCLINCFN | head -1 | $AWK '{gsub(/\"/, "", $3); print $3}'`  
   TCL_PATCH_LEVEL=`grep TCL_PATCH_LEVEL $TCLINC/$TCLINCFN | head -1 | $AWK '{gsub(/\"/, "", $3); print $3}'`  
 fi  
   
 # check if we found Tcl's version  
 AC_MSG_CHECKING(for Tcl version)  
 if test ! "x${TCL_VERSION}" = "x"  
 then  
   if test ! "x${TCL_PATCH_LEVEL}" = "x"  
   then  
     AC_MSG_RESULT($TCL_PATCH_LEVEL)  
     TCL_FOUND=1  
   else  
     AC_MSG_RESULT($TCL_VERSION)  
     TCL_FOUND=1  
   fi  
 else  
   AC_MSG_RESULT(not found)  
   TCL_FOUND=0  
 fi  
   
 if test $TCL_FOUND = 0  
 then  
   cat << 'EOF' >&2  
 configure: error:  
   
   I can't find Tcl on this system.  
   
   Eggdrop now requires Tcl to compile.  If you already have Tcl  
   installed on this system, and I just wasn't looking in the right  
   place for it, set the environment variables TCLLIB and TCLINC so  
   I will know where to find 'libtcl.a' (or 'libtcl.so') and 'tcl.h'  
   (respectively).  Then run 'configure' again.  
   
   Read the README file if you don't know what Tcl is or how to get  
   it and install it.  
   
 EOF  
   exit 1  
 fi  
   
 # is this Tcl version too old for us to use ?  
 TCL_VER_PRE70=`echo $TCL_VERSION | $AWK '{split($1, i, "."); if (i[1] < 7) print "yes"; else print "no"}'`  
 if test "$TCL_VER_PRE70" = "xyes"  
 then  
   cat << EOF >&2  
 configure: error:  
   
   Your Tcl version is much too old for eggdrop to use.  
   I suggest you download and complie a more recent version.  
   The most reliable current version is $tclrecommendver  
   
 EOF  
   exit 1  
 fi  
   
 # are we using a pre 7.5 Tcl version ?  
 changequote(,)dnl  
 TCL_VER_PRE75=`echo $TCL_VERSION | $AWK '{split($1, i, "."); if (((i[1] == 7) && (i[2] < 5)) || (i[1] < 7)) print "yes"; else print "no"}'`  
 changequote([, ])dnl  
 if test "x${TCL_VER_PRE75}" = "xyes"  
 then  
   AC_DEFINE(HAVE_PRE7_5_TCL)  
 fi  
   
 # set TCL_TESTLIBS for Tcl library tests  
 if test ! "x${TCLLIBEXT}" = "x.a"  
 then  
   TCL_TESTLIBS="-L$TCLLIB -l$TCLLIBFNS -lm $LIBS"  
 else  
   if test ! "x${tcllibname}" = "x"  
   then  
     TCL_TESTLIBS="$TCLLIB/lib$TCLLIBFN -lm $LIBS"  
   else  
     TCL_TESTLIBS="-L$TCLLIB -l$TCLLIBFNS -lm $LIBS"  
   fi  
 fi  
 if test "x${ac_cv_lib_pthread_pthread_mutex_init}" = "xyes"  
 then  
   TCL_TESTLIBS="-lpthread $TCL_TESTLIBS"  
 fi  
   
 # check for Tcl_Free()  
 AC_MSG_CHECKING(if Tcl library has Tcl_Free)  
 if eval "test \"`echo '$''{'ac_cv_var_tcl_free'+set}'`\" = set"  
 then  
   echo $ac_n "(cached) $ac_c" 1>&6  
 else  
   ac_save_LIBS="$LIBS"  
   LIBS="$TCL_TESTLIBS"  
   cat > conftest.$ac_ext << EOF  
 #include "confdefs.h"  
 char Tcl_Free();  
   
 int main() {  
   Tcl_Free();  
   return 0;  
 }  
 EOF  
   if { (eval echo configure: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}  
   then  
     rm -rf conftest*  
     eval "ac_cv_var_tcl_free=yes"  
   else  
     echo "configure: failed program was:" >&5  
     cat conftest.$ac_ext >&5  
     rm -rf conftest*  
     eval "ac_cv_var_tcl_free=no"  
   fi  
   rm -f conftest*  
   LIBS="$ac_save_LIBS"  
 fi  
   
 if test "x${ac_cv_var_tcl_free}" = "xyes"  
 then  
   AC_MSG_RESULT(yes)  
   AC_DEFINE(HAVE_TCL_FREE)  
 else  
   AC_MSG_RESULT(no)  
 fi  
   
 # check for TclpFinalizeThreadData()  
 AC_MSG_CHECKING(if Tcl library has threads)  
 if eval "test \"`echo '$''{'ac_cv_var_tcl_threads'+set}'`\" = set"  
 then  
   echo $ac_n "(cached) $ac_c" 1>&6  
 else  
   ac_save_LIBS="$LIBS"  
   LIBS="$TCL_TESTLIBS"  
   cat > conftest.$ac_ext << EOF  
 #include "confdefs.h"  
 char TclpFinalizeThreadData();  
   
 int main() {  
   TclpFinalizeThreadData();  
   return 0;  
 }  
 EOF  
   if { (eval echo configure: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}  
   then  
     rm -rf conftest*  
     eval "ac_cv_var_tcl_threads=yes"  
   else  
     echo "configure: failed program was:" >&5  
     cat conftest.$ac_ext >&5  
     rm -rf conftest*  
     eval "ac_cv_var_tcl_threads=no"  
   fi  
   rm -f conftest*  
   LIBS="$ac_save_LIBS"  
 fi  
   
 if test "x${ac_cv_var_tcl_threads}" = "xyes"  
 then  
   AC_MSG_RESULT(yes)  
   cat << 'EOF' >&2  
 configure: warning:  
   
   Your Tcl library is compiled with threads.  
   There are known problems, but we will attempt to work around them.  
   
 EOF  
   AC_DEFINE(HAVE_TCL_THREADS)  
   
   # add -lpthread to $LIBS if we have it  
   if test "x${ac_cv_lib_pthread_pthread_mutex_init}" = "xyes"  
   then  
     LIBS="-lpthread $LIBS"  
   fi  
 else  
   AC_MSG_RESULT(no)  
 fi  
   
 if test ! "x${TCLLIBEXT}" = "x.a"  
 then  
   TCL_REQS="$TCLLIB/lib$TCLLIBFN"  
   TCL_LIBS="-L$TCLLIB -l$TCLLIBFNS -lm"  
 else  
   
   # set default make as static for unshared Tcl library  
   if test ! "$DEFAULT_MAKE" = "static"  
   then  
     cat << 'EOF' >&2  
 configure: warning:  
   
   Your Tcl library is not a shared lib.  
   configure will now set default make type to static...  
   
 EOF  
     DEFAULT_MAKE=static  
   fi  
   
   # are we using a pre 7.4 Tcl version ?  
 changequote(,)dnl  
   TCL_VER_PRE74=`echo $TCL_VERSION | $AWK '{split($1, i, "."); if (((i[1] == 7) && (i[2] < 4)) || (i[1] < 7)) print "yes"; else print "no"}'`  
 changequote([, ])dnl  
   if test "x${TCL_VER_PRE74}" = "xno"  
   then  
   
     # was the --with-tcllib option given ?  
     if test ! "x${tcllibname}" = "x"  
     then  
       TCL_REQS="$TCLLIB/lib$TCLLIBFN"  
       TCL_LIBS="$TCLLIB/lib$TCLLIBFN -lm"  
     else  
       TCL_REQS="$TCLLIB/lib$TCLLIBFN"  
       TCL_LIBS="-L$TCLLIB -l$TCLLIBFNS -lm"  
     fi  
   else  
     cat << EOF >&2  
 configure: warning:  
   
   Your Tcl version ($TCL_VERSION) is older then 7.4.  
   There are known problems, but we will attempt to work around them.  
   
 EOF  
     TCL_REQS="libtcle.a"  
     TCL_LIBS="-L. -ltcle -lm"  
   fi  
 fi  
   
 AC_SUBST(TCLLIB)  
 AC_SUBST(TCLLIBFN)  
 AC_SUBST(TCLINC)  
 AC_SUBST(TCLINCFN)  
 AC_SUBST(TCL_REQS)  
 AC_SUBST(TCL_LIBS)  
   
 # ---------- end of robey's tcl thingies  
   
 if test $NEED_DL = 1 && test "x${ac_cv_func_dlopen}" = "xno"  
 then  
   if test "$LINUX" = "yes"  
   then  
     cat << 'EOF' >&2  
 configure: warning:  
   
   Since you are on a Linux system, this has a known problem,  
   I know a kludge for it,  
 EOF  
   
     if test -r "/lib/libdl.so.1"  
     then  
       cat << 'EOF' >&2  
   and you seem to have it, so we'll do that...  
   
 EOF  
       AC_DEFINE(HAVE_DLOPEN)  
       LIBS="/lib/libdl.so.1 $LIBS"  
     else  
       cat << 'EOF' >&2  
   which you DONT seem to have... doh!  
   perhaps you may still have the stuff lying around somewhere  
   if you work out where it is, add it to your XLIBS= lines  
   and #define HAVE_DLOPEN in config.h  
   
   we'll proceed on anyway, but you probably won't be able  
   to 'make eggdrop' but you might be able to make the  
   static bot (I'll default your make to this version).  
   
 EOF  
       DEFAULT_MAKE=static  
     fi  
   else  
     cat << 'EOF' >&2  
 configure: warning:  
   
   You don't seem to have libdl anywhere I can find it, this will  
   prevent you from doing dynamic modules, I'll set your default  
   make to static linking.  
   
 EOF  
     DEFAULT_MAKE=static  
   fi  
 fi  
   
 EGGVERSION=`grep 'char egg_version' src/main.c | $AWK '{gsub(/(\"|\;)/, "", $4); print $4}'`  
   
 if test "x$DEST" = "x"  
 then  
   DEST=\${prefix}  
 fi  
   
 AC_SUBST(DEST)  
 AC_SUBST(CC)  
 AC_SUBST(MOD_LD)  
 AC_SUBST(MOD_CC)  
 AC_SUBST(MOD_STRIP)  
 AC_SUBST(SHLIB_LD)  
 AC_SUBST(SHLIB_CC)  
 AC_SUBST(SHLIB_STRIP)  
 AC_SUBST(RESLIB)  
 AC_SUBST(DEFAULT_MAKE)  
 AC_SUBST(EGGEXEC)  
 AC_SUBST(EGGVERSION)  
112  AC_OUTPUT(Makefile doc/Makefile scripts/Makefile src/Makefile src/md5/Makefile src/mod/Makefile lush.h)  AC_OUTPUT(Makefile doc/Makefile scripts/Makefile src/Makefile src/md5/Makefile src/mod/Makefile lush.h)
113    
114  AC_MSG_RESULT()  EGG_MSG_CONFIGURE_END
 AC_MSG_RESULT(Configure is done.)  
 AC_MSG_RESULT()  
 if test -f "./$EGGEXEC"  
 then  
   AC_MSG_RESULT(Type 'make clean' and then 'make' to create the bot.)  
 else  
   AC_MSG_RESULT(Type 'make' to create the bot.)  
 fi  
 AC_MSG_RESULT()  

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.13

webmaster@eggheads.org
ViewVC Help
Powered by ViewVC 1.1.23