/[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.5 by fabian, Sun Oct 10 00:56:33 1999 UTC revision 1.6 by fabian, Mon Oct 11 07:59:55 1999 UTC
# Line 3  AC_INIT(eggdrop.conf.dist) Line 3  AC_INIT(eggdrop.conf.dist)
3  ac_default_prefix=\${HOME}/eggdrop  ac_default_prefix=\${HOME}/eggdrop
4  AC_CONFIG_HEADER(config.h)  AC_CONFIG_HEADER(config.h)
5    
6  echo ""  AC_MSG_RESULT()
7  echo "This is eggdrop's GNU configure script."  AC_MSG_RESULT(This is eggdrop's GNU configure script.)
8  echo "It's going to run a bunch of strange tests to hopefully make"  AC_MSG_RESULT(It's going to run a bunch of strange tests to hopefully)
9  echo "your compile work without much twiddling."  AC_MSG_RESULT(make your compile work without much twiddling.)
10  echo ""  AC_MSG_RESULT()
11    
12  AC_PROG_MAKE_SET  AC_PROG_MAKE_SET
13  AC_PROG_CC  AC_PROG_CC
# Line 15  AC_PROG_CC Line 15  AC_PROG_CC
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 "" >&2    cat << 'EOF' >&2
19    echo "This system does not appear to have a working C compiler." >&2  configure: error:
20    echo "A working C compiler is required to compile eggdrop." >&2  
21    echo "" >&2    This system does not appear to have a working C compiler.
22      A working C compiler is required to compile eggdrop.
23    
24    EOF
25    exit 1    exit 1
26  fi  fi
27    
# Line 35  AC_CHECK_PROG(UNAME,uname,uname) Line 38  AC_CHECK_PROG(UNAME,uname,uname)
38  AC_PROG_AWK  AC_PROG_AWK
39  if test "x${AWK}" = "x"  if test "x${AWK}" = "x"
40  then  then
41    AC_MSG_ERROR(This system seems to lack a working 'awk' command.)    cat << 'EOF' >&2
42    configure: error:
43    
44      This system seems to lack a working 'awk' command.
45      A working 'awk' command is required to compile eggdrop.
46    
47    EOF
48      exit 1
49  fi  fi
50    
51  AC_CHECK_PROG(BASENAME,basename,basename)  AC_CHECK_PROG(BASENAME,basename,basename)
52  if test "x${BASENAME}" = "x"  if test "x${BASENAME}" = "x"
53  then  then
54    AC_MSG_ERROR(This system seems to lack a working 'basename' command.)    cat << 'EOF' >&2
55    configure: error:
56    
57      This system seems to lack a working 'basename' command.
58      A working 'basename' command is required to compile eggdrop.
59    
60    EOF
61      exit 1
62  fi  fi
63    
64  AC_CHECK_PROG(DIRNAME,dirname,dirname)  AC_CHECK_PROG(DIRNAME,dirname,dirname)
65  if test "x${DIRNAME}" = "x"  if test "x${DIRNAME}" = "x"
66  then  then
67    AC_MSG_ERROR(This system seems to lack a working 'dirname' command.)    cat << 'EOF' >&2
68    configure: error:
69    
70      This system seems to lack a working 'dirname' command.
71      A working 'dirname' command is required to compile eggdrop.
72    
73    EOF
74      exit 1
75  fi  fi
76    
77  AC_PROG_LN_S  AC_PROG_LN_S
# Line 58  ac_file1=beldin1 Line 82  ac_file1=beldin1
82  ac_file2=beldin2  ac_file2=beldin2
83  ac_cp="cp -f $ac_file1 $ac_file2"  ac_cp="cp -f $ac_file1 $ac_file2"
84    
85  cat > $ac_file1 <<EOF  cat > $ac_file1 << 'EOF'
86  Beldin is a llama.  :P  Beldin is a llama.  :P
87  EOF  EOF
88  if { (eval echo configure: \"$ac_cp\") 1>&5; (eval $ac_cp) 2>&5; } && test -s $ac_file2  if { (eval echo configure: \"$ac_cp\") 1>&5; (eval $ac_cp) 2>&5; } && test -s $ac_file2
# Line 91  fi Line 115  fi
115  dnl test the os and set the module linking settings  dnl test the os and set the module linking settings
116  if test "x${STRIP}" = "x"  if test "x${STRIP}" = "x"
117  then  then
118    STRIP="touch"    STRIP=touch
119  fi  fi
120  IRIX=no  IRIX=no
121  LINUX=no  LINUX=no
# Line 124  case $system in Line 148  case $system in
148        DEFAULT_MAKE=static        DEFAULT_MAKE=static
149      else      else
150        AC_MSG_RESULT(BSD/OS 3+! ok I spose)        AC_MSG_RESULT(BSD/OS 3+! ok I spose)
151        BEL_MOD_CC="shlicc"        BEL_MOD_CC=shlicc
152        BEL_MOD_LD="shlicc"        BEL_MOD_LD=shlicc
153        BEL_MOD_STRIP="${STRIP} -d"        BEL_MOD_STRIP="${STRIP} -d"
154        SHLIB_LD="shlicc -r"        SHLIB_LD="shlicc -r"
155        SHLIB_STRIP="touch"        SHLIB_STRIP=touch
156        AC_DEFINE(MODULES_OK)        AC_DEFINE(MODULES_OK)
157      fi      fi
158      AC_CHECK_PROG(GMAKE,gmake,gmake)      AC_CHECK_PROG(GMAKE,gmake,gmake)
159      if test "x${GMAKE}" = "x"      if test "x${GMAKE}" = "x"
160      then      then
161        echo "" >&2        cat << 'EOF' >&2
162        echo "Yoicks! you have BSD/OS & you dont have 'gmake', you may" >&2  configure: warning:
163        echo "not be able to compile the bot successfully :(" >&2  
164        echo "" >&2    Yoicks! You have BSD/OS and you dont have 'gmake'.
165      You may not be able to compile the bot successfully :(
166    
167    EOF
168      fi      fi
169      ;;      ;;
170    *BSD)    *BSD)
# Line 153  case $system in Line 180  case $system in
180        SHLIB_LD="/usr/ccs/bin/ld -G -z text"        SHLIB_LD="/usr/ccs/bin/ld -G -z text"
181      else      else
182        AC_MSG_RESULT(SunOS 4 :/)        AC_MSG_RESULT(SunOS 4 :/)
183        SHLIB_LD="ld"        SHLIB_LD=ld
184        SHLIB_STRIP="touch"        SHLIB_STRIP=touch
185      fi      fi
186      SHLIB_CC="${CC} -fPIC"      SHLIB_CC="${CC} -fPIC"
187      BEL_MOD_CC="${CC} -fPIC"      BEL_MOD_CC="${CC} -fPIC"
# Line 171  case $system in Line 198  case $system in
198      ;;      ;;
199        1.0|1.1|1.2)        1.0|1.1|1.2)
200      AC_MSG_RESULT(pre 1.3)      AC_MSG_RESULT(pre 1.3)
201      SHLIB_LD='ld -R -export $@:'      SHLIB_LD="ld -R -export $@:"
202      AC_DEFINE(OSF1_HACKS)      AC_DEFINE(OSF1_HACKS)
203      AC_DEFINE(MODULES_OK)      AC_DEFINE(MODULES_OK)
204      ;;      ;;
205        1.*)        1.*)
206      AC_MSG_RESULT(1.3+)      AC_MSG_RESULT(1.3+)
207      SHLIB_CFL="${CC} -fpic"      SHLIB_CFL="${CC} -fpic"
208      SHLIB_LD='ld -shared'      SHLIB_LD="ld -shared"
209      AC_DEFINE(OSF1_HACKS)      AC_DEFINE(OSF1_HACKS)
210      AC_DEFINE(MODULES_OK)      AC_DEFINE(MODULES_OK)
211      ;;      ;;
# Line 207  case $system in Line 234  case $system in
234    IRIX|IRIX64)    IRIX|IRIX64)
235      AC_MSG_RESULT(you are cursed with IRIX)      AC_MSG_RESULT(you are cursed with IRIX)
236      IRIX=yes      IRIX=yes
237      STRIP=      SHLIB_STRIP=touch
238      need_dl=0      need_dl=0
239      DEFAULT_MAKE=static      DEFAULT_MAKE=static
240      ;;      ;;
# Line 279  AC_CHECK_FUNCS(dprintf bzero uname vsnpr Line 306  AC_CHECK_FUNCS(dprintf bzero uname vsnpr
306    
307  if test "x${ac_cv_func_vsprintf}" = "xno"  if test "x${ac_cv_func_vsprintf}" = "xno"
308  then  then
309    echo "" >&2    cat << 'EOF' >&2
310    echo "Your system does not have the sprintf/vsprintf libraries." >&2  configure: error:
311    echo "These are required to compile almost anything.  Sorry." >&2  
312    echo "" >&2    Your system does not have the sprintf/vsprintf libraries.
313      These are required to compile almost anything.  Sorry.
314    
315    EOF
316    exit 1    exit 1
317  fi  fi
318    
319  if test "x${ac_cv_header_stdc}" = "xno"  if test "x${ac_cv_header_stdc}" = "xno"
320  then  then
321    echo "" >&2    cat << 'EOF' >&2
322    echo "Your system must support ANSI C Header files." >&2  configure: error:
323    echo "These are required for the language support. Sorry." >&2  
324    echo "" >&2    Your system must support ANSI C Header files.
325      These are required for the language support.  Sorry.
326    
327    EOF
328    exit 1    exit 1
329  fi  fi
330    
# Line 302  cat > abacab.c <<'EOF' Line 335  cat > abacab.c <<'EOF'
335  #include <sys/time.h>  #include <sys/time.h>
336  #include "src/mod/filesys.mod/files.h"  #include "src/mod/filesys.mod/files.h"
337  main() {  main() {
338    fprintf(stderr, "%d/%d", 512-sizeof(struct filler), sizeof(filedb));    fprintf(stdout, "%d/%d", 512-sizeof(struct filler), sizeof(filedb));
339  }  }
340  EOF  EOF
341  ${CC} -o abacab abacab.c  ${CC} -o abacab abacab.c
342  FILEDB_SPACE=`./abacab`  FILEDB_SPACE=`./abacab`
343  AC_MSG_RESULT($FILEDB_SPACE bytes)  AC_MSG_RESULT($FILEDB_SPACE bytes)
344  rm -f abacab abacab.o abacab.c  rm -f abacab abacab.o abacab.c
345  echo "   (standard is currently 48/512 bytes)"  AC_MSG_RESULT([   (standard is currently 48/512 bytes)])
346    
347  dnl where is tcl?  is it here?  dnl where is tcl?  is it here?
348  # ---------- begin robey's tcl thingies  # ---------- begin robey's tcl thingies
349  # (well, what used to be robey's tcl thingies...)  # (well, what used to be robey's tcl thingies...)
350    
351  tclnames="tcl tcl8.3 tcl83 tcl8.2 tcl82 tcl8.1 tcl81 \  tclversions="8.3 8.2 8.1 8.0 7.6 7.5"
352    
353    tcllibnames="tcl tcl8.3 tcl83 tcl8.2 tcl82 tcl8.1 tcl81 \
354      tcl8.0 tcl80 tcl7.6 tcl76 tcl7.5 tcl75"      tcl8.0 tcl80 tcl7.6 tcl76 tcl7.5 tcl75"
355    
356  tcllibextensions=".so .so.1 .so.1.0 .so.1.2 .a"  tcllibextensions=".so .so.1 .so.1.0 .so.1.2 .a"
357    
358    tclheadernames="tcl.h"
359    
360  tcllibpaths="/usr/local/lib /usr/local/pkgs/tcl/lib \  tcllibpaths="/usr/local/lib /usr/local/pkgs/tcl/lib \
361      /usr/lib /lib /usr/i486-linuxaout/lib \      /usr/lib /lib /usr/i486-linuxaout/lib \
362      $HOME/lib $HOME/tcl/lib $HOME"      $HOME/lib $HOME/tcl/lib $HOME"
# Line 327  tcllibpaths="/usr/local/lib /usr/local/p Line 364  tcllibpaths="/usr/local/lib /usr/local/p
364  tclheaderpaths="/usr/local/include /usr/local/pkgs/tcl/include \  tclheaderpaths="/usr/local/include /usr/local/pkgs/tcl/include \
365      /usr/include $HOME/include $HOME/tcl/include $HOME"      /usr/include $HOME/include $HOME/tcl/include $HOME"
366    
367  # sanity checking to make sure either both or neither TCLLIB and TCLINC are set  dnl oohh new configure --variables for those with multiple tcl libs
368    AC_ARG_WITH(tcllib, [  --with-tcllib=PATH      full path to tcl library], tcllibname=$withval)
369    AC_ARG_WITH(tclinc, [  --with-tclinc=PATH      full path to tcl header], tclincname=$withval)
370    
371    # make sure either both or neither $tcllibname and $tclincname are set
372    if test ! "x${tcllibname}" = "x"
373    then
374      if test "x${tclincname}" = "x"
375      then
376        cat << 'EOF' >&2
377    configure: warning:
378    
379      You must specify both --with-tcllib and --with-tclinc for them to work.
380      configure will now attempt to autodetect both the Tcl library and header...
381    
382    EOF
383        tcllibname=""
384        TCLLIB=""
385        TCLINC=""
386      fi
387    else
388      if test ! "x${tclincname}" = "x"
389      then
390        cat << 'EOF' >&2
391    configure: warning:
392    
393      You must specify both --with-tcllib and --with-tclinc for them to work.
394      configure will now attempt to autodetect both the Tcl library and header...
395    
396    EOF
397        tclincname=""
398        TCLLIB=""
399        TCLINC=""
400      fi
401    fi
402    
403    # make sure either both or neither $TCLLIB and $TCLINC are set
404  if test ! "x${TCLLIB}" = "x"  if test ! "x${TCLLIB}" = "x"
405  then  then
406    if test "x${TCLINC}" = "x"    if test "x${TCLINC}" = "x"
407    then    then
408      echo "" >&2      cat << 'EOF' >&2
409      echo "Environment variable TCLLIB was set, but I did not detect TCLINC." >&2  configure: warning:
410      echo "Please set both TCLLIB and TCLINC correctly if you wish to use them." >&2  
411      echo "configure will now attempt to autodetect both libtcl and tcl.h..." >&2    Environment variable TCLLIB was set, but I did not detect TCLINC.
412      echo "" >&2    Please set both TCLLIB and TCLINC correctly if you wish to use them.
413      unset TCLLIB    configure will now attempt to autodetect both the Tcl library and header...
414    
415    EOF
416        TCLLIB=""
417    fi    fi
418  else  else
419    if test ! "x${TCLINC}" = "x"    if test ! "x${TCLINC}" = "x"
420    then    then
421      echo "" >&2      cat << 'EOF' >&2
422      echo "Environment variable TCLINC was set, but I did not detect TCLLIB." >&2  configure: warning:
423      echo "Please set both TCLLIB and TCLINC correctly if you wish to use them." >&2  
424      echo "configure will now attempt to autodetect both libtcl and tcl.h..." >&2    Environment variable TCLINC was set, but I did not detect TCLLIB.
425      echo "" >&2    Please set both TCLLIB and TCLINC correctly if you wish to use them.
426      unset TCLINC    configure will now attempt to autodetect both the Tcl library and header...
427    
428    EOF
429        TCLINC=""
430    fi    fi
431  fi  fi
432    
433  dnl oohh new configure --variables for those with multiple tcl libs  # look for $TCLLIBFN: if $tcllibname is set, check there first
434  AC_ARG_WITH(tcllib, [  --with-tcllib=PATH      full path to tcl library], tcllibname=$withval)  if test ! "x${tcllibname}" = "x"
435  AC_ARG_WITH(tclinc, [  --with-tclinc=PATH      full path to tcl header], tclincname=$withval)  then
436      if test -f "$tcllibname" && test -r "$tcllibname"
 if test -r "$tcllibname"  
