/[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.6 by fabian, Mon Oct 11 07:59:55 1999 UTC revision 1.7 by fabian, Thu Oct 21 19:22:58 1999 UTC
# Line 9  AC_MSG_RESULT(It's going to run a bunch Line 9  AC_MSG_RESULT(It's going to run a bunch
9  AC_MSG_RESULT(make your compile work without much twiddling.)  AC_MSG_RESULT(make your compile work without much twiddling.)
10  AC_MSG_RESULT()  AC_MSG_RESULT()
11    
 AC_PROG_MAKE_SET  
12  AC_PROG_CC  AC_PROG_CC
13    
14  dnl no cross-compiling!  dnl no cross-compiling!
# Line 31  AC_ISC_POSIX Line 30  AC_ISC_POSIX
30  AC_MINIX  AC_MINIX
31    
32  dnl Checks for programs.  dnl Checks for programs.
33    AC_PROG_MAKE_SET
34  AC_PROG_RANLIB  AC_PROG_RANLIB
35    AC_PROG_INSTALL
36    AC_PROG_LN_S
37  AC_CHECK_PROG(STRIP,strip,strip)  AC_CHECK_PROG(STRIP,strip,strip)
38  AC_CHECK_PROG(UNAME,uname,uname)  AC_CHECK_PROG(UNAME,uname,uname)
39    
40    dnl awk is needed for Tcl library stuff and version number checking.
41  AC_PROG_AWK  AC_PROG_AWK
42  if test "x${AWK}" = "x"  if test "x${AWK}" = "x"
43  then  then
# Line 48  EOF Line 51  EOF
51    exit 1    exit 1
52  fi  fi
53    
54    dnl basename is needed for Tcl library stuff.
55  AC_CHECK_PROG(BASENAME,basename,basename)  AC_CHECK_PROG(BASENAME,basename,basename)
56  if test "x${BASENAME}" = "x"  if test "x${BASENAME}" = "x"
57  then  then
# Line 61  EOF Line 65  EOF
65    exit 1    exit 1
66  fi  fi
67    
68    dnl dirname is needed for Tcl library stuff.
69  AC_CHECK_PROG(DIRNAME,dirname,dirname)  AC_CHECK_PROG(DIRNAME,dirname,dirname)
70  if test "x${DIRNAME}" = "x"  if test "x${DIRNAME}" = "x"
71  then  then
# Line 74  EOF Line 79  EOF
79    exit 1    exit 1
80  fi  fi
81    
 AC_PROG_LN_S  
   
 dnl cp -f checks  
 AC_MSG_CHECKING(whether cp -f works)  
 ac_file1=beldin1  
 ac_file2=beldin2  
 ac_cp="cp -f $ac_file1 $ac_file2"  
   
 cat > $ac_file1 << 'EOF'  
 Beldin is a llama.  :P  
 EOF  
 if { (eval echo configure: \"$ac_cp\") 1>&5; (eval $ac_cp) 2>&5; } && test -s $ac_file2  
 then  
   AC_MSG_RESULT(yes)  
   ac_cv_prog_cp_f=yes  
   CP1="cp -f"  
   CP2="cp -rf"  
   CP3="cp -pf"  
 else  
   AC_MSG_RESULT(no)  
   ac_cv_prog_cp_f=no  
   CP1="cp"  
   CP2="cp -r"  
   CP3="cp -p"  
 fi  
 rm -f $ac_file1 $ac_file2  
   
82  dnl stop putting -g in there!  @#$!#$%!  dnl stop putting -g in there!  @#$!#$%!
83  if test "x${CFLAGS}" = "x"  if test "x${CFLAGS}" = "x"
84  then  then
# Line 112  then Line 90  then
90    fi    fi
91  fi  fi
92    
 dnl test the os and set the module linking settings  
93  if test "x${STRIP}" = "x"  if test "x${STRIP}" = "x"
94  then  then
95    STRIP=touch    STRIP=touch
96  fi  fi
97  IRIX=no  
98  LINUX=no  dnl test the os and set the module linking settings
 need_dl=1  
99  EGGEXEC=eggdrop  EGGEXEC=eggdrop
100  DEFAULT_MAKE=eggdrop  LINUX=no
101  BEL_MOD_CC="${CC}"  IRIX=no
102  BEL_MOD_LD="${CC}"  SUNOS=no
103  BEL_MOD_STRIP="${STRIP}"  HPUX=no
104    MOD_CC="${CC}"
105    MOD_LD="${CC}"
106    MOD_STRIP="${STRIP}"
107  SHLIB_CC="${CC}"  SHLIB_CC="${CC}"
108  SHLIB_LD="${CC}"  SHLIB_LD="${CC}"
109  SHLIB_STRIP="${STRIP}"  SHLIB_STRIP="${STRIP}"
110    NEED_DL=1
111    DEFAULT_MAKE=eggdrop
112  AC_MSG_CHECKING(your OS)  AC_MSG_CHECKING(your OS)
113  system=`${UNAME}`  SYSTEM=`${UNAME}`
114  case $system in  case "$SYSTEM" in
   Linux)  
     CFLAGS="$CFLAGS -Wall"  
     AC_MSG_RESULT(Linux! The choice of the GNU generation)  
     SHLIB_LD="${CC} -shared -nostartfiles"  
     BEL_MOD_LD="${CC}"  
     AC_DEFINE(MODULES_OK)  
     LINUX=yes  
     DEFAULT_MAKE=debugmem  
     ;;  
115    BSD/OS)    BSD/OS)
116      if test "x`${UNAME} -r | cut -d . -f 1`" = "x2"      if test "x`${UNAME} -r | cut -d . -f 1`" = "x2"
117      then      then
118        AC_MSG_RESULT(BSD/OS 2! statically linked modules are the only choice)        AC_MSG_RESULT(BSD/OS 2! statically linked modules are the only choice)
119        need_dl=0        NEED_DL=0
120        DEFAULT_MAKE=static        DEFAULT_MAKE=static
121      else      else
122        AC_MSG_RESULT(BSD/OS 3+! ok I spose)        AC_MSG_RESULT(BSD/OS 3+! ok I spose)
123        BEL_MOD_CC=shlicc        MOD_CC=shlicc
124        BEL_MOD_LD=shlicc        MOD_LD=shlicc
125        BEL_MOD_STRIP="${STRIP} -d"        MOD_STRIP="${STRIP} -d"
126        SHLIB_LD="shlicc -r"        SHLIB_LD="shlicc -r"
127        SHLIB_STRIP=touch        SHLIB_STRIP=touch
128        AC_DEFINE(MODULES_OK)        AC_DEFINE(MODULES_OK)
129      fi      fi
130      AC_CHECK_PROG(GMAKE,gmake,gmake)      ;;
131      if test "x${GMAKE}" = "x"    CYGWIN*)
132        AC_MSG_RESULT(Cygwin)
133        NEED_DL=0
134        DEFAULT_MAKE=static
135        ;;
136      HP-UX)
137        AC_MSG_RESULT([HP-UX, just shoot yourself now])
138        HPUX=yes
139        MOD_LD="gcc -Wl,-E"
140        SHLIB_CC="gcc -fPIC"
141        SHLIB_LD="ld -b"
142        NEED_DL=0
143        AC_DEFINE(MODULES_OK)
144        AC_DEFINE(HPUX_HACKS)
145        if test "x`${UNAME} -r | cut -d . -f 2`" = "x10"
146      then      then
147        cat << 'EOF' >&2         AC_DEFINE(HPUX10_HACKS)
 configure: warning:  
   
   Yoicks! You have BSD/OS and you dont have 'gmake'.  
   You may not be able to compile the bot successfully :(  
   
 EOF  
148      fi      fi
149      ;;      ;;
150    *BSD)    IRIX)
151      AC_MSG_RESULT(FreeBSD/NetBSD/OpenBSD - choose your poison)      AC_MSG_RESULT(you are cursed with IRIX)
152      SHLIB_CC="${CC} -fpic"      IRIX=yes
153      SHLIB_LD="ld -Bshareable -x"      SHLIB_STRIP=touch
154        NEED_DL=0
155        DEFAULT_MAKE=static
156        ;;
157      IRIX64)
158        AC_MSG_RESULT(IRIX64)
159        IRIX=yes
160        SHLIB_STRIP=strip
161        NEED_DL=0
162        DEFAULT_MAKE=static
163        ;;
164      Linux)
165        AC_MSG_RESULT(Linux! The choice of the GNU generation)
166        LINUX=yes
167        CFLAGS="$CFLAGS -Wall"
168        MOD_LD="${CC}"
169        SHLIB_LD="${CC} -shared -nostartfiles"
170        DEFAULT_MAKE=debug
171      AC_DEFINE(MODULES_OK)      AC_DEFINE(MODULES_OK)
172      ;;      ;;
173    SunOS)    Lynx)
     if test "x`${UNAME} -r | cut -d . -f 1`" = "x5"  
     then  
       AC_MSG_RESULT(Solaris!)  
       SHLIB_LD="/usr/ccs/bin/ld -G -z text"  
     else  
       AC_MSG_RESULT(SunOS 4 :/)  
       SHLIB_LD=ld  
