/[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.2 by segfault, Mon Sep 13 14:38:17 1999 UTC revision 1.3 by fabian, Sat Oct 9 15:46:33 1999 UTC
# Line 9  echo "It's going to run a bunch of stran Line 9  echo "It's going to run a bunch of stran
9  echo "your compile work without much twiddling."  echo "your compile work without much twiddling."
10  echo ""  echo ""
11    
12    AC_PROG_MAKE_SET
13  AC_PROG_CC  AC_PROG_CC
14    
 dnl crazy machines  
 AC_AIX  
 AC_ISC_POSIX  
 AC_MINIX  
15  dnl no cross-compiling!  dnl no cross-compiling!
16    if test ! "x${cross_compiling}" = "xno"
 if test ! x${cross_compiling} = xno  
17  then  then
18    echo ""    echo ""
19    echo "This system does not appear to have a working C compiler."    echo "This system does not appear to have a working C compiler."
20    echo "A working C compiler is required to compile eggdrop."    echo "A working C compiler is required to compile eggdrop."
21    echo ""    echo ""
22    exit    exit 1
23  fi  fi
24    
25    dnl crazy machines
26    AC_AIX
27    AC_ISC_POSIX
28    AC_MINIX
29    
30  dnl Checks for programs.  dnl Checks for programs.
31  AC_PROG_MAKE_SET  AC_PROG_RANLIB
32  AC_CHECK_PROG(STRIP,strip,strip)  AC_CHECK_PROG(STRIP,strip,strip)
33  AC_CHECK_PROG(UNAME,uname,uname)  AC_CHECK_PROG(UNAME,uname,uname)
34    
35  AC_PROG_RANLIB  AC_PROG_AWK
36    if test "x${AWK}" = "x"
 dnl stop putting -g in there!  @#$!#$%!  
 if test "x${CFLAGS}" = "x"  
37  then  then
38    CFLAGS="-O"    AC_MSG_ERROR(This system seems to lack a working 'awk' command.)
39    if test "x$CC" = "xgcc"  fi
40    
41    AC_CHECK_PROG(BASENAME,basename,basename)
42    if test "x${BASENAME}" = "x"
43    then    then
44      CFLAGS="-O2"    AC_MSG_ERROR(This system seems to lack a working 'basename' command.)
45    fi    fi
46  else  
47    CFLAGS=${CFLAGS}  AC_CHECK_PROG(DIRNAME,dirname,dirname)
48    if test "x${DIRNAME}" = "x"
49    then
50      AC_MSG_ERROR(This system seems to lack a working 'dirname' command.)
51  fi  fi
52    
53  dnl cp checks  AC_PROG_LN_S
54  AC_MSG_CHECKING(whether cp takes -f)  
55    dnl cp -f checks
56    AC_MSG_CHECKING(whether cp -f works)
57  ac_file1=beldin1  ac_file1=beldin1
58  ac_file2=beldin2  ac_file2=beldin2
59  ac_cp="cp -f $ac_file1 $ac_file2"  ac_cp="cp -f $ac_file1 $ac_file2"
# Line 54  ac_cp="cp -f $ac_file1 $ac_file2" Line 61  ac_cp="cp -f $ac_file1 $ac_file2"
61  cat > $ac_file1 <<EOF  cat > $ac_file1 <<EOF
62  Beldin is a llama.  :P  Beldin is a llama.  :P
63  EOF  EOF
64  if { (eval echo configure: \"$ac_cp\") 1>&5; (eval $ac_cp) 2>&5; } && test -s $ac_file2; then  if { (eval echo configure: \"$ac_cp\") 1>&5; (eval $ac_cp) 2>&5; } && test -s $ac_file2
65    then
66    AC_MSG_RESULT(yes)    AC_MSG_RESULT(yes)
67    ac_cv_prog_cp_f=yes    ac_cv_prog_cp_f=yes
68    CP1="cp -f"    CP1="cp -f"
# Line 69  else Line 77  else
77  fi  fi
78  rm -f $ac_file1 $ac_file2  rm -f $ac_file1 $ac_file2
79    
80    dnl stop putting -g in there!  @#$!#$%!
81    if test "x${CFLAGS}" = "x"
82    then
83      if test "x${CC}" = "xgcc"
84      then
85        CFLAGS="-O2"
86      else
87        CFLAGS="-O"
88      fi
89    fi
90    
91  dnl test the os and set the module linking settings  dnl test the os and set the module linking settings
92  if test "x$STRIP" = "x"  if test "x${STRIP}" = "x"
93  then  then
94    STRIP="touch"    STRIP="touch"
95  fi  fi
96  IRIX=no  IRIX=no
 NT=no  
 EGGEXEC=eggdrop  
97  LINUX=no  LINUX=no
98  need_dl=1  need_dl=1
99    EGGEXEC=eggdrop
100  DEFAULT_MAKE=eggdrop  DEFAULT_MAKE=eggdrop
101  BEL_MOD_CC="${CC}"  BEL_MOD_CC="${CC}"
102  BEL_MOD_LD="${CC}"  BEL_MOD_LD="${CC}"
# Line 87  SHLIB_CC="${CC}" Line 105  SHLIB_CC="${CC}"
105  SHLIB_LD="${CC}"  SHLIB_LD="${CC}"
106  SHLIB_STRIP="${STRIP}"  SHLIB_STRIP="${STRIP}"
107  AC_MSG_CHECKING(your OS)  AC_MSG_CHECKING(your OS)
108  system=`$UNAME`  system=`${UNAME}`
 DLOPEN_1=1  
109  case $system in  case $system in
110    Linux)    Linux)
111      CFLAGS="$CFLAGS -Wall"      CFLAGS="$CFLAGS -Wall"
# Line 98  case $system in Line 115  case $system in
115      AC_DEFINE(MODULES_OK)      AC_DEFINE(MODULES_OK)
116      LINUX=yes      LINUX=yes
117      DEFAULT_MAKE=debugmem      DEFAULT_MAKE=debugmem
     DLOPEN_1=  
118      ;;      ;;
119    BSD/OS)    BSD/OS)
120      if test x`uname -r | cut -d . -f 1` = "x2"      if test "x`${UNAME} -r | cut -d . -f 1`" = "x2"
121      then      then
122        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)
123        need_dl=0        need_dl=0
# Line 116  case $system in Line 132  case $system in
132        AC_DEFINE(MODULES_OK)        AC_DEFINE(MODULES_OK)
133      fi      fi
134      AC_CHECK_PROG(GMAKE,gmake,gmake)      AC_CHECK_PROG(GMAKE,gmake,gmake)
135      if test "x$GMAKE" = "x"      if test "x${GMAKE}" = "x"
136      then      then
137        echo ""        echo ""
138        echo "Yoicks! you have BSD/OS & you dont have 'gmake', you may"        echo "Yoicks! you have BSD/OS & you dont have 'gmake', you may"
# Line 126  case $system in Line 142  case $system in
142      ;;      ;;
143    *BSD)    *BSD)
144      AC_MSG_RESULT(FreeBSD/NetBSD/OpenBSD - choose your poison)      AC_MSG_RESULT(FreeBSD/NetBSD/OpenBSD - choose your poison)
145      SHLIB_CC="$CC -fpic"      SHLIB_CC="${CC} -fpic"
146      SHLIB_LD="ld -Bshareable -x"      SHLIB_LD="ld -Bshareable -x"
147      AC_DEFINE(MODULES_OK)      AC_DEFINE(MODULES_OK)
     DLOPEN_1=  