437  then  then
438    TCLLIB=`$DIRNAME $tcllibname`    TCLLIB=`$DIRNAME $tcllibname`
439    TCLLIBEXT=".`echo $tcllibname | $AWK '{j=split($1, i, "."); k=i[[j]]; print k}'`"    TCLLIBEXT=".`echo $tcllibname | $AWK '{j=split($1, i, "."); k=i[[j]]; print k}'`"
440    TCLLIBFN=`$BASENAME $tcllibname $TCLLIBEXT | cut -c4-`    TCLLIBFN=`$BASENAME $tcllibname $TCLLIBEXT | cut -c4-`
   echo "Using Tcl library: $TCLLIB/lib$TCLLIBFN$TCLLIBEXT"  
441  else  else
442        cat << 'EOF' >&2
443    configure: warning:
444    
445      The filename given to option --with-tcllib is not valid.
446      configure will now attempt to autodetect both the Tcl library and header...
447    
448    EOF
449        tclincname=""
450      fi
451    fi
452    
453    # look for $TCLINCFN: if $tclincname is set, check there first
454    if test ! "x${tclincname}" = "x"
455    then
456      if test -f "$tclincname" && test -r "$tclincname"
457      then
458        TCLINC=`$DIRNAME $tclincname`
459        TCLINCFN=`$BASENAME $tclincname`
460      else
461        cat << 'EOF' >&2
462    configure: warning:
463    
464    # look for libtcl: if TCLLIB is set, check there first    The filename given to option --with-tclinc is not valid.
465      configure will now attempt to autodetect both the Tcl library and header...
466    
467    EOF
468        TCLLIB=""
469        TCLLIBFN=""
470      fi
471    fi
472    
473    # look for $TCLLIBFN: if $TCLLIB is set, check there first
474    if test ! "x${TCLLIB}" = "x"    if test ! "x${TCLLIB}" = "x"
475    then    then
476      for tcllibfn in $tclnames    if test -d "${TCLLIB}"
477      then
478        for tcllibfn in $tcllibnames
479      do      do
480        for tcllibext in $tcllibextensions        for tcllibext in $tcllibextensions
481        do        do
482      if test -r "$TCLLIB/lib$tcllibfn$tcllibext"      if test -r "$TCLLIB/lib$tcllibfn$tcllibext"
483      then      then
       if test "x${TCLLIBFN}" = "x"  
       then  