174        SHLIB_STRIP=touch        SHLIB_STRIP=touch
175      fi      AC_MSG_RESULT(Lynx OS)
     SHLIB_CC="${CC} -fPIC"  
     BEL_MOD_CC="${CC} -fPIC"  
     AC_DEFINE(MODULES_OK)  
176      ;;      ;;
177    OSF1)    OSF1)
178      AC_MSG_RESULT(OSF...)      AC_MSG_RESULT(OSF...)
179      case `${UNAME} -r | cut -d . -f 1` in      case `${UNAME} -r | cut -d . -f 1` in
180        V*)        V*)
181      AC_MSG_RESULT(Digital OSF)      AC_MSG_RESULT([   Digital OSF])
182        if test "x$AWK" = "xgawk"
183        then
184          AWK="awk"
185        fi
186        if test "x$INSTALL" = "x./install-sh"
187        then
188          INSTALL="installbsd"
189        fi
190        MOD_CC="cc"
191        MOD_LD="cc"
192        SHLIB_CC="cc"
193      SHLIB_LD="ld -shared -expect_unresolved '*'"      SHLIB_LD="ld -shared -expect_unresolved '*'"
194      SHLIB_STRIP="touch"      SHLIB_STRIP="touch"
195      AC_DEFINE(MODULES_OK)      AC_DEFINE(MODULES_OK)
196      ;;      ;;
197        1.0|1.1|1.2)        1.0|1.1|1.2)
198      AC_MSG_RESULT(pre 1.3)      AC_MSG_RESULT([   pre 1.3])
199      SHLIB_LD="ld -R -export $@:"      SHLIB_LD="ld -R -export $@:"
     AC_DEFINE(OSF1_HACKS)  