148      ;;      ;;
149    SunOS)    SunOS)
150      if test x`uname -r | cut -d . -f 1` = "x5"      if test "x`${UNAME} -r | cut -d . -f 1`" = "x5"
151      then      then
152        AC_MSG_RESULT(Solaris!)        AC_MSG_RESULT(Solaris!)
153        SHLIB_LD="/usr/ccs/bin/ld -G -z text"        SHLIB_LD="/usr/ccs/bin/ld -G -z text"
# Line 141  case $system in Line 156  case $system in
156        SHLIB_LD="ld"        SHLIB_LD="ld"
157        SHLIB_STRIP="touch"        SHLIB_STRIP="touch"
158      fi      fi
     AC_DEFINE(MODULES_OK)  
159      SHLIB_CC="${CC} -fPIC"      SHLIB_CC="${CC} -fPIC"
160      BEL_MOD_CC="${CC} -fPIC"      BEL_MOD_CC="${CC} -fPIC"
161        AC_DEFINE(MODULES_OK)
162      ;;      ;;
163    OSF1)    OSF1)
164      AC_MSG_RESULT(OSF...)      AC_MSG_RESULT(OSF...)
165      case `uname -r | cut -d . -f 1` in      case `${UNAME} -r | cut -d . -f 1` in
166        V*)        V*)
167      AC_MSG_RESULT(Digital OSF)      AC_MSG_RESULT(Digital OSF)
168      SHLIB_LD="ld -shared -expect_unresolved '*'"      SHLIB_LD="ld -shared -expect_unresolved '*'"
# Line 162  case $system in Line 177  case $system in
177      ;;      ;;
178        1.*)        1.*)
179      AC_MSG_RESULT(1.3+)      AC_MSG_RESULT(1.3+)
180      SHLIB_CFL="$CC -fpic"      SHLIB_CFL="${CC} -fpic"
181      SHLIB_LD='ld -shared'      SHLIB_LD='ld -shared'
182      AC_DEFINE(OSF1_HACKS)      AC_DEFINE(OSF1_HACKS)
183      AC_DEFINE(MODULES_OK)      AC_DEFINE(MODULES_OK)
# Line 178  case $system in Line 193  case $system in
193    HP-UX)    HP-UX)
194      AC_MSG_RESULT([HP-UX, just shoot yourself now])      AC_MSG_RESULT([HP-UX, just shoot yourself now])
195      AC_CHECK_LIB(dld,shl_load)      AC_CHECK_LIB(dld,shl_load)
196      AC_DEFINE(MODULES_OK)      BEL_MOD_LD="gcc -Wl,-E"
197        SHLIB_CC="gcc -fPIC"
198        SHLIB_LD="ld -b"
199      AC_DEFINE(HPUX_HACKS)      AC_DEFINE(HPUX_HACKS)
200      if test x`uname -r | cut -d . -f 2` = "x10"      if test "x`${UNAME} -r | cut -d . -f 2`" = "x10"
201      then      then
202         AC_DEFINE(HPUX10_HACKS)         AC_DEFINE(HPUX10_HACKS)
203      fi      fi
204      BEL_MOD_LD="gcc -Wl,-E"      AC_DEFINE(MODULES_OK)
     SHLIB_CC="gcc -fPIC"  
     SHLIB_LD="ld -b"  
     need_dl=0  
     ;;  
   IRIX64)  
     echo "$ac_t""you are cursed with IRIX" 1>&6  
     IRIX=yes  
     STRIP=    