484          TCLLIBFN=$tcllibfn          TCLLIBFN=$tcllibfn
485          TCLLIBEXT=$tcllibext          TCLLIBEXT=$tcllibext
486          break 2          break 2
487        fi        fi
     fi  
488        done        done
489      done      done
490      fi
491      if test "x${TCLLIBFN}" = "x"      if test "x${TCLLIBFN}" = "x"
492      then      then
493        echo "" >&2      cat << 'EOF' >&2
494        echo "Environment variable TCLLIB was set, but incorrect." >&2  configure: warning:
495        echo "Please set both TCLLIB and TCLINC correctly if you wish to use them." >&2  
496        echo "configure will now attempt to autodetect both libtcl and tcl.h..." >&2    Environment variable TCLLIB was set, but incorrect.
497        echo "" >&2    Please set both TCLLIB and TCLINC correctly if you wish to use them.
498        unset TCLLIB    configure will now attempt to autodetect both the Tcl library and header...
499        unset TCLINC  
500    EOF
501        TCLLIB=""
502        TCLLIBFN=""
503        TCLINC=""
504        TCLINCFN=""
505      fi      fi
506    fi    fi
507    
508    # check in common places now  # look for $TCLINCFN: if $TCLINC is set, check there first
509    AC_MSG_CHECKING(for libtcl)  if test ! "x${TCLINC}" = "x"
510    if test ! "x${TCLLIB}" = "x"  then
511      if test -d "${TCLINC}"
512      then
513        for tclheaderfn in $tclheadernames
514        do
515          if test -r "$TCLINC/$tclheaderfn"
516          then
517        TCLINCFN=$tclheaderfn
518          fi
519        done
520      fi
521      if test "x${TCLINCFN}" = "x"
522    then    then
523      AC_MSG_RESULT(found in $TCLLIB/lib$TCLLIBFN$TCLLIBEXT)      cat << 'EOF' >&2
524    configure: warning:
525    
526      Environment variable TCLINC was set, but incorrect.
527      Please set both TCLLIB and TCLINC correctly if you wish to use them.
528      configure will now attempt to autodetect both the Tcl library and header...
529    
530    EOF
531        TCLLIB=""
532        TCLLIBFN=""
533        TCLINC=""
534        TCLINCFN=""
535      fi
536    fi
537    
538    AC_MSG_CHECKING(for Tcl library)
539    
540    # attempt autodetect for $TCLLIBFN if not set
541    if test ! "x${TCLLIBFN}" = "x"
542    then
543      AC_MSG_RESULT(using $TCLLIB/lib$TCLLIBFN$TCLLIBEXT)
544    else    else
545      for tcllibfn in $tclnames    for tcllibfn in $tcllibnames
546      do      do
547        for tcllibext in $tcllibextensions        for tcllibext in $tcllibextensions
548        do        do
# Line 407  else Line 550  else
550      do      do
551        if test -r "$tcllibpath/lib$tcllibfn$tcllibext"        if test -r "$tcllibpath/lib$tcllibfn$tcllibext"
552        then        then
553          if test "x${TCLLIB}" = "x"        AC_MSG_RESULT(found $tcllibpath/lib$tcllibfn$tcllibext)
         then  
           AC_MSG_RESULT(found in $tcllibpath/lib$tcllibfn$tcllibext)  