200      AC_DEFINE(MODULES_OK)      AC_DEFINE(MODULES_OK)
201        AC_DEFINE(OSF1_HACKS)
202      ;;      ;;
203        1.*)        1.*)
204      AC_MSG_RESULT(1.3+)      AC_MSG_RESULT([   1.3+])
205      SHLIB_CFL="${CC} -fpic"      SHLIB_CC="${CC} -fpic"
206      SHLIB_LD="ld -shared"      SHLIB_LD="ld -shared"
     AC_DEFINE(OSF1_HACKS)  
207      AC_DEFINE(MODULES_OK)      AC_DEFINE(MODULES_OK)
208        AC_DEFINE(OSF1_HACKS)
209      ;;      ;;
210        *)        *)
211      AC_MSG_RESULT(Some other weird OSF! No modules for you..)      AC_MSG_RESULT([   Some other weird OSF! No modules for you...])
212      need_dl=0      NEED_DL=0
213      DEFAULT_MAKE=static      DEFAULT_MAKE=static
214      ;;      ;;
215      esac      esac
216      AC_DEFINE(STOP_UAC)      AC_DEFINE(STOP_UAC)
217      ;;      ;;
218    HP-UX)    SunOS)
219      AC_MSG_RESULT([HP-UX, just shoot yourself now])      if test "x`${UNAME} -r | cut -d . -f 1`" = "x5"
     AC_CHECK_LIB(dld,shl_load)  
     BEL_MOD_LD="gcc -Wl,-E"  
     SHLIB_CC="gcc -fPIC"  
     SHLIB_LD="ld -b"  
     AC_DEFINE(HPUX_HACKS)  
     if test "x`${UNAME} -r | cut -d . -f 2`" = "x10"  
220      then      then
221         AC_DEFINE(HPUX10_HACKS)        AC_MSG_RESULT(Solaris -- yay)
222          SHLIB_LD="/usr/ccs/bin/ld -G -z text"
223        else
224          AC_MSG_RESULT(SunOS -- sigh)
225          SUNOS=yes
226          SHLIB_LD=ld
227          SHLIB_STRIP=touch
228          AC_DEFINE(DLOPEN_1)
229      fi      fi
230        MOD_CC="${CC} -fPIC"
231        SHLIB_CC="${CC} -fPIC"
232      AC_DEFINE(MODULES_OK)      AC_DEFINE(MODULES_OK)
     need_dl=0  
233      ;;      ;;
234    IRIX|IRIX64)    *BSD)
235      AC_MSG_RESULT(you are cursed with IRIX)      AC_MSG_RESULT(FreeBSD/NetBSD/OpenBSD - choose your poison)
236      IRIX=yes      SHLIB_CC="${CC} -fpic"
237      SHLIB_STRIP=touch      SHLIB_LD="ld -Bshareable -x"
238      need_dl=0      AC_DEFINE(MODULES_OK)
     DEFAULT_MAKE=static  
239      ;;      ;;
240    *)    *)
241      if test -r "/mach"      if test -r "/mach"
# Line 244  EOF Line 243  EOF
243        AC_MSG_RESULT([NeXT...We are borg, you will be assimilated])        AC_MSG_RESULT([NeXT...We are borg, you will be assimilated])
244        AC_MSG_RESULT([break out the static modules, it's all you'll ever get :P])        AC_MSG_RESULT([break out the static modules, it's all you'll ever get :P])
245        AC_MSG_RESULT(Hiya DK :P)        AC_MSG_RESULT(Hiya DK :P)
246          NEED_DL=0
247          DEFAULT_MAKE=static
248        AC_DEFINE(BORGCUBES)        AC_DEFINE(BORGCUBES)
249      else      else
250        AC_MSG_RESULT(Something unknown!!)        if test -r "/cmds"
251          then
252           AC_MSG_RESULT(QNX)
253           NEED_DL=0
254           SHLIB_STRIP=touch
255           DEFAULT_MAKE=static
256          else
257           AC_MSG_RESULT(Something unknown!)
258        AC_MSG_RESULT([If you get dynamic modules to work, be sure to let the devel team know HOW :)])        AC_MSG_RESULT([If you get dynamic modules to work, be sure to let the devel team know HOW :)])
259      fi         NEED_DL=0
     need_dl=0  
260      DEFAULT_MAKE=static      DEFAULT_MAKE=static
261          fi
262        fi
263      ;;      ;;
264  esac  esac
265    
266  dnl Check for Sun libraries.  dnl Checks for system libraries.
267  if test "$IRIX" = "yes"  if test "$IRIX" = "yes"
268  then  then
269    AC_MSG_WARN(Skipping library tests because they *confuse* IRIX.)    AC_MSG_WARN(Skipping library tests because they CONFUSE Irix.)
270  else  else
271    AC_CHECK_LIB(socket,socket)    AC_CHECK_LIB(socket,socket)
272    AC_CHECK_LIB(nsl,connect)    AC_CHECK_LIB(nsl,connect)
273    AC_CHECK_LIB(dns,gethostbyname)    AC_CHECK_LIB(dns,gethostbyname)
274    AC_CHECK_LIB(dl,dlopen)    AC_CHECK_LIB(dl,dlopen)
275    if test "x`${UNAME}`" = "xSunOS"  dnl this is needed for Tcl compiled with thread support
276      AC_CHECK_LIB(pthread,pthread_create,ac_cv_lib_pthread_pthread_create=yes,ac_cv_lib_pthread_pthread_create=no)
277      if test "$SUNOS" = "yes"
278    then    then
279      AC_MSG_CHECKING(for SunOS 4)      dnl for suns without yp or something like that
     if test "x`${UNAME} -r | cut -d . -f 1`" = "x5"  
     then  
       AC_MSG_RESULT(Solaris -- "*bollocks*" zarni )  
     else  
       AC_MSG_RESULT(SunOS -- sigh)  
       dnl for suns without yp or something like that:  