205      need_dl=0      need_dl=0
     DEFAULT_MAKE=static  
206      ;;      ;;
207    IRIX)    IRIX|IRIX64)
208      AC_MSG_RESULT(you are cursed with IRIX)      AC_MSG_RESULT(you are cursed with IRIX)
209      IRIX=yes      IRIX=yes
210      STRIP=      STRIP=
# Line 204  case $system in Line 212  case $system in
212      DEFAULT_MAKE=static      DEFAULT_MAKE=static
213      ;;      ;;
214    *)    *)
215      if test -r /mach      if test -r "/mach"
216      then      then
217        AC_MSG_RESULT([NeXT...We are borg, you will be assimilated])        AC_MSG_RESULT([NeXT...We are borg, you will be assimilated])
218        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])
# Line 220  case $system in Line 228  case $system in
228  esac  esac
229    
230  dnl Check for Sun libraries.  dnl Check for Sun libraries.
231  if test ${IRIX} = yes  if test "$IRIX" = "yes"
232  then  then
233    echo Skipping library tests because they CONFUSE Irix.    AC_MSG_WARN(Skipping library tests because they *confuse* IRIX.)
234  else  else
235    AC_CHECK_LIB(socket,socket)    AC_CHECK_LIB(socket,socket)
236    AC_CHECK_LIB(nsl,connect)    AC_CHECK_LIB(nsl,connect)
237    AC_CHECK_LIB(dns,gethostbyname)    AC_CHECK_LIB(dns,gethostbyname)
238    AC_CHECK_LIB(dl,dlopen)    AC_CHECK_LIB(dl,dlopen)
239    if test x`${UNAME}` = "xSunOS"    if test "x`${UNAME}`" = "xSunOS"
240    then    then
241      AC_MSG_CHECKING(for SunOS 4)      AC_MSG_CHECKING(for SunOS 4)
242      if test x`uname -r | cut -d . -f 1` = "x5"      if test "x`${UNAME} -r | cut -d . -f 1`" = "x5"
243      then      then
244        AC_MSG_RESULT(Solaris -- "*bollocks*" zarni )        AC_MSG_RESULT(Solaris -- "*bollocks*" zarni )
245      else      else
# Line 243  else Line 251  else
251  fi  fi
252    
253  AC_C_BIGENDIAN  AC_C_BIGENDIAN
254  AC_CHECK_SIZEOF(long)  AC_CHECK_SIZEOF(long,0)
255  AC_CHECK_SIZEOF(int)  AC_CHECK_SIZEOF(int,0)
256    
257  dnl Checks for header files.  dnl Checks for header files.
258  AC_HEADER_DIRENT  AC_HEADER_DIRENT
# Line 254  AC_CHECK_HEADERS(sys/time.h sys/select.h Line 262  AC_CHECK_HEADERS(sys/time.h sys/select.h
262  dnl Checks for typedefs, structures, and compiler characteristics.  dnl Checks for typedefs, structures, and compiler characteristics.
263  AC_TYPE_PID_T  AC_TYPE_PID_T
264  AC_HEADER_TIME  AC_HEADER_TIME
265    AC_C_INLINE
266    
267  dnl Checks for library functions.  dnl Checks for library functions.
268  AC_CHECK_FUNCS(rename getrusage getdtablesize srandom random sigaction)  AC_CHECK_FUNCS(rename getrusage getdtablesize srandom random sigaction)
269  AC_CHECK_FUNCS(sigemptyset vsprintf strcasecmp setpgid clock dlopen)  AC_CHECK_FUNCS(sigemptyset vsprintf strcasecmp setpgid clock dlopen)
270  AC_CHECK_FUNCS(dprintf bzero uname vsnprintf)  AC_CHECK_FUNCS(dprintf bzero uname vsnprintf)
271    
272  if test "${ac_cv_func_vsprintf}" = "no"  if test "x${ac_cv_func_vsprintf}" = "xno"
273  then  then
274    echo ""    echo ""
275    echo "Your system does not have the sprintf/vsprintf libraries."    echo "Your system does not have the sprintf/vsprintf libraries."
276    echo "These are required to compile almost anything.  Sorry."    echo "These are required to compile almost anything.  Sorry."
277    echo ""    echo ""
278    exit    exit 1
279  fi  fi
280    
281  if test "${ac_cv_header_stdc}" = "no"  if test "x${ac_cv_header_stdc}" = "xno"
282  then  then
283    echo ""    echo ""
284    echo "Your system must support ANSI C Header files."    echo "Your system must support ANSI C Header files."
285    echo "These are required for the language support. Sorry."    echo "These are required for the language support. Sorry."
286    exit    echo ""
287      exit 1
288  fi  fi
289    
290  dnl check how much space is left in filedb (informational purposes)  dnl check how much space is left in filedb (informational purposes)
# Line 294  rm -f abacab abacab.o abacab.c Line 304  rm -f abacab abacab.o abacab.c
304  echo "   (standard is currently 48/512 bytes)"  echo "   (standard is currently 48/512 bytes)"
305    
306  dnl where is tcl?  is it here?  dnl where is tcl?  is it here?
   
