diff options
| author | bwarsaw | 1998-05-27 16:17:21 +0000 |
|---|---|---|
| committer | bwarsaw | 1998-05-27 16:17:21 +0000 |
| commit | a73d85296528edd64fabce9af6cc47c23bb9c3de (patch) | |
| tree | 20a5a587ebc6456290fabc102bdbcecc704ecf65 | |
| parent | 1c18d2c24d1861e544d9915aa88b29a6487a8120 (diff) | |
| download | mailman-a73d85296528edd64fabce9af6cc47c23bb9c3de.tar.gz mailman-a73d85296528edd64fabce9af6cc47c23bb9c3de.tar.zst mailman-a73d85296528edd64fabce9af6cc47c23bb9c3de.zip | |
The usual
| -rwxr-xr-x | configure | 111 |
1 files changed, 81 insertions, 30 deletions
@@ -1,6 +1,6 @@ #! /bin/sh -# From configure.in Revision: 1.1 +# From configure.in Revision: 1.2 # Guess values for system-dependent variables and create Makefiles. # Generated automatically using autoconf version 2.12 @@ -1173,11 +1173,58 @@ echo "$ac_t""$MAIL_GID" 1>&6 rm -f conftest.out conftest.py +# figure out the DEFAULT_HOST_NAME and DEFAULT_URL + + + +cat > conftest.py <<EOF +# attempt to figure out the default hostname and URL +from socket import * +import string +fqdn = None +www = None +host, aliases, ipaddrs = gethostbyaddr(gethostbyname(gethostname())) +aliases.insert(0, host) +for h in aliases: + parts = string.split(h, '.') + if 5 > 1: + if parts[0] == 'www': + www = h + elif not fqdn: + fqdn = h +fp = open('conftest.out', 'w') +if not www and fqdn: + fp.write('%s\n%s\n' % (fqdn, fqdn)) +elif www: + dhn = string.join(string.split(www, '.')[1:], '.') + fp.write('%s\n%s\n' % (dhn, www)) +else: + fp.write('please.change.me\nwww.please.change.me\n') +fp.close() +EOF +python conftest.py + +echo $ac_n "checking for default fully qualified host name""... $ac_c" 1>&6 +echo "configure:1209: checking for default fully qualified host name" >&5 +if test -z "$FQDN" +then + FQDN=`head -1 conftest.out` +fi +echo "$ac_t""$FQDN" 1>&6 +echo $ac_n "checking for default URL host component""... $ac_c" 1>&6 +echo "configure:1216: checking for default URL host component" >&5 +if test -z "$URL" +then + URL=`tail -1 conftest.out` +fi +echo "$ac_t""$URL" 1>&6 +rm -f conftest.out conftest.py + # Checks for libraries. # Checks for header files. echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1181: checking how to run the C preprocessor" >&5 +echo "configure:1228: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1192,13 +1239,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext <<EOF -#line 1196 "configure" +#line 1243 "configure" #include "confdefs.h" #include <assert.h> Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1202: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1249: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -1209,13 +1256,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext <<EOF -#line 1213 "configure" +#line 1260 "configure" #include "confdefs.h" #include <assert.h> Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1219: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1266: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -1238,12 +1285,12 @@ fi echo "$ac_t""$CPP" 1>&6 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:1242: checking for ANSI C header files" >&5 +echo "configure:1289: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1247 "configure" +#line 1294 "configure" #include "confdefs.h" #include <stdlib.h> #include <stdarg.h> @@ -1251,7 +1298,7 @@ else #include <float.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1255: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1302: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1268,7 +1315,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext <<EOF -#line 1272 "configure" +#line 1319 "configure" #include "confdefs.h" #include <string.h> EOF @@ -1286,7 +1333,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext <<EOF -#line 1290 "configure" +#line 1337 "configure" #include "confdefs.h" #include <stdlib.h> EOF @@ -1307,7 +1354,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext <<EOF -#line 1311 "configure" +#line 1358 "configure" #include "confdefs.h" #include <ctype.h> #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -1318,7 +1365,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:1322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then : else @@ -1345,17 +1392,17 @@ for ac_hdr in syslog.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1349: checking for $ac_hdr" >&5 +echo "configure:1396: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1354 "configure" +#line 1401 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1359: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1406: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1384,12 +1431,12 @@ done # Checks for typedefs, structures, and compiler characteristics. echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:1388: checking for uid_t in sys/types.h" >&5 +echo "configure:1435: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1393 "configure" +#line 1440 "configure" #include "confdefs.h" #include <sys/types.h> EOF @@ -1418,7 +1465,7 @@ EOF fi echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6 -echo "configure:1422: checking type of array argument to getgroups" >&5 +echo "configure:1469: checking type of array argument to getgroups" >&5 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1426,7 +1473,7 @@ else ac_cv_type_getgroups=cross else cat > conftest.$ac_ext <<EOF -#line 1430 "configure" +#line 1477 "configure" #include "confdefs.h" /* Thanks to Mike Rendell for this test. */ @@ -1451,7 +1498,7 @@ main() } EOF -if { (eval echo configure:1455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_type_getgroups=gid_t else @@ -1465,7 +1512,7 @@ fi if test $ac_cv_type_getgroups = cross; then cat > conftest.$ac_ext <<EOF -#line 1469 "configure" +#line 1516 "configure" #include "confdefs.h" #include <unistd.h> EOF @@ -1491,12 +1538,12 @@ EOF # Checks for library functions. echo $ac_n "checking for vprintf""... $ac_c" 1>&6 -echo "configure:1495: checking for vprintf" >&5 +echo "configure:1542: checking for vprintf" >&5 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1500 "configure" +#line 1547 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char vprintf(); below. */ @@ -1519,7 +1566,7 @@ vprintf(); ; return 0; } EOF -if { (eval echo configure:1523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else @@ -1543,12 +1590,12 @@ fi if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:1547: checking for _doprnt" >&5 +echo "configure:1594: checking for _doprnt" >&5 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1552 "configure" +#line 1599 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char _doprnt(); below. */ @@ -1571,7 +1618,7 @@ _doprnt(); ; return 0; } EOF -if { (eval echo configure:1575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else @@ -1712,7 +1759,8 @@ ac_given_INSTALL="$INSTALL" trap 'rm -fr `echo "misc/paths.py modules/mm_defaults.py src/Makefile misc/Makefile bin/Makefile modules/Makefile mail/Makefile templates/Makefile cgi/Makefile cron/Makefile - filters/Makefile scripts/Makefile Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 + filters/Makefile scripts/Makefile modules/mm_cfg.py + Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 EOF cat >> $CONFIG_STATUS <<EOF @@ -1756,6 +1804,8 @@ s%@ALIAS_UID@%$ALIAS_UID%g s%@ALIAS_GID@%$ALIAS_GID%g s%@MAIL_UID@%$MAIL_UID%g s%@MAIL_GID@%$MAIL_GID%g +s%@FQDN@%$FQDN%g +s%@URL@%$URL%g s%@CPP@%$CPP%g CEOF @@ -1801,7 +1851,8 @@ cat >> $CONFIG_STATUS <<EOF CONFIG_FILES=\${CONFIG_FILES-"misc/paths.py modules/mm_defaults.py src/Makefile misc/Makefile bin/Makefile modules/Makefile mail/Makefile templates/Makefile cgi/Makefile cron/Makefile - filters/Makefile scripts/Makefile Makefile"} + filters/Makefile scripts/Makefile modules/mm_cfg.py + Makefile"} EOF cat >> $CONFIG_STATUS <<\EOF for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then |