280        AC_CHECK_LIB(dl,main)        AC_CHECK_LIB(dl,main)
281      else
282        if test "$HPUX" = "yes"
283        then
284          AC_CHECK_LIB(dld,shl_load)
285      fi      fi
286    fi    fi
287  fi  fi
# Line 285  AC_CHECK_FUNC(res_mkquery, , Line 294  AC_CHECK_FUNC(res_mkquery, ,
294    AC_CHECK_LIB(bind, res_mkquery, RESLIB="-lbind",    AC_CHECK_LIB(bind, res_mkquery, RESLIB="-lbind",
295     AC_CHECK_LIB(resolv, res_mkquery, RESLIB="-lresolv", AC_MSG_ERROR(No resolver library found))))     AC_CHECK_LIB(resolv, res_mkquery, RESLIB="-lresolv", AC_MSG_ERROR(No resolver library found))))
296    
 AC_C_BIGENDIAN  
 AC_CHECK_SIZEOF(long,0)  
 AC_CHECK_SIZEOF(int,0)  
   
297  dnl Checks for header files.  dnl Checks for header files.
298  AC_HEADER_DIRENT  AC_HEADER_DIRENT
299  AC_HEADER_SYS_WAIT  AC_HEADER_SYS_WAIT
300  AC_CHECK_HEADERS(sys/time.h sys/select.h sys/rusage.h unistd.h stdarg.h dlfcn.h)  AC_CHECK_HEADERS(sys/time.h)
301    AC_HEADER_TIME
302    AC_CHECK_HEADERS(sys/select.h sys/rusage.h unistd.h dlfcn.h stdarg.h std_args.h)
303    
304  dnl Checks for typedefs, structures, and compiler characteristics.  dnl Checks for typedefs, structures, and compiler characteristics.
305  AC_TYPE_PID_T  AC_TYPE_PID_T
306  AC_HEADER_TIME  AC_C_BIGENDIAN
307  AC_C_INLINE  AC_C_INLINE
308    AC_CHECK_SIZEOF(long,0)
309    AC_CHECK_SIZEOF(int,0)
310    
311  dnl Checks for library functions.  dnl Checks for library functions.
312  AC_CHECK_FUNCS(rename getrusage getdtablesize srandom random sigaction)  AC_CHECK_FUNCS(clock getrusage setpgid uname sigaction sigemptyset)
313  AC_CHECK_FUNCS(sigemptyset vsprintf strcasecmp setpgid clock dlopen)  AC_CHECK_FUNCS(rename strcasecmp getdtablesize bzero random srandom)
314  AC_CHECK_FUNCS(dprintf bzero uname vsnprintf)  AC_CHECK_FUNCS(dprintf snprintf vsprintf vsnprintf dlopen)
315    
316  if test "x${ac_cv_func_vsprintf}" = "xno"  if test "x${ac_cv_func_vsprintf}" = "xno"
317  then  then
# Line 328  EOF Line 337  EOF
337    exit 1    exit 1
338  fi  fi
339    
340    AC_CYGWIN
341    if test ! "x${CYGWIN}" = "x"
342    then
343      AC_DEFINE(CYGWIN_HACKS)
344    fi
345    
346    AC_EXEEXT
347    if test ! "x${EXEEXT}" = "x"
348    then
349      EGGEXEC=eggdrop${EXEEXT}
350    fi
351    
352  dnl check how much space is left in filedb (informational purposes)  dnl check how much space is left in filedb (informational purposes)
353  AC_MSG_CHECKING(space left in file database struct)  AC_MSG_CHECKING(space left in file database struct)
354    
355  cat > abacab.c << 'EOF'  cat > abacab.c << 'EOF'
356  #include <stdio.h>  #include <stdio.h>
357  #include <sys/time.h>  #include <sys/time.h>
358  #include "src/mod/filesys.mod/files.h"  #include "src/mod/filesys.mod/files.h"
359  main() {  main() {
360    fprintf(stdout, "%d/%d", 512-sizeof(struct filler), sizeof(filedb));    fprintf(stdout, "%d/%d\n", 512 - sizeof(struct filler), sizeof(filedb));
361  }  }
362  EOF  EOF
363  ${CC} -o abacab abacab.c  
364  FILEDB_SPACE=`./abacab`  ${CC} -o abacab${EXEEXT} abacab.c
365    FILEDB_SPACE=`./abacab${EXEEXT}`
366  AC_MSG_RESULT($FILEDB_SPACE bytes)  AC_MSG_RESULT($FILEDB_SPACE bytes)
367  rm -f abacab abacab.o abacab.c  rm -f abacab${EXEEXT} abacab.o abacab.c
368  AC_MSG_RESULT([   (standard is currently 48/512 bytes)])  AC_MSG_RESULT([   (standard is currently 48/512 bytes)])
369    
370  dnl where is tcl?  is it here?  dnl where is tcl?  is it here?
371  # ---------- begin robey's tcl thingies  # ---------- begin robey's tcl thingies
372  # (well, what used to be robey's tcl thingies...)  # (well, what used to be robey's tcl thingies...)
373    
374  tclversions="8.3 8.2 8.1 8.0 7.6 7.5"  tclrecommendver="8.2.1"
375    
376  tcllibnames="tcl tcl8.3 tcl83 tcl8.2 tcl82 tcl8.1 tcl81 \  tcllibnames="tcl tcl8.3 tcl83 tcl8.2 tcl82 tcl8.1 tcl81 \
377      tcl8.0 tcl80 tcl7.6 tcl76 tcl7.5 tcl75"      tcl8.0 tcl80 tcl7.6 tcl76 tcl7.5 tcl75 tcl7.4 tcl74 \
378        tcl7.3 tcl73 tcl7.2 tcl72 tcl7.1 tcl71 tcl7.0 tcl70"
379    
380  tcllibextensions=".so .so.1 .so.1.0 .so.1.2 .a"  tcllibextensions=".so .so.1 .so.1.0 .so.1.2 .a"
381    
 tclheadernames="tcl.h"  
   