307  # ---------- begin robey's tcl thingies  # ---------- begin robey's tcl thingies
308    # (well, what used to be robey's tcl thingies...)
309    
310  dnl oohh new configure --variables for those with multiple tcl libs  tclnames="tcl tcl8.3 tcl83 tcl8.2 tcl82 tcl8.1 tcl81 \
311  AC_CHECK_PROG(BASENAME,basename,basename)      tcl8.0 tcl80 tcl7.6 tcl76 tcl7.5 tcl75"
312  AC_CHECK_PROG(DIRNAME,dirname,dirname)  
313  if test $BASENAME = "" || test $DIRNAME = ""  tcllibextensions=".so .so.1 .so.1.0 .so.1.2 .a"
314    
315    tcllibpaths="/usr/local/lib /usr/local/pkgs/tcl/lib \
316        /usr/lib /lib /usr/i486-linuxaout/lib \
317        $HOME/lib $HOME/tcl/lib $HOME"
318    
319    tclheaderpaths="/usr/local/include /usr/local/pkgs/tcl/include \
320        /usr/include $HOME/include $HOME/tcl/include $HOME"
321    
322    # sanity checking to make sure either both or neither TCLLIB and TCLINC are set
323    if test ! "x${TCLLIB}" = "x" && test "x${TCLINC}" = "x"
324  then  then
325    echo ack...no basename or dirname, we cant configure tcl without em.    echo ""
326    exit 1    echo "You set the environment variable TCLLIB, but I failed to detect TCLINC."
327      echo "Please set both if you wish to use them."
328      echo "configure will now try to autodetect both libtcl and tcl.h"
329      echo ""
330      unset TCLLIB
331    else
332      if test ! "x${TCLINC}" = "x"
333      then
334        echo ""
335        echo "You set the environment variable TCLINC, but I failed to detect TCLLIB."
336        echo "Please set both if you wish to use them."
337        echo "configure will now try to autodetect both libtcl and tcl.h"
338        echo ""
339        unset TCLINC
340      fi
341  fi  fi
342    
343    dnl oohh new configure --variables for those with multiple tcl libs
344  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)
345  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)
346    
347  if test -r "$tcllibname"  if test -r "$tcllibname"
348  then  then
349    TCLLIB=`$DIRNAME $tcllibname`    TCLLIB=`$DIRNAME $tcllibname`
350    TCLLIBFN=`$BASENAME $tcllibname | cut -c4-`    TCLLIBEXT=".`echo $tcllibname | $AWK '{j=split($1, i, "."); k=i[[j]]; print k}'`"
351    echo "using tcllib $TCLLIB/lib$TCLLIBFN"    TCLLIBFN=`$BASENAME $tcllibname $TCLLIBEXT | cut -c4-`
352      echo "Using Tcl library: $TCLLIB/lib$TCLLIBFN$TCLLIBEXT"
353  else  else
354    
  libnames="tcl.so tcl.so.1\  
     tcl8.2.so tcl8.2.so.1 tcl82.so.1.0 tcl82.so.1\  
     tcl8.1.so tcl8.1.so.1 tcl81.so.1.0 tcl81.so.1\  
     tcl8.0.so tcl8.0.so.1 tcl80.so.1.0 tcl80.so.1\  
     tcl7.6.so tcl7.6.so.1 tcl76.so.1.0 tcl76.so.1\  
     tcl7.5.so tcl7.5.so.1 tcl75.so.1.0 tcl75.so.1\  
     tcl.a\  
     tcl8.2.a tcl82.a\  
     tcl8.1.a tcl81.a\  
     tcl8.0.a tcl80.a\  
     tcl7.6.a tcl76.a\  
     tcl7.5.a tcl75.a\  
     tcl7.4.a tcl74.a"  
   