554            TCLLIB=$tcllibpath            TCLLIB=$tcllibpath
555            TCLLIBFN=$tcllibfn            TCLLIBFN=$tcllibfn
556            TCLLIBEXT=$tcllibext            TCLLIBEXT=$tcllibext
557            break 3            break 3
558          fi          fi
       fi  
559      done      done
560        done        done
561      done      done
562    fi    fi
563    
564  fi # test tcllibname  # show if $TCLLIBFN wasn't found
565    if test "x${TCLLIBFN}" = "x"
 # give up if they don't even have that  
 if test "x${TCLLIB}" = "x"  
566  then  then
567    AC_MSG_RESULT(not found)    AC_MSG_RESULT(not found)
568  fi  fi
569    
570  # now look for pesky $TCLINCFN file  AC_MSG_CHECKING(for Tcl header)
 if test -r "$tclincname"  
 then  
   TCLINC=`$DIRNAME $tclincname`  
   TCLINCFN=`$BASENAME $tclincname`  
   echo "Using Tcl header: $TCLINC/$TCLINCFN"  
 else  
   
   TCLINCFN=tcl.h  
571    
572    if test ! "x${TCLINC}" = "x"  # attempt autodetect for $TCLINCFN if not set
573    then  if test ! "x${TCLINCFN}" = "x"
     if test ! -r "$TCLINC/$TCLINCFN"  