382  tcllibpaths="/usr/local/lib /usr/local/pkgs/tcl/lib \  tcllibpaths="/usr/local/lib /usr/local/pkgs/tcl/lib \
383      /usr/lib /lib /usr/i486-linuxaout/lib \      /usr/lib /lib /usr/i486-linuxaout/lib \
384      $HOME/lib $HOME/tcl/lib $HOME"      $HOME/lib $HOME/tcl/lib $HOME"
385    
386    tclheadernames="tcl.h"
387    
388  tclheaderpaths="/usr/local/include /usr/local/pkgs/tcl/include \  tclheaderpaths="/usr/local/include /usr/local/pkgs/tcl/include \
389      /usr/include $HOME/include $HOME/tcl/include $HOME"      /usr/include $HOME/include $HOME/tcl/include $HOME"
390    
391    tclconfigfile="tclConfig.sh"
392    
393  dnl oohh new configure --variables for those with multiple tcl libs  dnl oohh new configure --variables for those with multiple tcl libs
394  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)
395  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 430  EOF Line 456  EOF
456    fi    fi
457  fi  fi
458    
459  # look for $TCLLIBFN: if $tcllibname is set, check there first  # look for Tcl library: if $tcllibname is set, check there first
460  if test ! "x${tcllibname}" = "x"  if test ! "x${tcllibname}" = "x"
461  then  then
462    if test -f "$tcllibname" && test -r "$tcllibname"    if test -f "$tcllibname" && test -r "$tcllibname"
463    then    then
464      TCLLIB=`$DIRNAME $tcllibname`      TCLLIB=`$DIRNAME $tcllibname`
465      TCLLIBEXT=".`echo $tcllibname | $AWK '{j=split($1, i, "."); k=i[[j]]; print k}'`"      TCLLIBFN=`$BASENAME $tcllibname | cut -c4-`
466      TCLLIBFN=`$BASENAME $tcllibname $TCLLIBEXT | cut -c4-`  changequote(,)dnl
467        TCLLIBEXT=".`echo $TCLLIBFN | $AWK '{j=split($1, i, "."); print i[j]}'`"
468    changequote([, ])dnl
469        TCLLIBFNS=`$BASENAME $tcllibname $TCLLIBEXT | cut -c4-`
470    else    else
471      cat << 'EOF' >&2      cat << EOF >&2
472  configure: warning:  configure: warning:
473    
474    The filename given to option --with-tcllib is not valid.    The file '$tcllibname' given to option --with-tcllib is not valid.
475    configure will now attempt to autodetect both the Tcl library and header...    configure will now attempt to autodetect both the Tcl library and header...
476    
477  EOF  EOF
478        tcllibname=""
479      tclincname=""      tclincname=""
480        TCLLIB=""
481        TCLLIBFN=""
482        TCLINC=""
483        TCLINCFN=""
484    fi    fi
485  fi  fi
486    
487  # look for $TCLINCFN: if $tclincname is set, check there first  # look for Tcl header: if $tclincname is set, check there first
488  if test ! "x${tclincname}" = "x"  if test ! "x${tclincname}" = "x"
489  then  then
490    if test -f "$tclincname" && test -r "$tclincname"    if test -f "$tclincname" && test -r "$tclincname"
# Line 458  then Line 492  then
492      TCLINC=`$DIRNAME $tclincname`      TCLINC=`$DIRNAME $tclincname`
493      TCLINCFN=`$BASENAME $tclincname`      TCLINCFN=`$BASENAME $tclincname`
494    else    else
495      cat << 'EOF' >&2      cat << EOF >&2
496  configure: warning:  configure: warning:
497    
498    The filename given to option --with-tclinc is not valid.    The file '$tclincname' given to option --with-tclinc is not valid.
499    configure will now attempt to autodetect both the Tcl library and header...    configure will now attempt to autodetect both the Tcl library and header...
500    
501  EOF  EOF
502        tcllibname=""
503        tclincname=""
504      TCLLIB=""      TCLLIB=""
505      TCLLIBFN=""      TCLLIBFN=""
506        TCLINC=""
507        TCLINCFN=""
508    fi    fi
509  fi  fi
510    
511  # look for $TCLLIBFN: if $TCLLIB is set, check there first  # look for Tcl library: if $TCLLIB is set, check there first
512    if test "x${TCLLIBFN}" = "x"
513    then
514  if test ! "x${TCLLIB}" = "x"  if test ! "x${TCLLIB}" = "x"
515  then  then
516    if test -d "${TCLLIB}"    if test -d "${TCLLIB}"
517    then    then
518      for tcllibfn in $tcllibnames        for tcllibfns in $tcllibnames
519      do      do
520        for tcllibext in $tcllibextensions        for tcllibext in $tcllibextensions
521        do        do
522      if test -r "$TCLLIB/lib$tcllibfn$tcllibext"        if test -r "$TCLLIB/lib$tcllibfns$tcllibext"
523      then      then
524        TCLLIBFN=$tcllibfn          TCLLIBFN=$tcllibfns$tcllibext
525        TCLLIBEXT=$tcllibext        TCLLIBEXT=$tcllibext
526            TCLLIBFNS=$tcllibfns
527        break 2        break 2
528      fi      fi
529        done        done
# Line 504  EOF Line 545  EOF
545      TCLINCFN=""      TCLINCFN=""
546    fi    fi
547  fi  fi
548    fi
549    
550  # look for $TCLINCFN: if $TCLINC is set, check there first  # look for Tcl header: if $TCLINC is set, check there first
551    if test "x${TCLINCFN}" = "x"
552    then
553  if test ! "x${TCLINC}" = "x"  if test ! "x${TCLINC}" = "x"
554  then  then
555    if test -d "${TCLINC}"    if test -d "${TCLINC}"
# Line 534  EOF Line 578  EOF
578      TCLINCFN=""      TCLINCFN=""
579    fi    fi
580  fi  fi
581    fi
582    
583  AC_MSG_CHECKING(for Tcl library)  AC_MSG_CHECKING(for Tcl library)
584    
585  # attempt autodetect for $TCLLIBFN if not set  # attempt autodetect for $TCLLIBFN if it's not set
586  if test ! "x${TCLLIBFN}" = "x"  if test ! "x${TCLLIBFN}" = "x"
587  then  then
588    AC_MSG_RESULT(using $TCLLIB/lib$TCLLIBFN$TCLLIBEXT)    AC_MSG_RESULT(using $TCLLIB/lib$TCLLIBFN)
589  else  else
590    for tcllibfn in $tcllibnames    for tcllibfns in $tcllibnames
591    do    do
592      for tcllibext in $tcllibextensions      for tcllibext in $tcllibextensions
593      do      do
594        for tcllibpath in $tcllibpaths        for tcllibpath in $tcllibpaths
595        do        do
596      if test -r "$tcllibpath/lib$tcllibfn$tcllibext"      if test -r "$tcllibpath/lib$tcllibfns$tcllibext"
597      then      then
598        AC_MSG_RESULT(found $tcllibpath/lib$tcllibfn$tcllibext)        AC_MSG_RESULT(found $tcllibpath/lib$tcllibfns$tcllibext)
599        TCLLIB=$tcllibpath        TCLLIB=$tcllibpath
600        TCLLIBFN=$tcllibfn        TCLLIBFN=$tcllibfns$tcllibext
601        TCLLIBEXT=$tcllibext        TCLLIBEXT=$tcllibext
602          TCLLIBFNS=$tcllibfns
603        break 3        break 3
604      fi      fi
605        done        done
# Line 569  fi Line 615  fi
615    
616  AC_MSG_CHECKING(for Tcl header)  AC_MSG_CHECKING(for Tcl header)
617    
618  # attempt autodetect for $TCLINCFN if not set  # attempt autodetect for $TCLINCFN if it's not set
619  if test ! "x${TCLINCFN}" = "x"  if test ! "x${TCLINCFN}" = "x"
620  then  then
621    AC_MSG_RESULT(using $TCLINC/$TCLINCFN)    AC_MSG_RESULT(using $TCLINC/$TCLINCFN)
622  else  else
623    for headerpath in $tclheaderpaths    for tclheaderpath in $tclheaderpaths
624    do    do
625      for tclheaderfn in $tclheadernames      for tclheaderfn in $tclheadernames
626      do      do
627        if test -r "$headerpath/$tclheaderfn"        if test -r "$tclheaderpath/$tclheaderfn"
628        then        then
629      AC_MSG_RESULT(found $headerpath/$tclheaderfn)      AC_MSG_RESULT(found $tclheaderpath/$tclheaderfn)
630      TCLINC=$headerpath      TCLINC=$tclheaderpath
631      TCLINCFN=$tclheaderfn      TCLINCFN=$tclheaderfn
632      break 2      break 2
633        fi        fi
# Line 590  else Line 636  else
636    # FreeBSD hack ...    # FreeBSD hack ...
637    if test "x${TCLINCFN}" = "x"    if test "x${TCLINCFN}" = "x"
638    then    then
639      for tclversion in $tclversions      for tcllibfns in $tcllibnames
640      do      do
641        for headerpath in $tclheaderpaths        for tclheaderpath in $tclheaderpaths
642        do        do
643      for tclheaderfn in $tclheadernames      for tclheaderfn in $tclheadernames
644      do      do
645        if test -r "$headerpath/tcl$tclversion/$tclheaderfn"        if test -r "$tclheaderpath/$tcllibfns/$tclheaderfn"
646        then        then
647          AC_MSG_RESULT(found $headerpath/tcl$tclversion/$tclheaderfn)          AC_MSG_RESULT(found $tclheaderpath/$tcllibfns/$tclheaderfn)
648          TCLINC=$headerpath/tcl$tclversion          TCLINC=$tclheaderpath/$tcllibfns
649          TCLINCFN=$tclheaderfn          TCLINCFN=$tclheaderfn
650          break 3          break 3
651        fi        fi
# Line 615  then Line 661  then
661    AC_MSG_RESULT(not found)    AC_MSG_RESULT(not found)
662  fi  fi
663    
664  # done looking, now either TCLLIBFN & TCLINCFN are both set, or we bail  # done looking, now either TCLLIBFN & TCLINCFN are both set, or we will bail
665  if test "x${TCLLIBFN}" = "x" || test "x${TCLINCFN}" = "x"  if test ! "x${TCLLIBFN}" = "x" && test ! "x${TCLINCFN}" = "x"
666    then
667      # is this really Tcl ?
668      TCL_VERSION=`grep TCL_VERSION $TCLINC/$TCLINCFN | head -1 | $AWK '{gsub(/\"/, "", $3); print $3}'`
669    fi
670    
671    # check Tcl version
672    AC_MSG_CHECKING(for Tcl version)
673    if test ! "x${TCL_VERSION}" = "x"
674    then
675      AC_MSG_RESULT($TCL_VERSION)
676      TCL_FOUND=1
677    else
678      AC_MSG_RESULT(not found)
679      TCL_FOUND=0
680    fi
681    
682    if test $TCL_FOUND = 0
683  then  then
684    cat << 'EOF' >&2    cat << 'EOF' >&2
685  configure: error:  configure: error:
# Line 634  configure: error: Line 697  configure: error:
697    
698  EOF  EOF
699    exit 1    exit 1
700  else  fi
701    
702    AC_MSG_CHECKING(for Tcl version)  # is this Tcl version too old for us to use ?
703    TCL_VER_PRE70=`echo $TCL_VERSION | $AWK '{split($1, i, "."); if (i[1] < 7) print "yes"; else print "no"}'`
704    if test "$TCL_VER_PRE70" = "xyes"
705    then
706      cat << EOF >&2
707    configure: error:
708    
709    for ver in $tclversions    Your Tcl version is much too old for eggdrop to use.
710    do    I suggest you download and complie a more recent version.
711      TCLFOUND=`grep TCL_VERSION $TCLINC/$TCLINCFN | grep $ver | wc -l`    The most reliable current version is $tclrecommendver
712      if test ! $TCLFOUND = 0  
713    EOF
714      exit 1
715    fi
716    
717    # are we using a pre 7.5 Tcl version ?
718    changequote(,)dnl
719    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"}'`
720    changequote([, ])dnl
721    if test "x${TCL_VER_PRE75}" = "xyes"
722      then      then
723        TCLVER=$ver    AC_DEFINE(HAVE_OLD_TCL)
       break  