355   # look for libtcl: if TCLLIB is set, check there first   # look for libtcl: if TCLLIB is set, check there first
356   if test "$TCLLIB" != ""    if test ! "x${TCLLIB}" = "x"
357   then   then
358     TCLLIBFN=notfound      for tcllibfn in $tclnames
359     for checkfn in $libnames      do
360          for tcllibext in $tcllibextensions
361     do     do
362       if test -r $TCLLIB/lib$checkfn      if test -r "$TCLLIB/lib$tcllibfn$tcllibext"
363       then       then
364         if test $TCLLIBFN = notfound        if test "x${TCLLIBFN}" = "x"
365         then         then
366       TCLLIBFN=$checkfn          TCLLIBFN=$tcllibfn
367            TCLLIBEXT=$tcllibext
368            break 2
369         fi         fi
370       fi       fi
371     done     done
372     if test $TCLLIBFN = notfound      done
373        if test "x${TCLLIBFN}" = "x"
374     then     then
375       echo "Environment variable TCLLIB is set, but incorrect."       echo "Environment variable TCLLIB is set, but incorrect."
376       unset TCLLIB       unset TCLLIB
# Line 353  else Line 379  else
379    
380   # check in common places now   # check in common places now
381   AC_MSG_CHECKING(for libtcl)   AC_MSG_CHECKING(for libtcl)
382   if test "$TCLLIB" = ""    if test ! "x${TCLLIB}" = "x"
383   then   then
384     for checkfn in $libnames      AC_MSG_RESULT(found in $TCLLIB/lib$TCLLIBFN$TCLLIBEXT)
385      else
386        for tcllibfn in $tclnames
387     do     do
388       if test "$TCLLIB" = ""        for tcllibext in $tcllibextensions
      then  
        for check in /usr/local/lib /usr/local/lib/tcl /usr/local/pkgs/tcl/lib /usr/lib /usr/i486-linuxaout/lib $HOME/lib $HOME/tcl $HOME/tcl/lib $HOME /lib  