574      then      then
575        echo "" >&2    AC_MSG_RESULT(using $TCLINC/$TCLINCFN)
       echo "Environment variable TCLINC was set, but incorrect." >&2  
       echo "Please set both TCLLIB and TCLINC correctly if you wish to use them." >&2  
       echo "configure cannot safely continue now..." >&2  
       echo "" >&2  
       exit 1  
     fi  
   fi  
   
   # check in common places now  
   AC_MSG_CHECKING(for $TCLINCFN)  
   if test ! "x${TCLINC}" = "x"  
   then  
     AC_MSG_RESULT(found in $TCLINC/$TCLINCFN)  
576    else    else
577      for headerpath in $tclheaderpaths      for headerpath in $tclheaderpaths
578      do      do
579        if test -r "$headerpath/$TCLINCFN"      for tclheaderfn in $tclheadernames
580        then      do
581      if test "x${TCLINC}" = "x"        if test -r "$headerpath/$tclheaderfn"
582      then      then
583        AC_MSG_RESULT(found in $headerpath/$TCLINCFN)      AC_MSG_RESULT(found $headerpath/$tclheaderfn)
584        TCLINC=$headerpath        TCLINC=$headerpath
585        break      TCLINCFN=$tclheaderfn
586      fi      break 2
587        fi        fi
588      done      done
589      if test "x${TCLINC}" = "x"    done
590      # FreeBSD hack ...
591      if test "x${TCLINCFN}" = "x"
592      then      then
593        for tcllibfn in $tclnames      for tclversion in $tclversions
594        do        do
595      for headerpath in $tclheaderpaths      for headerpath in $tclheaderpaths
596      do      do
597        if test -r "$headerpath/$tcllibfn/$TCLINCFN"      for tclheaderfn in $tclheadernames
598        do
599          if test -r "$headerpath/tcl$tclversion/$tclheaderfn"
600        then        then
601          AC_MSG_RESULT(found in $headerpath/$TCLINCFN)          AC_MSG_RESULT(found $headerpath/tcl$tclversion/$tclheaderfn)
602          TCLINC=$headerpath/$tcllibfn          TCLINC=$headerpath/tcl$tclversion
603          break 2          TCLINCFN=$tclheaderfn
604            break 3
605        fi        fi
606      done      done
607        done        done
608        done
609      fi      fi
610    fi    fi
611    
612    # had TCLLIB but not TCLINC?  so close... :(  # show if $TCLINCFN wasn't found
613    if test "x${TCLINC}" = "x"  if test "x${TCLINCFN}" = "x"
614    then    then
615      AC_MSG_RESULT(not found)      AC_MSG_RESULT(not found)
616      unset TCLLIB  fi
617      unset TCLLIBFN  
618      unset TCLLIBEXT  # done looking, now either TCLLIBFN & TCLINCFN are both set, or we bail
619    fi  if test "x${TCLLIBFN}" = "x" || test "x${TCLINCFN}" = "x"
620    then
621  fi # test tclincname    cat << 'EOF' >&2
622    configure: error:
623  # done looking, now either TCLLIB & TCLINC are both set, or neither is set  
624  if test "x${TCLLIB}" = "x"    I can't find Tcl on this system.
625  then  
626    echo "" >&2    Eggdrop now requires Tcl to compile.  If you already have Tcl
627    echo "I can't find Tcl on this system." >&2    installed on this system, and I just wasn't looking in the right
628    echo "" >&2    place for it, set the environment variables TCLLIB and TCLINC so
629    echo "Eggdrop now requires Tcl to compile.  If you already have Tcl" >&2    I will know where to find 'libtcl.a' (or 'libtcl.so') and 'tcl.h'
630    echo "installed on this system, and I just wasn't looking in the right" >&2    (respectively).  Then run 'configure' again.
631    echo "place for it, set the environment variables TCLLIB and TCLINC so" >&2  
632    echo "I will know where to find 'libtcl.a' (or 'libtcl.so') and 'tcl.h'" >&2    Read the README file if you don't know what Tcl is or how to get
633    echo "(respectively).  Then run 'configure' again." >&2    it and install it.
634    echo "" >&2  
635    echo "Read the README file if you don't know what Tcl is or how to get" >&2  EOF
   echo "it and install it." >&2  
   echo "" >&2  