724      fi      fi
   done  
725    
726    if test ! "x${TCLVER}" = "x"  # check for Tcl threads
727    AC_MSG_CHECKING(for Tcl threads)
728    changequote(,)dnl
729    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"}'`
730    changequote([, ])dnl
731    if test "x${TCL_VER_POST81}" = "xyes"
732    then    then
733      AC_MSG_RESULT($TCLVER found!)  
734      # check for TclpFinalizeThreadData()
735      if eval "test \"`echo '$''{'ac_cv_var_tcl_threads'+set}'`\" = set"
736      then
737        echo $ac_n "(cached) $ac_c" 1>&6
738    else    else
739      AC_MSG_RESULT(hmm... unknown version)      ac_save_LIBS="$LIBS"
740        if test "x${ac_cv_lib_pthread_pthread_create}" = "xyes"
741        then
742          LIBS="-lpthread $LIBS"
743    fi    fi
744        if test ! "x${TCLLIBEXT}" = "x.a"
745        then
746          LIBS="-L$TCLLIB -l$TCLLIBFNS -lm $LIBS"
747        else
748          if test ! "x${tcllibname}" = "x"
749          then
750        LIBS="$TCLLIB/lib$TCLLIBFN -lm $LIBS"
751          else
752        LIBS="-L$TCLLIB -l$TCLLIBFNS -lm $LIBS"
753          fi
754        fi
755        cat > conftest.$ac_ext << EOF
756    #include "confdefs.h"
757    char TclpFinalizeThreadData();
758    
759    if test $TCLFOUND = 1  int main() {
760      TclpFinalizeThreadData();
761      return 0;
762    }
763    EOF
764        if { (eval echo configure: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}
765    then    then
766      TCL_REQS="$TCLLIB/lib$TCLLIBFN$TCLLIBEXT"        rm -rf conftest*
767      TCL_LIBS="-L$TCLLIB -l$TCLLIBFN -lm"        eval "ac_cv_var_tcl_threads=yes"
768    else    else
769          echo "configure: failed program was:" >&5
770          cat conftest.$ac_ext >&5
771          rm -rf conftest*
772          eval "ac_cv_var_tcl_threads=no"
773        fi
774        rm -f conftest*
775        LIBS="$ac_save_LIBS"
776      fi
777    fi
778    
779    if test "x${ac_cv_var_tcl_threads}" = "xyes"
780    then
781      AC_MSG_RESULT(yes)
782      cat << 'EOF' >&2      cat << 'EOF' >&2
783  configure: error:  configure: warning:
784    
785    Your Tcl version is much too old for eggdrop to use.    Your Tcl library is compiled with threads.
786    I suggest you download and complie a more recent version.    There are known problems, but we will attempt to work around them.
   The most reliable current version is 8.2.1  
787    
788  EOF  EOF
789      exit 1    AC_DEFINE(HAVE_BUGGY_TCL_THREADS)
790    else
791      AC_MSG_RESULT(no)
792    fi    fi
793    
794    if test "x${TCLLIBEXT}" = "x.a"  if test ! "x${TCLLIBEXT}" = "x.a"
795    then
796      TCL_REQS="$TCLLIB/lib$TCLLIBFN"
797      TCL_LIBS="-L$TCLLIB -l$TCLLIBFNS -lm"
798    else
799    
800      # set default make as static for unshared Tcl library
801      if test ! "$DEFAULT_MAKE" = "static"
802    then    then
803      cat << 'EOF' >&2      cat << 'EOF' >&2
804  configure: warning:  configure: warning:
805    
806    Your libtcl is not a shared library.    Your Tcl library is not a shared lib.
807    configure will set default make type to static...    configure will now set default make type to static...
808    
809  EOF  EOF
810      DEFAULT_MAKE=static      DEFAULT_MAKE=static
811    fi    fi
812    
813  fi # test TCLLIB    # are we using a pre 7.4 Tcl version ?
814    changequote(,)dnl
815      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"}'`
816    changequote([, ])dnl
817      if test "x${TCL_VER_PRE74}" = "xno"
818      then
819    
820        # was the --with-tcllib option given ?
821        if test ! "x${tcllibname}" = "x"
822        then
823          TCL_REQS="$TCLLIB/lib$TCLLIBFN"
824          TCL_LIBS="$TCLLIB/lib$TCLLIBFN -lm"
825        else
826          TCL_REQS="$TCLLIB/lib$TCLLIBFN"
827          TCL_LIBS="-L$TCLLIB -l$TCLLIBFNS -lm"
828        fi
829      else
830        cat << EOF >&2
831    configure: warning:
832    
833      Your Tcl version ($TCL_VERSION) is older then 7.4.
834      There are known problems, but we will attempt to work around them.
835    
836    EOF
837        TCL_REQS="libtcle.a"
838        TCL_LIBS="-L. -ltcle -lm"
839      fi
840    fi
841    
842    # add -lpthread to $LIBS if we need it
843    if test "x${ac_cv_var_tcl_threads}" = "xyes" && test "x${ac_cv_lib_pthread_pthread_create}" = "xyes"
844    then
845      LIBS="-lpthread $LIBS"
846    fi
847    
 AC_SUBST(TCLINC)  
848  AC_SUBST(TCLLIB)  AC_SUBST(TCLLIB)
849    AC_SUBST(TCLLIBFN)
850    AC_SUBST(TCLINC)
851  AC_SUBST(TCLINCFN)  AC_SUBST(TCLINCFN)
852  AC_SUBST(TCL_REQS)  AC_SUBST(TCL_REQS)
853  AC_SUBST(TCL_LIBS)  AC_SUBST(TCL_LIBS)
854    
855  # ---------- end of robey's tcl thingies  # ---------- end of robey's tcl thingies
856    
857  if test $need_dl = 1 && test "x${ac_cv_func_dlopen}" = "xno"  if test $NEED_DL = 1 && test "x${ac_cv_func_dlopen}" = "xno"
858  then  then
859    if test "$LINUX" = "yes"    if test "$LINUX" = "yes"
860    then    then
# Line 739  EOF Line 900  EOF
900    fi    fi
901  fi  fi
902    
903  if test ! "x${GMAKE}" = "x"  EGGVERSION=`grep 'char egg_version' src/main.c | $AWK '{gsub(/(\"|\;)/, "", $4); print $4}'`
 then  
   SET_MAKE="MAKE=gmake"  
 fi  
904    
905  if test -z "$DEST"  if test "x$DEST" = "x"
906  then  then
907    DEST=\${prefix}    DEST=\${prefix}
908  fi  fi
909    
910  AC_SUBST(DEST)  AC_SUBST(DEST)
 AC_SUBST(CP1)  
 AC_SUBST(CP2)  
 AC_SUBST(CP3)  
 AC_SUBST(EGGEXEC)  
911  AC_SUBST(CC)  AC_SUBST(CC)
912    AC_SUBST(MOD_LD)
913    AC_SUBST(MOD_CC)
914    AC_SUBST(MOD_STRIP)
915  AC_SUBST(SHLIB_LD)  AC_SUBST(SHLIB_LD)
916  AC_SUBST(SHLIB_CC)  AC_SUBST(SHLIB_CC)
917  AC_SUBST(SHLIB_STRIP)  AC_SUBST(SHLIB_STRIP)
918  AC_SUBST(RESLIB)  AC_SUBST(RESLIB)
 AC_SUBST(BEL_MOD_LD)  
 AC_SUBST(BEL_MOD_CC)  
 AC_SUBST(BEL_MOD_STRIP)  
 AC_SUBST(DLFLAGS)  
919  AC_SUBST(DEFAULT_MAKE)  AC_SUBST(DEFAULT_MAKE)
920  AC_OUTPUT(Makefile lush.h)  AC_SUBST(EGGEXEC)
921    AC_SUBST(EGGVERSION)
922    AC_OUTPUT(Makefile doc/Makefile scripts/Makefile src/Makefile src/md5/Makefile src/mod/Makefile lush.h)
923    
924  AC_MSG_RESULT()  AC_MSG_RESULT()
925  AC_MSG_RESULT(Configure is done.)  AC_MSG_RESULT(Configure is done.)
926  AC_MSG_RESULT()  AC_MSG_RESULT()
927  if test -f "./eggdrop"  if test -f "./$EGGEXEC"
928  then  then
929    AC_MSG_RESULT(Type 'make clean' and then 'make' to create the bot.)    AC_MSG_RESULT(Type 'make clean' and then 'make' to create the bot.)
930  else  else

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

webmaster@eggheads.org
ViewVC Help
Powered by ViewVC 1.1.23