389         do         do
390       if test -r $check/lib$checkfn      for tcllibpath in $tcllibpaths
391        do
392          if test -r "$tcllibpath/lib$tcllibfn$tcllibext"
393           then           then
394         if test "$TCLLIB" = ""          if test "x${TCLLIB}" = "x"
395             then             then
396           AC_MSG_RESULT(found in $check/lib$checkfn)            AC_MSG_RESULT(found in $tcllibpath/lib$tcllibfn$tcllibext)
397           TCLLIB=$check            TCLLIB=$tcllibpath
398           TCLLIBFN=$checkfn            TCLLIBFN=$tcllibfn
399              TCLLIBEXT=$tcllibext
400              break 3
401         fi         fi
402       fi       fi
403         done         done
      fi  
404     done     done
405   else      done
    AC_MSG_RESULT(found in $TCLLIB/lib$TCLLIBFN)  
406   fi   fi
407    
408  fi # option  fi # test tcllibname
409    
410  # give up if they don't even have that  # give up if they don't even have that
411  if test "$TCLLIB" = ""  if test "x${TCLLIB}" = "x"
412  then  then
413    AC_MSG_RESULT(not found)    AC_MSG_RESULT(not found)
414  fi  fi
# Line 390  if test -r "$tclincname" Line 418  if test -r "$tclincname"
418  then  then
419    TCLINC=`$DIRNAME $tclincname`    TCLINC=`$DIRNAME $tclincname`
420    TCLINCFN=`$BASENAME $tclincname`    TCLINCFN=`$BASENAME $tclincname`
421    echo "using TCL header $TCLINC/$TCLINCFN"    echo "Using Tcl header: $TCLINC/$TCLINCFN"
422  else  else
423    
424    TCLINCFN=tcl.h    TCLINCFN=tcl.h
425    if test "$TCLINC" != ""  
426      if test ! "x${TCLINC}" = "x"
427    then    then
428      if test ! -r $TCLINC/$TCLINCFN      if test ! -r "$TCLINC/$TCLINCFN"
429      then      then
430        echo "Environment variable TCLINC is set, but incorrect."        echo "Environment variable TCLINC is set, but incorrect."
431        unset TCLINC        unset TCLINC
# Line 404  else Line 434  else
434    
435    # check in common places now    # check in common places now
436    AC_MSG_CHECKING(for $TCLINCFN)    AC_MSG_CHECKING(for $TCLINCFN)
437    if test "$TCLINC" = ""    if test ! "x${TCLINC}" = "x"
438    then    then
439      for check in /usr/local/include /usr/local/include/tcl /usr/local/pkgs/tcl/include /usr/include /usr/include/tcl $HOME/include $HOME/tcl $HOME/tcl/include $HOME      AC_MSG_RESULT(found in $TCLINC/$TCLINCFN)
440      else
441        for headerpath in $tclheaderpaths
442      do      do
443        if test -r $check/$TCLINCFN        if test -r "$headerpath/$TCLINCFN"
444        then        then
445      if test "$TCLINC" != ""      if test "x${TCLINC}" = "x"
446          then          then
447          AC_MSG_RESULT(found in $headerpath/$TCLINCFN)
448          TCLINC=$headerpath
449        break        break
450      fi      fi
     AC_MSG_RESULT(found in $check/$TCLINCFN)  
     TCLINC=$check  
     break  
451        fi        fi
452      done      done
453      # freebsd hack      if test "x${TCLINC}" = "x"
     if test "$TCLINC" = ""  
454      then      then
455        for ver in 8.2 8.1 8.0 7.6 7.5 7.4        for tcllibfn in $tclnames
456        do        do
457      if test -r /usr/local/include/tcl$ver/$TCLINCFN      for headerpath in $tclheaderpaths
458          then      do
459        if test "$TCLINC" != ""        if test -r "$headerpath/$tcllibfn/$TCLINCFN"
460            then            then
461          break          AC_MSG_RESULT(found in $headerpath/$TCLINCFN)
462        fi          TCLINC=$headerpath/$tcllibfn
463        AC_MSG_RESULT(found in /usr/local/include/tcl$ver/$TCLINCFN)          break 2
       TCLINC=/usr/local/include/tcl$ver  
       break  
464      fi      fi
465        done        done
466          done
467      fi      fi
   else  
     AC_MSG_RESULT(found in $TCLINC/$TCLINCFN)  
468    fi    fi
469    
470    # had TCLLIB but not TCLINC?  so close... :(    # had TCLLIB but not TCLINC?  so close... :(
471    if test "$TCLINC" = ""    if test "x${TCLINC}" = "x"
472    then    then
473      AC_MSG_RESULT(not found)      AC_MSG_RESULT(not found)
474      unset TCLLIB      unset TCLLIB
475      unset TCLLIBFN      unset TCLLIBFN
476        unset TCLLIBEXT
477    fi    fi
 fi # option  