636    exit 1    exit 1
637  else  else
638    
639    AC_MSG_CHECKING(for Tcl version)    AC_MSG_CHECKING(for Tcl version)
640    
641    for ver in $tclnames    for ver in $tclversions
642    do    do
     ver=`echo $ver | cut -c4-`  
     if test ! "x${ver}" = "x"  
     then  
643        TCLFOUND=`grep TCL_VERSION $TCLINC/$TCLINCFN | grep $ver | wc -l`        TCLFOUND=`grep TCL_VERSION $TCLINC/$TCLINCFN | grep $ver | wc -l`
644        if test ! $TCLFOUND = 0        if test ! $TCLFOUND = 0
645        then        then
646          TCLVER=$ver          TCLVER=$ver
647          break          break
648        fi        fi
     fi  
649    done    done
650    
651    if test ! "x${TCLVER}" = "x"    if test ! "x${TCLVER}" = "x"
# Line 544  else Line 660  else
660      TCL_REQS="$TCLLIB/lib$TCLLIBFN$TCLLIBEXT"      TCL_REQS="$TCLLIB/lib$TCLLIBFN$TCLLIBEXT"
661      TCL_LIBS="-L$TCLLIB -l$TCLLIBFN -lm"      TCL_LIBS="-L$TCLLIB -l$TCLLIBFN -lm"
662    else    else
663      echo "" >&2      cat << 'EOF' >&2
664      echo "Your Tcl version is much too old for eggdrop to use." >&2  configure: error:
665      echo "I suggest you download and complie a more recent version." >&2  
666      echo "The most reliable current version is 8.2.1" >&2    Your Tcl version is much too old for eggdrop to use.
667      echo "" >&2    I suggest you download and complie a more recent version.
668      The most reliable current version is 8.2.1
669    
670    EOF
671      exit 1      exit 1
672    fi    fi
673    
674    if test "x${TCLLIBEXT}" = "x.a"    if test "x${TCLLIBEXT}" = "x.a"
675    then    then
676      echo "" >&2      cat << 'EOF' >&2
677      echo "Your libtcl is not a shared library." >&2  configure: warning:
678      echo "configure will set default make type to static..." >&2  
679      echo "" >&2    Your libtcl is not a shared library.
680      configure will set default make type to static...
681    
682    EOF
683      DEFAULT_MAKE=static      DEFAULT_MAKE=static
684    fi    fi
685    
# Line 575  if test $need_dl = 1 && test "x${ac_cv_f Line 697  if test $need_dl = 1 && test "x${ac_cv_f
697  then  then
698    if test "$LINUX" = "yes"    if test "$LINUX" = "yes"
699    then    then
700      echo "Since you are on a Linux system, this has a known problem," >&2      cat << 'EOF' >&2
701    configure: warning:
702    
703      Since you are on a Linux system, this has a known problem,
704      I know a kludge for it,
705    EOF
706    
707      if test -r "/lib/libdl.so.1"      if test -r "/lib/libdl.so.1"
708      then      then
709        echo "and you seem to have it, I know a kludge for it," >&2        cat << 'EOF' >&2
710        echo "so we'll do that..." >&2    and you seem to have it, so we'll do that...
711        echo "" >&2  
712    EOF
713        AC_DEFINE(HAVE_DLOPEN)        AC_DEFINE(HAVE_DLOPEN)
714        LIBS="/lib/libdl.so.1 $LIBS"        LIBS="/lib/libdl.so.1 $LIBS"
       got_dl=1  