478    
479  # done looking, now either TCLLIB & TCLINC are both set, or neither is set  fi # test tclincname
480    
481  if test "$TCLLIB" = ""  # done looking, now either TCLLIB & TCLINC are both set, or neither is set
482    if test "x${TCLLIB}" = "x"
483  then  then
484    echo ""    echo ""
485    echo "I can't find Tcl on this system."    echo "I can't find Tcl on this system."
# Line 459  then Line 487  then
487    echo "Eggdrop now requires Tcl to compile.  If you already have Tcl"    echo "Eggdrop now requires Tcl to compile.  If you already have Tcl"
488    echo "installed on this system, and I just wasn't looking in the right"    echo "installed on this system, and I just wasn't looking in the right"
489    echo "place for it, set the environment variables TCLLIB and TCLINC so"    echo "place for it, set the environment variables TCLLIB and TCLINC so"
490    echo "I will know where to find 'libtcl.a' (or 'libtcl.so') and '$TCLINCFN'"    echo "I will know where to find 'libtcl.a' (or 'libtcl.so') and 'tcl.h'"
491    echo "(respectively).  Then run 'configure' again."    echo "(respectively).  Then run 'configure' again."
492    echo ""    echo ""
493    echo "Read the README file if you don't know what Tcl is or how to get"    echo "Read the README file if you don't know what Tcl is or how to get"
# Line 467  then Line 495  then
495    echo ""    echo ""
496    exit 1    exit 1
497  else  else
498    echo Checking $TCLINC directory for tcl version  
499    AC_MSG_CHECKING(for Tcl version)    AC_MSG_CHECKING(for Tcl version)
500    tclver=`grep TCL_VERSION $TCLINC/$TCLINCFN | grep "7.5" | wc -l`  
501    if test $tclver = 0; then    for ver in $tclnames
502      tclver=`grep TCL_VERSION $TCLINC/$TCLINCFN | grep "7.6" | wc -l`    do
503      if test $tclver = 0; then      ver=`echo $ver | cut -c4-`
504        tclver=`grep TCL_VERSION $TCLINC/$TCLINCFN | grep "8.0" | wc -l`      if test ! "x${ver}" = "x"
505        if test $tclver = 0; then      then
506      tclver=`grep TCL_VERSION $TCLINC/$TCLINCFN | grep "8.1" | wc -l`        TCLFOUND=`grep TCL_VERSION $TCLINC/$TCLINCFN | grep $ver | wc -l`
507      if test $tclver = 0; then        if test ! $TCLFOUND = 0
508        tclver=`grep TCL_VERSION $TCLINC/$TCLINCFN | grep "8.2" | wc -l`        then
509        if test $tclver = 1; then          TCLVER=$ver
510          AC_MSG_RESULT(8.2 found)              break
       else  
         AC_MSG_RESULT(hmm... unknown version)  
511            fi            fi
     else  
       AC_MSG_RESULT(8.1 found)  
512      fi      fi
513      done
514    
515      if test ! "x${TCLVER}" = "x"
516      then
517        AC_MSG_RESULT($TCLVER found!)
518        else        else
519      AC_MSG_RESULT(8.0 found!)      AC_MSG_RESULT(hmm... unknown version)
520        fi        fi
521    
522      if test $TCLFOUND = 1
523      then
524        TCL_REQS="$TCLLIB/lib$TCLLIBFN$TCLLIBEXT"
525        TCL_LIBS="-L$TCLLIB -l$TCLLIBFN -lm"
526      else      else
527        AC_MSG_RESULT(7.6 found!)      echo ""
528        echo "Your tcl version is much too old for eggdrop to use."
529        echo "I suggest you download and complie a more recent version."
530        echo "The most reliable current version is 8.2.1"
531        echo ""
532        exit 1
533      fi      fi
534    else        
535      AC_MSG_RESULT(7.5 found)    if test "x${TCLLIBEXT}" = "x.a"
536      then
537        echo ""
538        echo "Your libtcl is not a shared library."
539        echo "configure will set default make type to static..."
540        echo ""
541        DEFAULT_MAKE=static
542    fi    fi
 fi # option  
543    
544    if test $need_dl = 1 -a "${ac_cv_func_dlopen}" = "no"  fi # test TCLLIB
545    
546    AC_SUBST(TCLINC)
547    AC_SUBST(TCLLIB)
548    AC_SUBST(TCLINCFN)
549    AC_SUBST(TCL_REQS)
550    AC_SUBST(TCL_LIBS)
551    
552    # ---------- end of robey's tcl thingies
553    
554    if test $need_dl = 1 && test "x${ac_cv_func_dlopen}" = "xno"
555    then    then
556      if test "$LINUX" = "yes"      if test "$LINUX" = "yes"
557      then      then
558        echo "Since you are on a Linux system, this has a known problem,"        echo "Since you are on a Linux system, this has a known problem,"
559        if test -r /lib/libdl.so.1      if test -r "/lib/libdl.so.1"
560        then        then
561      echo "and you seem to have it, I know a kludge for it,"      echo "and you seem to have it, I know a kludge for it,"
562      echo "so we'll do that..."      echo "so we'll do that..."
# Line 516  fi # option Line 570  fi # option
570      echo "if you work out where it is, add it to your XLIBS= lines"      echo "if you work out where it is, add it to your XLIBS= lines"
571      echo "and #define HAVE_DLOPEN in config.h"      echo "and #define HAVE_DLOPEN in config.h"
572      echo ""      echo ""
573      echo "we'll proceed on anyways, but you probably won't be able"        echo "we'll proceed on anyway, but you probably won't be able"
574      echo "to 'make eggdrop' but you might be able to make the"      echo "to 'make eggdrop' but you might be able to make the"
575      echo "static bot (I'll default your make to this version)."      echo "static bot (I'll default your make to this version)."
576      DEFAULT_MAKE=static      DEFAULT_MAKE=static
# Line 529  fi # option Line 583  fi # option
583      fi      fi
584    fi    fi
585    
586    TCLLIBFNS=`basename $TCLLIBFN .a`  if test ! "x${GMAKE}" = "x"
   TCLLIBFNS=`basename $TCLLIBFNS .so.1.2`  
   TCLLIBFNS=`basename $TCLLIBFNS .so.1.0`  
   TCLLIBFNS=`basename $TCLLIBFNS .so.1`  
   TCLLIBFNS=`basename $TCLLIBFNS .so`  
   if test $tclver = 1  
   then  
     TCL_REQS="$TCLLIB/lib$TCLLIBFN"  
     TCL_LIBS="-L$TCLLIB -l$TCLLIBFNS -lm"  
   else  
     echo ""  
     echo "You're tcl version is way too old - Version 7.4 or earlier"  
     echo "I suggest you download and complie a more recent version"  
     echo "The most reliable current version is 8.2b1"  
     echo ""  
     exit 1  
   fi  
   
 AC_SUBST(TCLINC)  
 AC_SUBST(TCLLIB)  
 AC_SUBST(TCLINCFN)  
 AC_SUBST(TCLLIBFN)  
 AC_SUBST(TCL_REQS)  
 AC_SUBST(TCL_LIBS)  
   
 # ---------- end of robey's tcl thingies  
   
 if test ! "x$GMAKE" = "x"  
587  then  then
588    SET_MAKE="MAKE=gmake"    SET_MAKE="MAKE=gmake"
589  fi  fi
# Line 580  AC_SUBST(BEL_MOD_CC) Line 607  AC_SUBST(BEL_MOD_CC)
607  AC_SUBST(BEL_MOD_STRIP)  AC_SUBST(BEL_MOD_STRIP)
608  AC_SUBST(DLFLAGS)  AC_SUBST(DLFLAGS)
609  AC_SUBST(DEFAULT_MAKE)  AC_SUBST(DEFAULT_MAKE)
   
610  AC_OUTPUT(Makefile lush.h)  AC_OUTPUT(Makefile lush.h)
611    
 # if you configure again, you must re-make everything.  tough shit.  
 make clean  
   
612  echo ""  echo ""
613  echo "Configure is done."  echo "Configure is done."
614  echo ""  echo ""
615  echo "If your bot will be on Dalnet, or a network that uses their server"  if test -f "./eggdrop"
616  echo "code, please edit the Makefile and remove \"-DRFC_COMPLIANT\" from"  then
617  echo "the \"CFLGS=\" line."    echo "Type 'make clean' and then 'make' to create the bot."
618  echo ""  else
619  echo "Type 'make' to create the bot"    echo "Type 'make' to create the bot."
620    fi
621  echo ""  echo ""

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

webmaster@eggheads.org
ViewVC Help
Powered by ViewVC 1.1.23