715      else      else
716        echo "which you DONT seem to have... doh!" >&2        cat << 'EOF' >&2
717        echo "perhaps you may still have the stuff lying around somewhere" >&2    which you DONT seem to have... doh!
718        echo "if you work out where it is, add it to your XLIBS= lines" >&2    perhaps you may still have the stuff lying around somewhere
719        echo "and #define HAVE_DLOPEN in config.h" >&2    if you work out where it is, add it to your XLIBS= lines
720        echo "" >&2    and #define HAVE_DLOPEN in config.h
721        echo "we'll proceed on anyway, but you probably won't be able" >&2  
722        echo "to 'make eggdrop' but you might be able to make the" >&2    we'll proceed on anyway, but you probably won't be able
723        echo "static bot (I'll default your make to this version)." >&2    to 'make eggdrop' but you might be able to make the
724      static bot (I'll default your make to this version).
725    
726    EOF
727        DEFAULT_MAKE=static        DEFAULT_MAKE=static
728      fi      fi
729    else    else
730      echo "You don't seem to have libdl anywhere I can find it, this will" >&2      cat << 'EOF' >&2
731      echo "prevent you from doing dynamic modules, I'll set your default" >&2  configure: warning:
732      echo "make to static linking." >&2  
733      You don't seem to have libdl anywhere I can find it, this will
734      prevent you from doing dynamic modules, I'll set your default
735      make to static linking.
736    
737    EOF
738      DEFAULT_MAKE=static      DEFAULT_MAKE=static
739    fi    fi
740  fi  fi
# Line 630  AC_SUBST(DLFLAGS) Line 766  AC_SUBST(DLFLAGS)
766  AC_SUBST(DEFAULT_MAKE)  AC_SUBST(DEFAULT_MAKE)
767  AC_OUTPUT(Makefile lush.h)  AC_OUTPUT(Makefile lush.h)
768    
769  echo ""  AC_MSG_RESULT()
770  echo "Configure is done."  AC_MSG_RESULT(Configure is done.)
771  echo ""  AC_MSG_RESULT()
772  if test -f "./eggdrop"  if test -f "./eggdrop"
773  then  then
774    echo "Type 'make clean' and then 'make' to create the bot."    AC_MSG_RESULT(Type 'make clean' and then 'make' to create the bot.)
775  else  else
776    echo "Type 'make' to create the bot."    AC_MSG_RESULT(Type 'make' to create the bot.)
777  fi  fi
778  echo ""  AC_MSG_RESULT()

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

webmaster@eggheads.org
ViewVC Help
Powered by ViewVC 1.1.23