* Applied a patch sent in by Wilfried Goesgens which allows the various
authorArt Cancro <ajc@citadel.org>
Tue, 26 Jul 2005 02:49:30 +0000 (02:49 +0000)
committerArt Cancro <ajc@citadel.org>
Tue, 26 Jul 2005 02:49:30 +0000 (02:49 +0000)
  program and data directories to be set to any location on the host
  system.  This will allow packagers to do FSSTND-type configurations.

25 files changed:
citadel/ChangeLog
citadel/acconfig.h
citadel/aidepost.c
citadel/citadel.c
citadel/citadel_ipc.c
citadel/citmail.c
citadel/citserver.c
citadel/commands.c
citadel/config.c
citadel/config.guess
citadel/config.sub
citadel/configure.ac
citadel/control.c
citadel/database_sleepycat.c
citadel/docs/citadel.html
citadel/file_ops.c
citadel/msgbase.c
citadel/room_ops.c
citadel/sendcommand.c
citadel/serv_crypto.c
citadel/serv_network.c
citadel/serv_smtp.c
citadel/server_main.c
citadel/setup.c
citadel/user_ops.c

index f1791ce39baeda90cc796c69513d46245f5eff47..9e46404244581aab4e5417e555c84b3c7809c22c 100644 (file)
@@ -1,4 +1,9 @@
 $Log$
 $Log$
+Revision 653.9  2005/07/26 02:49:25  ajc
+* Applied a patch sent in by Wilfried Goesgens which allows the various
+  program and data directories to be set to any location on the host
+  system.  This will allow packagers to do FSSTND-type configurations.
+
 Revision 653.8  2005/07/25 17:37:36  ajc
 * citadel_ipc.c: when performing a MSG4 command, don't return the
   charset as part of the content-type string.
 Revision 653.8  2005/07/25 17:37:36  ajc
 * citadel_ipc.c: when performing a MSG4 command, don't return the
   charset as part of the content-type string.
@@ -6950,4 +6955,3 @@ Sat Jul 11 00:20:48 EDT 1998 Nathan Bryant <bryant@cs.usm.maine.edu>
 
 Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
        * Initial CVS import
 
 Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
        * Initial CVS import
-
index c73bc1946a3c7e703bf7fce68bd90318b6352e4f..2bb230c4ad6ddf30f0deca6e01f3cca3f698dfb7 100644 (file)
 
 /* define this if you have the resolv.h header file. */
 #undef HAVE_RESOLV_H
 
 /* define this if you have the resolv.h header file. */
 #undef HAVE_RESOLV_H
+
+/* define, if the user suplied a data-directory to use. */
+#undef HAVE_DATA_DIR
+#undef DATA_DIR
+
+/* define, if the user suplied a spool-directory to use. */
+#undef HAVE_SPOOL_DIR
+#undef SPOOL_DIR
+
+/* define, where the config should go in unix style */
+#undef HAVE_ETC_DIR
+#undef ETC_DIR
+
+/* define, where the config should go in unix style */
+#undef HAVE_RUN_DIR
+#undef RUN_DIR
+
+
+#undef EGD_POOL 
index 3591ff8962fbd33c107050afafbbf27fc96f2c28..1bc26dcd4b7790e7ba8280216d75895070043b5c 100644 (file)
@@ -98,7 +98,12 @@ int main(int argc, char **argv)
        }
 
        snprintf(tempspool, sizeof tempspool,
        }
 
        snprintf(tempspool, sizeof tempspool,
-               "./network/spoolin/ap.%04lx",
+#ifndef HAVE_SPOOL_DIR
+                        CTDLDIR
+#else
+                        SPOOL_DIR
+#endif
+                        "/network/spoolin/ap.%04lx",
                (long)getpid());
 
        unlink(tempspool);
                (long)getpid());
 
        unlink(tempspool);
index 021872e546b395245fcad604b1af439f5160e636..2105364a2b98afda41b8c081a58b78b84210ba21 100644 (file)
@@ -1122,7 +1122,13 @@ int main(int argc, char **argv)
                         * guaranteed to have the uid/gid we want.
                         */
                        if (!getuid() || !getgid()) {
                         * guaranteed to have the uid/gid we want.
                         */
                        if (!getuid() || !getgid()) {
-                               if (stat(CTDLDIR "/citadel.config", &st) < 0) {
+                               if (stat(
+#ifndef HAVE_ETC_DIR
+                                                CTDLDIR 
+#else
+                                                ETC_DIR
+#endif
+                                                "/citadel.config", &st) < 0) {
                                        perror("couldn't stat citadel.config");
                                        logoff(NULL, 3);
                                }
                                        perror("couldn't stat citadel.config");
                                        logoff(NULL, 3);
                                }
index a9114889e1b972ff4036e971ee3427b59ce7d608..e519e870798ad77911d4efa9daf2394f0eda8944 100644 (file)
@@ -1931,8 +1931,8 @@ int CtdlIPCStartEncryption(CtdlIPC *ipc, char *cret)
        SSL_set_session_id_context(temp_ssl, "Citadel SID", 14);
 #endif
 
        SSL_set_session_id_context(temp_ssl, "Citadel SID", 14);
 #endif
 
-       if (!access("/var/run/egd-pool", F_OK))
-               RAND_egd("/var/run/egd-pool");
+       if (!access(EGD_POOL, F_OK))
+               RAND_egd(EGD_POOL);
 
        if (!RAND_status()) {
                error_printf("PRNG not properly seeded\n");
 
        if (!RAND_status()) {
                error_printf("PRNG not properly seeded\n");
@@ -2941,11 +2941,22 @@ CtdlIPC* CtdlIPC_new(int argc, char **argv, char *hostbuf, char *portbuf)
        if (!strcmp(cithost, UDS)) {
                if (!strcasecmp(citport, DEFAULT_PORT)) {
                        snprintf(sockpath, sizeof sockpath, "%s%s",
        if (!strcmp(cithost, UDS)) {
                if (!strcasecmp(citport, DEFAULT_PORT)) {
                        snprintf(sockpath, sizeof sockpath, "%s%s",
-                               CTDLDIR, "/citadel.socket");
+#ifndef HAVE_RUN_DIR
+                                        CTDLDIR
+#else
+                                        RUN_DIR
+#endif
+                                        , "/citadel.socket");
                }
                else {
                        snprintf(sockpath, sizeof sockpath, "%s%s",
                }
                else {
                        snprintf(sockpath, sizeof sockpath, "%s%s",
-                               citport, "/citadel.socket");
+                               citport, 
+#ifndef HAVE_RUN_DIR
+                                        CTDLDIR
+#else
+                                        RUN_DIR
+#endif
+                                        "/citadel.socket");
                }
                ipc->sock = uds_connectsock(&(ipc->isLocal), sockpath);
                if (ipc->sock == -1) {
                }
                ipc->sock = uds_connectsock(&(ipc->isLocal), sockpath);
                if (ipc->sock == -1) {
index 50704818d68e40b8bef2247b9c5cd9ae8d7d1601..69af5958f036a5b79aba20bd4bd608b43f84fa09 100644 (file)
@@ -203,7 +203,13 @@ int main(int argc, char **argv) {
        }
        strip_trailing_nonprint(fromline);
 
        }
        strip_trailing_nonprint(fromline);
 
-       serv_sock = uds_connectsock("lmtp.socket");
+       serv_sock = uds_connectsock(
+#ifndef HAVE_RUN_DIR
+                                                  "."
+#else
+                                                  RUN_DIR
+#endif
+                                                  "/lmtp.socket");
        serv_gets(buf);
        if (buf[0]!='2') cleanup(1);
 
        serv_gets(buf);
        if (buf[0]!='2') cleanup(1);
 
index b076e274b19918089430a8ff2e0e7b158f838c7e..2a19df2a856c0199942a3f31076cb69467c54020 100644 (file)
@@ -288,7 +288,11 @@ int is_public_client(void)
        static time_t pc_timestamp = 0;
        static char public_clients[SIZ];
 
        static time_t pc_timestamp = 0;
        static char public_clients[SIZ];
 
+#ifndef HAVE_ETC
 #define PUBLIC_CLIENTS "./public_clients"
 #define PUBLIC_CLIENTS "./public_clients"
+#else
+#define PUBLIC_CLIENTS ETC_DIR"/public_clients"
+#endif
 
        /*
         * Check the time stamp on the public_clients file.  If it's been
 
        /*
         * Check the time stamp on the public_clients file.  If it's been
@@ -312,7 +316,13 @@ int is_public_client(void)
                        strcat(public_clients, addrbuf);
                }
 
                        strcat(public_clients, addrbuf);
                }
 
-               fp = fopen("public_clients", "r");
+               fp = fopen(
+#ifndef HAVE_ETC
+                                  "."
+#else
+                                  ETC_DIR
+#endif
+                                  "/public_clients", "r");
                if (fp != NULL) while (fgets(buf, sizeof buf, fp)!=NULL) {
                        for (i=0; i<strlen(buf); ++i) {
                                if (buf[i] == '#') buf[i] = 0;
                if (fp != NULL) while (fgets(buf, sizeof buf, fp)!=NULL) {
                        for (i=0; i<strlen(buf); ++i) {
                                if (buf[i] == '#') buf[i] = 0;
@@ -424,8 +434,16 @@ void cmd_mesg(char *mname)
 
        extract_token(buf, mname, 0, '|', sizeof buf);
 
 
        extract_token(buf, mname, 0, '|', sizeof buf);
 
-       dirs[0] = strdup("messages");
-       dirs[1] = strdup("help");
+       dirs[0] = strdup(
+#ifdef HAVE_DATA_DIR
+                                        DATA_DIR"/"
+#endif
+                                        "messages");
+       dirs[1] = strdup(
+#ifdef HAVE_DATA_DIR
+                                        DATA_DIR"/"
+#endif
+                                        "help");
        snprintf(buf2, sizeof buf2, "%s.%d.%d", buf, CC->cs_clientdev, CC->cs_clienttyp);
        mesg_locate(targ, sizeof targ, buf2, 2, (const char **)dirs);
        if (strlen(targ) == 0) {
        snprintf(buf2, sizeof buf2, "%s.%d.%d", buf, CC->cs_clientdev, CC->cs_clienttyp);
        mesg_locate(targ, sizeof targ, buf2, 2, (const char **)dirs);
        if (strlen(targ) == 0) {
@@ -482,14 +500,28 @@ void cmd_emsg(char *mname)
                if (buf[a] == '/') buf[a] = '.';
        }
 
                if (buf[a] == '/') buf[a] = '.';
        }
 
-       dirs[0] = strdup("messages");
-       dirs[1] = strdup("help");
+       dirs[0] = strdup(
+#ifdef HAVE_DATA_DIR
+                                        DATA_DIR"/"
+#endif
+                                        "messages");
+       dirs[1] = strdup(
+#ifdef HAVE_DATA_DIR
+                                        DATA_DIR"/"
+#endif
+                                        "help");
        mesg_locate(targ, sizeof targ, buf, 2, (const char**)dirs);
        free(dirs[0]);
        free(dirs[1]);
 
        if (strlen(targ)==0) {
        mesg_locate(targ, sizeof targ, buf, 2, (const char**)dirs);
        free(dirs[0]);
        free(dirs[1]);
 
        if (strlen(targ)==0) {
-               snprintf(targ, sizeof targ, "./help/%s", buf);
+               snprintf(targ, sizeof targ, 
+#ifndef HAVE_DATA_DIR
+                        "." /* FIXME: should here be CTDLDIR ? */
+#else
+                        DATA_DIR
+#endif
+                                "/help/%s", buf);
        }
 
        mfp = fopen(targ,"w");
        }
 
        mfp = fopen(targ,"w");
index 8e0a44c31b79746c30b38d33245f64b4645a66f8..4fd1d39508b53282f272cfbf766a9c008e4e1cc0 100644 (file)
@@ -768,7 +768,13 @@ void load_command_set(void)
                ccfile = fopen(buf, "r");
        }
        if (ccfile == NULL) {
                ccfile = fopen(buf, "r");
        }
        if (ccfile == NULL) {
-               snprintf(buf, sizeof buf, "%s/citadel.rc", CTDLDIR);
+               snprintf(buf, sizeof buf, 
+#ifndef HAVE_ETC_DIR
+                                CTDLDIR
+#else
+                                ETC_DIR
+#endif
+                                "/citadel.rc");
                ccfile = fopen(buf, "r");
        }
        if (ccfile == NULL) {
                ccfile = fopen(buf, "r");
        }
        if (ccfile == NULL) {
index 8562f3472f213f4e4ddbe2113d227464c38a60e0..996118816cbe14086861d8365a051465fc4ae085 100644 (file)
@@ -45,7 +45,13 @@ void get_config(void) {
                        strerror(errno));
                exit(1);
        }
                        strerror(errno));
                exit(1);
        }
-       cfp = fopen("citadel.config", "rb");
+       cfp = fopen(
+#ifndef HAVE_ETC_DIR
+                               "."
+#else
+                               ETC_DIR
+#endif
+                               "/citadel.config", "rb");
        if (cfp == NULL) {
                fprintf(stderr, "This program could not be started.\n"
                        "Unable to open %s/citadel.config\n"
        if (cfp == NULL) {
                fprintf(stderr, "This program could not be started.\n"
                        "Unable to open %s/citadel.config\n"
@@ -116,7 +122,13 @@ void put_config(void)
 {
        FILE *cfp;
 
 {
        FILE *cfp;
 
-       if ((cfp = fopen("citadel.config", "rb+")) == NULL)
+       if ((cfp = fopen(
+#ifndef HAVE_ETC_DIR
+                                        "."
+#else
+                                        ETC_DIR
+#endif
+                                        "/citadel.config", "rb+")) == NULL)
                perror("citadel.config");
        else {
                fwrite((char *) &config, sizeof(struct config), 1, cfp);
                perror("citadel.config");
        else {
                fwrite((char *) &config, sizeof(struct config), 1, cfp);
index 4fc21ecc3aa7606ce71a99fdd93754826e14b11c..45bee139873061344c27d4e7ca547ca8930374e7 100755 (executable)
@@ -1,9 +1,9 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
 #! /bin/sh
 # Attempt to guess a canonical system name.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+#   2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
 
 
-timestamp='2003-01-30'
+timestamp='2005-04-22'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -53,7 +53,7 @@ version="\
 GNU config.guess ($timestamp)
 
 Originally written by Per Bothner.
 GNU config.guess ($timestamp)
 
 Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
@@ -106,6 +106,7 @@ trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
 : ${TMPDIR=/tmp} ;
  { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
  { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
 : ${TMPDIR=/tmp} ;
  { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
  { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
  { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
 dummy=$tmp/dummy ;
 tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
  { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
 dummy=$tmp/dummy ;
 tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
@@ -196,15 +197,21 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
        # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
        echo "${machine}-${os}${release}"
        exit 0 ;;
        # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
        echo "${machine}-${os}${release}"
        exit 0 ;;
+    amd64:OpenBSD:*:*)
+       echo x86_64-unknown-openbsd${UNAME_RELEASE}
+       exit 0 ;;
     amiga:OpenBSD:*:*)
        echo m68k-unknown-openbsd${UNAME_RELEASE}
        exit 0 ;;
     amiga:OpenBSD:*:*)
        echo m68k-unknown-openbsd${UNAME_RELEASE}
        exit 0 ;;
-    arc:OpenBSD:*:*)
-       echo mipsel-unknown-openbsd${UNAME_RELEASE}
+    cats:OpenBSD:*:*)
+       echo arm-unknown-openbsd${UNAME_RELEASE}
        exit 0 ;;
     hp300:OpenBSD:*:*)
        echo m68k-unknown-openbsd${UNAME_RELEASE}
        exit 0 ;;
        exit 0 ;;
     hp300:OpenBSD:*:*)
        echo m68k-unknown-openbsd${UNAME_RELEASE}
        exit 0 ;;
+    luna88k:OpenBSD:*:*)
+       echo m88k-unknown-openbsd${UNAME_RELEASE}
+       exit 0 ;;
     mac68k:OpenBSD:*:*)
        echo m68k-unknown-openbsd${UNAME_RELEASE}
        exit 0 ;;
     mac68k:OpenBSD:*:*)
        echo m68k-unknown-openbsd${UNAME_RELEASE}
        exit 0 ;;
@@ -220,28 +227,33 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
     mvmeppc:OpenBSD:*:*)
        echo powerpc-unknown-openbsd${UNAME_RELEASE}
        exit 0 ;;
     mvmeppc:OpenBSD:*:*)
        echo powerpc-unknown-openbsd${UNAME_RELEASE}
        exit 0 ;;
-    pmax:OpenBSD:*:*)
-       echo mipsel-unknown-openbsd${UNAME_RELEASE}
-       exit 0 ;;
     sgi:OpenBSD:*:*)
     sgi:OpenBSD:*:*)
-       echo mipseb-unknown-openbsd${UNAME_RELEASE}
+       echo mips64-unknown-openbsd${UNAME_RELEASE}
        exit 0 ;;
     sun3:OpenBSD:*:*)
        echo m68k-unknown-openbsd${UNAME_RELEASE}
        exit 0 ;;
        exit 0 ;;
     sun3:OpenBSD:*:*)
        echo m68k-unknown-openbsd${UNAME_RELEASE}
        exit 0 ;;
-    wgrisc:OpenBSD:*:*)
-       echo mipsel-unknown-openbsd${UNAME_RELEASE}
-       exit 0 ;;
     *:OpenBSD:*:*)
        echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
        exit 0 ;;
     *:OpenBSD:*:*)
        echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
        exit 0 ;;
-    *:MicroBSD:*:*)
-       echo ${UNAME_MACHINE}-unknown-microbsd${UNAME_RELEASE}
+    *:ekkoBSD:*:*)
+       echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+       exit 0 ;;
+    macppc:MirBSD:*:*)
+       echo powerppc-unknown-mirbsd${UNAME_RELEASE}
+       exit 0 ;;
+    *:MirBSD:*:*)
+       echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
        exit 0 ;;
     alpha:OSF1:*:*)
        exit 0 ;;
     alpha:OSF1:*:*)
-       if test $UNAME_RELEASE = "V4.0"; then
+       case $UNAME_RELEASE in
+       *4.0)
                UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
                UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
-       fi
+               ;;
+       *5.*)
+               UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+               ;;
+       esac
        # According to Compaq, /usr/sbin/psrinfo has been available on
        # OSF/1 and Tru64 systems produced since 1995.  I hope that
        # covers most systems running today.  This code pipes the CPU
        # According to Compaq, /usr/sbin/psrinfo has been available on
        # OSF/1 and Tru64 systems produced since 1995.  I hope that
        # covers most systems running today.  This code pipes the CPU
@@ -279,11 +291,12 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
            "EV7.9 (21364A)")
                UNAME_MACHINE="alphaev79" ;;
        esac
            "EV7.9 (21364A)")
                UNAME_MACHINE="alphaev79" ;;
        esac
+       # A Pn.n version is a patched version.
        # A Vn.n version is a released version.
        # A Tn.n version is a released field test version.
        # A Xn.n version is an unreleased experimental baselevel.
        # 1.2 uses "1.2" for uname -r.
        # A Vn.n version is a released version.
        # A Tn.n version is a released field test version.
        # A Xn.n version is an unreleased experimental baselevel.
        # 1.2 uses "1.2" for uname -r.
-       echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+       echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
        exit 0 ;;
     Alpha\ *:Windows_NT*:*)
        # How do we know it's Interix rather than the generic POSIX subsystem?
        exit 0 ;;
     Alpha\ *:Windows_NT*:*)
        # How do we know it's Interix rather than the generic POSIX subsystem?
@@ -306,6 +319,12 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
     *:OS/390:*:*)
        echo i370-ibm-openedition
        exit 0 ;;
     *:OS/390:*:*)
        echo i370-ibm-openedition
        exit 0 ;;
+    *:z/VM:*:*)
+       echo s390-ibm-zvmoe
+       exit 0 ;;
+    *:OS400:*:*)
+        echo powerpc-ibm-os400
+       exit 0 ;;
     arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
        echo arm-acorn-riscix${UNAME_RELEASE}
        exit 0;;
     arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
        echo arm-acorn-riscix${UNAME_RELEASE}
        exit 0;;
@@ -323,7 +342,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
     NILE*:*:*:dcosx)
        echo pyramid-pyramid-svr4
        exit 0 ;;
     NILE*:*:*:dcosx)
        echo pyramid-pyramid-svr4
        exit 0 ;;
-    DRS?6000:UNIX_SV:4.2*:7*)
+    DRS?6000:unix:4.0:6*)
+       echo sparc-icl-nx6
+       exit 0 ;;
+    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
        case `/usr/bin/uname -p` in
            sparc) echo sparc-icl-nx7 && exit 0 ;;
        esac ;;
        case `/usr/bin/uname -p` in
            sparc) echo sparc-icl-nx7 && exit 0 ;;
        esac ;;
@@ -395,6 +417,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
     *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
         echo m68k-unknown-mint${UNAME_RELEASE}
         exit 0 ;;
     *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
         echo m68k-unknown-mint${UNAME_RELEASE}
         exit 0 ;;
+    m68k:machten:*:*)
+       echo m68k-apple-machten${UNAME_RELEASE}
+       exit 0 ;;
     powerpc:machten:*:*)
        echo powerpc-apple-machten${UNAME_RELEASE}
        exit 0 ;;
     powerpc:machten:*:*)
        echo powerpc-apple-machten${UNAME_RELEASE}
        exit 0 ;;
@@ -730,7 +755,7 @@ EOF
        echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
        exit 0 ;;
     *:UNICOS/mp:*:*)
        echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
        exit 0 ;;
     *:UNICOS/mp:*:*)
-       echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 
+       echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
        exit 0 ;;
     F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
        FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
        exit 0 ;;
     F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
        FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
@@ -738,6 +763,11 @@ EOF
         FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
         echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
         exit 0 ;;
         FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
         echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
         exit 0 ;;
+    5000:UNIX_System_V:4.*:*)
+        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+       exit 0 ;;
     i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
        echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
        exit 0 ;;
     i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
        echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
        exit 0 ;;
@@ -748,18 +778,7 @@ EOF
        echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
        exit 0 ;;
     *:FreeBSD:*:*)
        echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
        exit 0 ;;
     *:FreeBSD:*:*)
-       # Determine whether the default compiler uses glibc.
-       eval $set_cc_for_build
-       sed 's/^        //' << EOF >$dummy.c
-       #include <features.h>
-       #if __GLIBC__ >= 2
-       LIBC=gnu
-       #else
-       LIBC=
-       #endif
-EOF
-       eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
-       echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
+       echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
        exit 0 ;;
     i*:CYGWIN*:*)
        echo ${UNAME_MACHINE}-pc-cygwin
        exit 0 ;;
     i*:CYGWIN*:*)
        echo ${UNAME_MACHINE}-pc-cygwin
@@ -770,8 +789,8 @@ EOF
     i*:PW*:*)
        echo ${UNAME_MACHINE}-pc-pw32
        exit 0 ;;
     i*:PW*:*)
        echo ${UNAME_MACHINE}-pc-pw32
        exit 0 ;;
-    x86:Interix*:3*)
-       echo i586-pc-interix3
+    x86:Interix*:[34]*)
+       echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
        exit 0 ;;
     [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
        echo i${UNAME_MACHINE}-pc-mks
        exit 0 ;;
     [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
        echo i${UNAME_MACHINE}-pc-mks
@@ -785,6 +804,9 @@ EOF
     i*:UWIN*:*)
        echo ${UNAME_MACHINE}-pc-uwin
        exit 0 ;;
     i*:UWIN*:*)
        echo ${UNAME_MACHINE}-pc-uwin
        exit 0 ;;
+    amd64:CYGWIN*:*:*)
+       echo x86_64-unknown-cygwin
+       exit 0 ;;
     p*:CYGWIN*:*)
        echo powerpcle-unknown-cygwin
        exit 0 ;;
     p*:CYGWIN*:*)
        echo powerpcle-unknown-cygwin
        exit 0 ;;
@@ -792,17 +814,34 @@ EOF
        echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
        exit 0 ;;
     *:GNU:*:*)
        echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
        exit 0 ;;
     *:GNU:*:*)
+       # the GNU system
        echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
        exit 0 ;;
        echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
        exit 0 ;;
+    *:GNU/*:*:*)
+       # other systems with GNU libc and userland
+       echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+       exit 0 ;;
     i*86:Minix:*:*)
        echo ${UNAME_MACHINE}-pc-minix
        exit 0 ;;
     arm*:Linux:*:*)
        echo ${UNAME_MACHINE}-unknown-linux-gnu
        exit 0 ;;
     i*86:Minix:*:*)
        echo ${UNAME_MACHINE}-pc-minix
        exit 0 ;;
     arm*:Linux:*:*)
        echo ${UNAME_MACHINE}-unknown-linux-gnu
        exit 0 ;;
+    cris:Linux:*:*)
+       echo cris-axis-linux-gnu
+       exit 0 ;;
+    crisv32:Linux:*:*)
+       echo crisv32-axis-linux-gnu
+       exit 0 ;;
+    frv:Linux:*:*)
+       echo frv-unknown-linux-gnu
+       exit 0 ;;
     ia64:Linux:*:*)
        echo ${UNAME_MACHINE}-unknown-linux-gnu
        exit 0 ;;
     ia64:Linux:*:*)
        echo ${UNAME_MACHINE}-unknown-linux-gnu
        exit 0 ;;
+    m32r*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit 0 ;;
     m68*:Linux:*:*)
        echo ${UNAME_MACHINE}-unknown-linux-gnu
        exit 0 ;;
     m68*:Linux:*:*)
        echo ${UNAME_MACHINE}-unknown-linux-gnu
        exit 0 ;;
@@ -878,6 +917,9 @@ EOF
     s390:Linux:*:* | s390x:Linux:*:*)
        echo ${UNAME_MACHINE}-ibm-linux
        exit 0 ;;
     s390:Linux:*:* | s390x:Linux:*:*)
        echo ${UNAME_MACHINE}-ibm-linux
        exit 0 ;;
+    sh64*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit 0 ;;
     sh*:Linux:*:*)
        echo ${UNAME_MACHINE}-unknown-linux-gnu
        exit 0 ;;
     sh*:Linux:*:*)
        echo ${UNAME_MACHINE}-unknown-linux-gnu
        exit 0 ;;
@@ -935,6 +977,9 @@ EOF
        LIBC=gnuaout
        #endif
        #endif
        LIBC=gnuaout
        #endif
        #endif
+       #ifdef __dietlibc__
+       LIBC=dietlibc
+       #endif
 EOF
        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
        test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
 EOF
        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
        test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
@@ -965,6 +1010,9 @@ EOF
     i*86:atheos:*:*)
        echo ${UNAME_MACHINE}-unknown-atheos
        exit 0 ;;
     i*86:atheos:*:*)
        echo ${UNAME_MACHINE}-unknown-atheos
        exit 0 ;;
+       i*86:syllable:*:*)
+       echo ${UNAME_MACHINE}-pc-syllable
+       exit 0 ;;
     i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
        echo i386-unknown-lynxos${UNAME_RELEASE}
        exit 0 ;;
     i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
        echo i386-unknown-lynxos${UNAME_RELEASE}
        exit 0 ;;
@@ -1034,9 +1082,9 @@ EOF
     M680?0:D-NIX:5.3:*)
        echo m68k-diab-dnix
        exit 0 ;;
     M680?0:D-NIX:5.3:*)
        echo m68k-diab-dnix
        exit 0 ;;
-    M68*:*:R3V[567]*:*)
+    M68*:*:R3V[5678]*:*)
        test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
        test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
-    3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0)
+    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
        OS_REL=''
        test -r /etc/.relid \
        && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
        OS_REL=''
        test -r /etc/.relid \
        && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
@@ -1092,6 +1140,10 @@ EOF
        # From seanf@swdc.stratus.com.
        echo i860-stratus-sysv4
        exit 0 ;;
        # From seanf@swdc.stratus.com.
        echo i860-stratus-sysv4
        exit 0 ;;
+    i*86:VOS:*:*)
+       # From Paul.Green@stratus.com.
+       echo ${UNAME_MACHINE}-stratus-vos
+       exit 0 ;;
     *:VOS:*:*)
        # From Paul.Green@stratus.com.
        echo hppa1.1-stratus-vos
     *:VOS:*:*)
        # From Paul.Green@stratus.com.
        echo hppa1.1-stratus-vos
@@ -1134,9 +1186,10 @@ EOF
        echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
        exit 0 ;;
     *:Darwin:*:*)
        echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
        exit 0 ;;
     *:Darwin:*:*)
-       case `uname -p` in
+       UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+       case $UNAME_PROCESSOR in
            *86) UNAME_PROCESSOR=i686 ;;
            *86) UNAME_PROCESSOR=i686 ;;
-           powerpc) UNAME_PROCESSOR=powerpc ;;
+           unknown) UNAME_PROCESSOR=powerpc ;;
        esac
        echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
        exit 0 ;;
        esac
        echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
        exit 0 ;;
@@ -1151,7 +1204,10 @@ EOF
     *:QNX:*:4*)
        echo i386-pc-qnx
        exit 0 ;;
     *:QNX:*:4*)
        echo i386-pc-qnx
        exit 0 ;;
-    NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*)
+    NSE-?:NONSTOP_KERNEL:*:*)
+       echo nse-tandem-nsk${UNAME_RELEASE}
+       exit 0 ;;
+    NSR-?:NONSTOP_KERNEL:*:*)
        echo nsr-tandem-nsk${UNAME_RELEASE}
        exit 0 ;;
     *:NonStop-UX:*:*)
        echo nsr-tandem-nsk${UNAME_RELEASE}
        exit 0 ;;
     *:NonStop-UX:*:*)
@@ -1192,6 +1248,22 @@ EOF
     *:ITS:*:*)
        echo pdp10-unknown-its
        exit 0 ;;
     *:ITS:*:*)
        echo pdp10-unknown-its
        exit 0 ;;
+    SEI:*:*:SEIUX)
+        echo mips-sei-seiux${UNAME_RELEASE}
+       exit 0 ;;
+    *:DragonFly:*:*)
+       echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+       exit 0 ;;
+    *:*VMS:*:*)
+       UNAME_MACHINE=`(uname -p) 2>/dev/null`
+       case "${UNAME_MACHINE}" in
+           A*) echo alpha-dec-vms && exit 0 ;;
+           I*) echo ia64-dec-vms && exit 0 ;;
+           V*) echo vax-dec-vms && exit 0 ;;
+       esac ;;
+    *:XENIX:*:SysV)
+       echo i386-pc-xenix
+       exit 0 ;;
 esac
 
 #echo '(No uname command or uname output not recognized.)' 1>&2
 esac
 
 #echo '(No uname command or uname output not recognized.)' 1>&2
@@ -1351,7 +1423,9 @@ This script, last modified $timestamp, has failed to recognize
 the operating system you are using. It is advised that you
 download the most up to date version of the config scripts from
 
 the operating system you are using. It is advised that you
 download the most up to date version of the config scripts from
 
-    ftp://ftp.gnu.org/pub/gnu/config/
+  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
+and
+  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
 
 If the version you run ($0) is already up to date, please
 send the following data and any information you think might be
 
 If the version you run ($0) is already up to date, please
 send the following data and any information you think might be
index 5f94062aafd8a9cc46f1322e63263ba3aa9594c4..87a1ee49e67b1ab68f3ba88dc81eb3bc4449d96d 100755 (executable)
@@ -1,9 +1,9 @@
 #! /bin/sh
 # Configuration validation subroutine script.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
 #! /bin/sh
 # Configuration validation subroutine script.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+#   2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
 
 
-timestamp='2003-02-03'
+timestamp='2005-04-22'
 
 # This file is (in principle) common to ALL GNU software.
 # The presence of a machine in this file suggests that SOME GNU software
 
 # This file is (in principle) common to ALL GNU software.
 # The presence of a machine in this file suggests that SOME GNU software
@@ -70,7 +70,7 @@ Report bugs and patches to <config-patches@gnu.org>."
 version="\
 GNU config.sub ($timestamp)
 
 version="\
 GNU config.sub ($timestamp)
 
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
@@ -118,7 +118,8 @@ esac
 # Here we must recognize all the valid KERNEL-OS combinations.
 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
 case $maybe_os in
 # Here we must recognize all the valid KERNEL-OS combinations.
 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
 case $maybe_os in
-  nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
+  nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
+  kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
     os=-$maybe_os
     basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
     ;;
     os=-$maybe_os
     basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
     ;;
@@ -144,7 +145,7 @@ case $os in
        -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
        -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
        -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
        -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
        -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
        -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-       -apple | -axis)
+       -apple | -axis | -knuth | -cray)
                os=
                basic_machine=$1
                ;;
                os=
                basic_machine=$1
                ;;
@@ -228,14 +229,16 @@ case $basic_machine in
        | a29k \
        | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
        | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
        | a29k \
        | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
        | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+       | am33_2.0 \
        | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
        | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
-       | clipper \
+       | bfin \
+       | c4x | clipper \
        | d10v | d30v | dlx | dsp16xx \
        | fr30 | frv \
        | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
        | i370 | i860 | i960 | ia64 \
        | d10v | d30v | dlx | dsp16xx \
        | fr30 | frv \
        | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
        | i370 | i860 | i960 | ia64 \
-       | ip2k \
-       | m32r | m68000 | m68k | m88k | mcore \
+       | ip2k | iq2000 \
+       | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \
        | mips | mipsbe | mipseb | mipsel | mipsle \
        | mips16 \
        | mips64 | mips64el \
        | mips | mipsbe | mipseb | mipsel | mipsle \
        | mips16 \
        | mips64 | mips64el \
@@ -247,6 +250,7 @@ case $basic_machine in
        | mipsisa32 | mipsisa32el \
        | mipsisa32r2 | mipsisa32r2el \
        | mipsisa64 | mipsisa64el \
        | mipsisa32 | mipsisa32el \
        | mipsisa32r2 | mipsisa32r2el \
        | mipsisa64 | mipsisa64el \
+       | mipsisa64r2 | mipsisa64r2el \
        | mipsisa64sb1 | mipsisa64sb1el \
        | mipsisa64sr71k | mipsisa64sr71kel \
        | mipstx39 | mipstx39el \
        | mipsisa64sb1 | mipsisa64sb1el \
        | mipsisa64sr71k | mipsisa64sr71kel \
        | mipstx39 | mipstx39el \
@@ -259,12 +263,13 @@ case $basic_machine in
        | pyramid \
        | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
        | sh64 | sh64le \
        | pyramid \
        | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
        | sh64 | sh64le \
-       | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
+       | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \
+       | sparcv8 | sparcv9 | sparcv9b \
        | strongarm \
        | strongarm \
-       | tahoe | thumb | tic80 | tron \
+       | tahoe | thumb | tic4x | tic80 | tron \
        | v850 | v850e \
        | we32k \
        | v850 | v850e \
        | we32k \
-       | x86 | xscale | xstormy16 | xtensa \
+       | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
        | z8k)
                basic_machine=$basic_machine-unknown
                ;;
        | z8k)
                basic_machine=$basic_machine-unknown
                ;;
@@ -295,19 +300,19 @@ case $basic_machine in
        | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
        | arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
        | avr-* \
        | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
        | arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
        | avr-* \
-       | bs2000-* \
+       | bfin-* | bs2000-* \
        | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
        | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
-       | clipper-* | cydra-* \
+       | clipper-* | craynv-* | cydra-* \
        | d10v-* | d30v-* | dlx-* \
        | elxsi-* \
        | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
        | h8300-* | h8500-* \
        | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
        | i*86-* | i860-* | i960-* | ia64-* \
        | d10v-* | d30v-* | dlx-* \
        | elxsi-* \
        | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
        | h8300-* | h8500-* \
        | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
        | i*86-* | i860-* | i960-* | ia64-* \
-       | ip2k-* \
-       | m32r-* \
+       | ip2k-* | iq2000-* \
+       | m32r-* | m32rle-* \
        | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
        | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
-       | m88110-* | m88k-* | mcore-* \
+       | m88110-* | m88k-* | maxq-* | mcore-* \
        | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
        | mips16-* \
        | mips64-* | mips64el-* \
        | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
        | mips16-* \
        | mips64-* | mips64el-* \
@@ -319,11 +324,13 @@ case $basic_machine in
        | mipsisa32-* | mipsisa32el-* \
        | mipsisa32r2-* | mipsisa32r2el-* \
        | mipsisa64-* | mipsisa64el-* \
        | mipsisa32-* | mipsisa32el-* \
        | mipsisa32r2-* | mipsisa32r2el-* \
        | mipsisa64-* | mipsisa64el-* \
+       | mipsisa64r2-* | mipsisa64r2el-* \
        | mipsisa64sb1-* | mipsisa64sb1el-* \
        | mipsisa64sr71k-* | mipsisa64sr71kel-* \
        | mipstx39-* | mipstx39el-* \
        | mipsisa64sb1-* | mipsisa64sb1el-* \
        | mipsisa64sr71k-* | mipsisa64sr71kel-* \
        | mipstx39-* | mipstx39el-* \
+       | mmix-* \
        | msp430-* \
        | msp430-* \
-       | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \
+       | none-* | np1-* | ns16k-* | ns32k-* \
        | orion-* \
        | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
        | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
        | orion-* \
        | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
        | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
@@ -331,15 +338,16 @@ case $basic_machine in
        | romp-* | rs6000-* \
        | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
        | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
        | romp-* | rs6000-* \
        | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
        | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
-       | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
-       | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
+       | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \
+       | sparclite-* \
+       | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
        | tahoe-* | thumb-* \
        | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
        | tron-* \
        | v850-* | v850e-* | vax-* \
        | we32k-* \
        | tahoe-* | thumb-* \
        | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
        | tron-* \
        | v850-* | v850e-* | vax-* \
        | we32k-* \
-       | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
-       | xtensa-* \
+       | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
+       | xstormy16-* | xtensa-* \
        | ymp-* \
        | z8k-*)
                ;;
        | ymp-* \
        | z8k-*)
                ;;
@@ -359,6 +367,9 @@ case $basic_machine in
                basic_machine=a29k-amd
                os=-udi
                ;;
                basic_machine=a29k-amd
                os=-udi
                ;;
+       abacus)
+               basic_machine=abacus-unknown
+               ;;
        adobe68k)
                basic_machine=m68010-adobe
                os=-scout
        adobe68k)
                basic_machine=m68010-adobe
                os=-scout
@@ -373,6 +384,12 @@ case $basic_machine in
                basic_machine=a29k-none
                os=-bsd
                ;;
                basic_machine=a29k-none
                os=-bsd
                ;;
+       amd64)
+               basic_machine=x86_64-pc
+               ;;
+       amd64-*)
+               basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
        amdahl)
                basic_machine=580-amdahl
                os=-sysv
        amdahl)
                basic_machine=580-amdahl
                os=-sysv
@@ -432,12 +449,27 @@ case $basic_machine in
                basic_machine=j90-cray
                os=-unicos
                ;;
                basic_machine=j90-cray
                os=-unicos
                ;;
+       craynv)
+               basic_machine=craynv-cray
+               os=-unicosmp
+               ;;
+       cr16c)
+               basic_machine=cr16c-unknown
+               os=-elf
+               ;;
        crds | unos)
                basic_machine=m68k-crds
                ;;
        crds | unos)
                basic_machine=m68k-crds
                ;;
+       crisv32 | crisv32-* | etraxfs*)
+               basic_machine=crisv32-axis
+               ;;
        cris | cris-* | etrax*)
                basic_machine=cris-axis
                ;;
        cris | cris-* | etrax*)
                basic_machine=cris-axis
                ;;
+       crx)
+               basic_machine=crx-unknown
+               os=-elf
+               ;;
        da30 | da30-*)
                basic_machine=m68k-da30
                ;;
        da30 | da30-*)
                basic_machine=m68k-da30
                ;;
@@ -460,6 +492,10 @@ case $basic_machine in
                basic_machine=m88k-motorola
                os=-sysv3
                ;;
                basic_machine=m88k-motorola
                os=-sysv3
                ;;
+       djgpp)
+               basic_machine=i586-pc
+               os=-msdosdjgpp
+               ;;
        dpx20 | dpx20-*)
                basic_machine=rs6000-bull
                os=-bosx
        dpx20 | dpx20-*)
                basic_machine=rs6000-bull
                os=-bosx
@@ -638,10 +674,6 @@ case $basic_machine in
        mips3*)
                basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
                ;;
        mips3*)
                basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
                ;;
-       mmix*)
-               basic_machine=mmix-knuth
-               os=-mmixware
-               ;;
        monitor)
                basic_machine=m68k-rom68k
                os=-coff
        monitor)
                basic_machine=m68k-rom68k
                os=-coff
@@ -722,10 +754,6 @@ case $basic_machine in
        np1)
                basic_machine=np1-gould
                ;;
        np1)
                basic_machine=np1-gould
                ;;
-       nv1)
-               basic_machine=nv1-cray
-               os=-unicosmp
-               ;;
        nsr-tandem)
                basic_machine=nsr-tandem
                ;;
        nsr-tandem)
                basic_machine=nsr-tandem
                ;;
@@ -737,6 +765,10 @@ case $basic_machine in
                basic_machine=or32-unknown
                os=-coff
                ;;
                basic_machine=or32-unknown
                os=-coff
                ;;
+       os400)
+               basic_machine=powerpc-ibm
+               os=-os400
+               ;;
        OSE68000 | ose68000)
                basic_machine=m68000-ericsson
                os=-ose
        OSE68000 | ose68000)
                basic_machine=m68000-ericsson
                os=-ose
@@ -768,18 +800,24 @@ case $basic_machine in
        pentiumpro | p6 | 6x86 | athlon | athlon_*)
                basic_machine=i686-pc
                ;;
        pentiumpro | p6 | 6x86 | athlon | athlon_*)
                basic_machine=i686-pc
                ;;
-       pentiumii | pentium2)
+       pentiumii | pentium2 | pentiumiii | pentium3)
                basic_machine=i686-pc
                ;;
                basic_machine=i686-pc
                ;;
+       pentium4)
+               basic_machine=i786-pc
+               ;;
        pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
                basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
                ;;
        pentiumpro-* | p6-* | 6x86-* | athlon-*)
                basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
                ;;
        pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
                basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
                ;;
        pentiumpro-* | p6-* | 6x86-* | athlon-*)
                basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
                ;;
-       pentiumii-* | pentium2-*)
+       pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
                basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
                ;;
                basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
                ;;
+       pentium4-*)
+               basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
        pn)
                basic_machine=pn-gould
                ;;
        pn)
                basic_machine=pn-gould
                ;;
@@ -838,6 +876,10 @@ case $basic_machine in
        sb1el)
                basic_machine=mipsisa64sb1el-unknown
                ;;
        sb1el)
                basic_machine=mipsisa64sb1el-unknown
                ;;
+       sei)
+               basic_machine=mips-sei
+               os=-seiux
+               ;;
        sequent)
                basic_machine=i386-sequent
                ;;
        sequent)
                basic_machine=i386-sequent
                ;;
@@ -845,6 +887,9 @@ case $basic_machine in
                basic_machine=sh-hitachi
                os=-hms
                ;;
                basic_machine=sh-hitachi
                os=-hms
                ;;
+       sh64)
+               basic_machine=sh64-unknown
+               ;;
        sparclite-wrs | simso-wrs)
                basic_machine=sparclite-wrs
                os=-vxworks
        sparclite-wrs | simso-wrs)
                basic_machine=sparclite-wrs
                os=-vxworks
@@ -919,10 +964,6 @@ case $basic_machine in
                basic_machine=t90-cray
                os=-unicos
                ;;
                basic_machine=t90-cray
                os=-unicos
                ;;
-        tic4x | c4x*)
-               basic_machine=tic4x-unknown
-               os=-coff
-               ;;
        tic54x | c54x*)
                basic_machine=tic54x-unknown
                os=-coff
        tic54x | c54x*)
                basic_machine=tic54x-unknown
                os=-coff
@@ -948,6 +989,10 @@ case $basic_machine in
        tower | tower-32)
                basic_machine=m68k-ncr
                ;;
        tower | tower-32)
                basic_machine=m68k-ncr
                ;;
+       tpf)
+               basic_machine=s390x-ibm
+               os=-tpf
+               ;;
        udi29k)
                basic_machine=a29k-amd
                os=-udi
        udi29k)
                basic_machine=a29k-amd
                os=-udi
@@ -991,6 +1036,10 @@ case $basic_machine in
                basic_machine=hppa1.1-winbond
                os=-proelf
                ;;
                basic_machine=hppa1.1-winbond
                os=-proelf
                ;;
+       xbox)
+               basic_machine=i686-pc
+               os=-mingw32
+               ;;
        xps | xps100)
                basic_machine=xps100-honeywell
                ;;
        xps | xps100)
                basic_machine=xps100-honeywell
                ;;
@@ -1021,6 +1070,9 @@ case $basic_machine in
        romp)
                basic_machine=romp-ibm
                ;;
        romp)
                basic_machine=romp-ibm
                ;;
+       mmix)
+               basic_machine=mmix-knuth
+               ;;
        rs6000)
                basic_machine=rs6000-ibm
                ;;
        rs6000)
                basic_machine=rs6000-ibm
                ;;
@@ -1043,7 +1095,7 @@ case $basic_machine in
        sh64)
                basic_machine=sh64-unknown
                ;;
        sh64)
                basic_machine=sh64-unknown
                ;;
-       sparc | sparcv9 | sparcv9b)
+       sparc | sparcv8 | sparcv9 | sparcv9b)
                basic_machine=sparc-sun
                ;;
        cydra)
                basic_machine=sparc-sun
                ;;
        cydra)
@@ -1116,19 +1168,20 @@ case $os in
              | -aos* \
              | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
              | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
              | -aos* \
              | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
              | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
-             | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
-             | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+             | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
+             | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
+             | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
              | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
              | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
              | -chorusos* | -chorusrdb* \
              | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
              | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
              | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
              | -chorusos* | -chorusrdb* \
              | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-             | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
+             | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
              | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
              | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
              | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
              | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
              | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
              | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
              | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
              | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
              | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
              | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
-             | -powermax* | -dnix* | -microbsd*)
+             | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*)
        # Remember, each alternative MUST END IN *, to match a version number.
                ;;
        -qnx*)
        # Remember, each alternative MUST END IN *, to match a version number.
                ;;
        -qnx*)
@@ -1152,6 +1205,9 @@ case $os in
        -mac*)
                os=`echo $os | sed -e 's|mac|macos|'`
                ;;
        -mac*)
                os=`echo $os | sed -e 's|mac|macos|'`
                ;;
+       -linux-dietlibc)
+               os=-linux-dietlibc
+               ;;
        -linux*)
                os=`echo $os | sed -e 's|linux|linux-gnu|'`
                ;;
        -linux*)
                os=`echo $os | sed -e 's|linux|linux-gnu|'`
                ;;
@@ -1164,6 +1220,9 @@ case $os in
        -opened*)
                os=-openedition
                ;;
        -opened*)
                os=-openedition
                ;;
+        -os400*)
+               os=-os400
+               ;;
        -wince*)
                os=-wince
                ;;
        -wince*)
                os=-wince
                ;;
@@ -1185,6 +1244,9 @@ case $os in
        -atheos*)
                os=-atheos
                ;;
        -atheos*)
                os=-atheos
                ;;
+       -syllable*)
+               os=-syllable
+               ;;
        -386bsd)
                os=-bsd
                ;;
        -386bsd)
                os=-bsd
                ;;
@@ -1207,6 +1269,9 @@ case $os in
        -sinix*)
                os=-sysv4
                ;;
        -sinix*)
                os=-sysv4
                ;;
+        -tpf*)
+               os=-tpf
+               ;;
        -triton*)
                os=-sysv3
                ;;
        -triton*)
                os=-sysv3
                ;;
@@ -1243,6 +1308,9 @@ case $os in
        -kaos*)
                os=-kaos
                ;;
        -kaos*)
                os=-kaos
                ;;
+       -zvmoe)
+               os=-zvmoe
+               ;;
        -none)
                ;;
        *)
        -none)
                ;;
        *)
@@ -1274,6 +1342,9 @@ case $basic_machine in
        arm*-semi)
                os=-aout
                ;;
        arm*-semi)
                os=-aout
                ;;
+    c4x-* | tic4x-*)
+        os=-coff
+        ;;
        # This must come before the *-dec entry.
        pdp10-*)
                os=-tops20
        # This must come before the *-dec entry.
        pdp10-*)
                os=-tops20
@@ -1320,6 +1391,9 @@ case $basic_machine in
        *-ibm)
                os=-aix
                ;;
        *-ibm)
                os=-aix
                ;;
+       *-knuth)
+               os=-mmixware
+               ;;
        *-wec)
                os=-proelf
                ;;
        *-wec)
                os=-proelf
                ;;
@@ -1452,9 +1526,15 @@ case $basic_machine in
                        -mvs* | -opened*)
                                vendor=ibm
                                ;;
                        -mvs* | -opened*)
                                vendor=ibm
                                ;;
+                       -os400*)
+                               vendor=ibm
+                               ;;
                        -ptx*)
                                vendor=sequent
                                ;;
                        -ptx*)
                                vendor=sequent
                                ;;
+                       -tpf*)
+                               vendor=ibm
+                               ;;
                        -vxsim* | -vxworks* | -windiss*)
                                vendor=wrs
                                ;;
                        -vxsim* | -vxworks* | -windiss*)
                                vendor=wrs
                                ;;
index 3efdfc1af2bc70df0f3906b000a01f56a526bd04..90b0b5e9e501896c0e55a71215d083c462e94c58 100644 (file)
@@ -11,6 +11,63 @@ else
        AC_DEFINE_UNQUOTED(CTDLDIR, "$prefix")
 fi
 
        AC_DEFINE_UNQUOTED(CTDLDIR, "$prefix")
 fi
 
+dnl Checks for the Datadir
+AC_ARG_WITH(datadir, 
+                   [  --with-datadir          directory to store the databases under],
+                       [ if test "x$withval" != "xno" ; then
+                                             AC_DEFINE(HAVE_DATA_DIR)
+                                                 AC_DEFINE_UNQUOTED(DATA_DIR, "$withval")
+                         fi
+                       ]
+)
+
+dnl Checks for the spooldir
+AC_ARG_WITH(spooldir, 
+                       [  --with-spooldir         directory to keep queues under],
+                       [ if test "x$withval" != "xno" ; then
+                                           AC_DEFINE(HAVE_SPOOL_DIR)
+                                               AC_DEFINE_UNQUOTED(SPOOL_DIR,"$withval")
+                          fi
+                       ]
+)
+
+
+
+dnl Checks for the Configdir
+AC_ARG_WITH(sysconfdir, 
+                       [  --with-sysconfdir       directory to store the configs under],
+                       [ if test "x$withval" != "xno" ; then
+                                           AC_DEFINE(HAVE_ETC_DIR)
+                                               AC_DEFINE_UNQUOTED(ETC_DIR, "$withval")
+                         fi
+                       ]
+)
+
+
+dnl Checks for the run-dir for the sockets
+AC_ARG_WITH(rundir, 
+                       [  --with-rundir       directory to store the configs under],
+                       [ if test "x$withval" != "xno" ; then
+                                           AC_DEFINE(HAVE_RUN_DIR)
+                                               AC_DEFINE_UNQUOTED(RUN_DIR, "$withval")
+                         fi
+                       ]
+)
+
+
+dnl Checks for the Pseudo Random Generator sockets TODO: this keeps being default.
+AC_DEFINE_UNQUOTED(EGD_POOL, "/var/run/egd-pool")
+AC_ARG_WITH(egdpool, 
+                       [  --with-egdpool       the socket from Pseudo Random Generator, defaults to /var/run/egd-pool],
+                       [ if test "x$withval" != "xno" ; then
+                                               AC_DEFINE_UNQUOTED(EGD_POOL, "$withval")
+                         fi
+                       ]
+)
+
+
+
+
 AC_ARG_ENABLE(autologin, [  --disable-autologin     disable autologin (default is enabled if possible)])
 AC_ARG_ENABLE(chkpwd, [  --disable-chkpwd        don't build 'chkpwd'])
 
 AC_ARG_ENABLE(autologin, [  --disable-autologin     disable autologin (default is enabled if possible)])
 AC_ARG_ENABLE(chkpwd, [  --disable-chkpwd        don't build 'chkpwd'])
 
@@ -23,7 +80,7 @@ AC_ARG_WITH(pam, [  --with-pam              use PAM if present (see PAM.txt befo
 AC_ARG_WITH(kthread, [  --with-kthread          use kernel threads (on FreeBSD) (not recommended yet)])
 AC_ARG_WITH(db, [  --with-db@<:@=DIR@:>@         use Sleepycat DB 3.x @<:@DIR=/usr/local/BerkeleyDB.3.@<:@123@:>@@:>@])
 AC_ARG_WITH(ssl,
 AC_ARG_WITH(kthread, [  --with-kthread          use kernel threads (on FreeBSD) (not recommended yet)])
 AC_ARG_WITH(db, [  --with-db@<:@=DIR@:>@         use Sleepycat DB 3.x @<:@DIR=/usr/local/BerkeleyDB.3.@<:@123@:>@@:>@])
 AC_ARG_WITH(ssl,
-       [  --with-ssl=PATH     Specify path to OpenSSL installation ],
+       [  --with-ssl=PATH         Specify path to OpenSSL installation ],
        [
                if test "x$withval" != "xno" ; then
                        tryssldir=$withval
        [
                if test "x$withval" != "xno" ; then
                        tryssldir=$withval
@@ -35,7 +92,7 @@ AC_ARG_WITH(ncurses, [  --without-ncurses       don't use ncurses])
 AC_ARG_WITH(with_zlib, [  --with-zlib             use zlib compression if present])
 AC_ARG_WITH(with_ldap, [  --with-ldap             use OpenLDAP client library])
 AC_ARG_WITH(with_libical, [  --with-libical          use libical calendaring library])
 AC_ARG_WITH(with_zlib, [  --with-zlib             use zlib compression if present])
 AC_ARG_WITH(with_ldap, [  --with-ldap             use OpenLDAP client library])
 AC_ARG_WITH(with_libical, [  --with-libical          use libical calendaring library])
-AC_ARG_WITH(with_newt, [  --with-newt          use newt window library])
+AC_ARG_WITH(with_newt, [  --with-newt             use newt window library])
 
 if test "x$with_db" != xno -a "x$with_db" != xyes -a "$with_db"; then
        db_dir="$with_db"
 
 if test "x$with_db" != xno -a "x$with_db" != xyes -a "$with_db"; then
        db_dir="$with_db"
@@ -118,6 +175,7 @@ case "$host" in
 esac
 dnl DEFS="$DEFS $PTHREAD_DEFS"
 
 esac
 dnl DEFS="$DEFS $PTHREAD_DEFS"
 
+
 dnl Checks for programs.
 AC_PROG_CC
 
 dnl Checks for programs.
 AC_PROG_CC
 
@@ -378,7 +436,6 @@ if test "x$with_db" != xno; then
 
 fi
 
 
 fi
 
-
 dnl Checks for the zlib compression library.
 if test "x$with_zlib" != xno ; then
        AC_CHECK_HEADERS(zlib.h,
 dnl Checks for the zlib compression library.
 if test "x$with_zlib" != xno ; then
        AC_CHECK_HEADERS(zlib.h,
index 0b882e85529ba1e8782dd83f4894e23e80b9fae9..bad2a68d3ab893c4765d66f77af0072fe5df6fd6 100644 (file)
@@ -64,13 +64,25 @@ void get_control(void)
         */
        memset(&CitControl, 0, sizeof(struct CitControl));
        if (control_fp == NULL) {
         */
        memset(&CitControl, 0, sizeof(struct CitControl));
        if (control_fp == NULL) {
-               control_fp = fopen("citadel.control", "rb+");
+               control_fp = fopen(
+#ifndef HAVE_RUN_DIR
+                                                  "."
+#else
+                                                  RUN_DIR
+#endif
+                                                  "/citadel.control", "rb+");
                if (control_fp != NULL) {
                        fchown(fileno(control_fp), config.c_ctdluid, -1);
                }
        }
        if (control_fp == NULL) {
                if (control_fp != NULL) {
                        fchown(fileno(control_fp), config.c_ctdluid, -1);
                }
        }
        if (control_fp == NULL) {
-               control_fp = fopen("citadel.control", "wb+");
+               control_fp = fopen(
+#ifndef HAVE_RUN_DIR
+                                                  "."
+#else
+                                                  RUN_DIR
+#endif
+                                                  "/citadel.control", "wb+");
                if (control_fp != NULL) {
                        fchown(fileno(control_fp), config.c_ctdluid, -1);
                        memset(&CitControl, 0, sizeof(struct CitControl));
                if (control_fp != NULL) {
                        fchown(fileno(control_fp), config.c_ctdluid, -1);
                        memset(&CitControl, 0, sizeof(struct CitControl));
index 39912dae2011b97fd71daf8a60f8a48b492d3fd6..eb1e37f11e03d17ca00a7bb9e95183275a0ff958 100644 (file)
@@ -338,9 +338,12 @@ void open_databases(void)
        struct dirent *d;
        char filename[PATH_MAX];
 
        struct dirent *d;
        char filename[PATH_MAX];
 
-
+#ifndef HAVE_DATA_DIR
        getcwd(dbdirname, sizeof dbdirname);
        strcat(dbdirname, "/data");
        getcwd(dbdirname, sizeof dbdirname);
        strcat(dbdirname, "/data");
+#else
+       strcat(dbdirname, DATA_DIR"/data");
+#endif
 
        lprintf(CTDL_DEBUG, "cdb_*: open_databases() starting\n");
        lprintf(CTDL_DEBUG, "Compiled db: %s\n", DB_VERSION_STRING);
 
        lprintf(CTDL_DEBUG, "cdb_*: open_databases() starting\n");
        lprintf(CTDL_DEBUG, "Compiled db: %s\n", DB_VERSION_STRING);
index 0f469185931b18dbfa79798d900421612e04d4ec..616bf26eac756166f7c825c4f629a724276ca6f2 100644 (file)
@@ -58,6 +58,12 @@ developer<br>
       <td valign="top"><i>IMAP and build patches<br>
       </i></td>
     </tr>
       <td valign="top"><i>IMAP and build patches<br>
       </i></td>
     </tr>
+    <tr>
+      <td valign="top">Wilfried Goesgens<br>
+      </td>
+      <td valign="top"><i>build system patches<br>
+      </i></td>
+    </tr>
     <tr>
       <td valign="top">Michael Hampton<br>
       </td>
     <tr>
       <td valign="top">Michael Hampton<br>
       </td>
index 7595fd853a765ed9ddeb3d17b82bf965fce5ca4e..e4f69426f853a858a0cc8ec99b7839015f8fcfdd 100644 (file)
@@ -136,8 +136,14 @@ void cmd_delf(char *filename)
                        filename[a] = '_';
                }
        }
                        filename[a] = '_';
                }
        }
-       snprintf(pathname, sizeof pathname, "./files/%s/%s",
-                CC->room.QRdirname, filename);
+       snprintf(pathname, sizeof pathname, 
+#ifndef HAVE_DATA_DIR
+                        "." /* FIXME: should here be CTDLDIR ? */
+#else
+                        DATA_DIR
+#endif
+                        "/files/%s/%s",
+                        CC->room.QRdirname, filename);
        a = unlink(pathname);
        if (a == 0) {
                cprintf("%d File '%s' deleted.\n", CIT_OK, pathname);
        a = unlink(pathname);
        if (a == 0) {
                cprintf("%d File '%s' deleted.\n", CIT_OK, pathname);
@@ -270,8 +276,13 @@ void cmd_netf(char *cmdbuf)
                return;
        }
        snprintf(outfile, sizeof outfile,
                return;
        }
        snprintf(outfile, sizeof outfile,
-                "%s/network/spoolin/nsf.%04lx.%04x",
-                CTDLDIR, (long)getpid(), ++seq);
+#ifndef HAVE_SPOOL_DIR
+                        CTDLDIR
+#else
+                        SPOOL_DIR
+#endif
+                        "/network/spoolin/nsf.%04lx.%04x",
+                        (long)getpid(), ++seq);
        ofp = fopen(outfile, "a");
        if (ofp == NULL) {
                cprintf("%d internal error\n", ERROR + INTERNAL_ERROR);
        ofp = fopen(outfile, "a");
        if (ofp == NULL) {
                cprintf("%d internal error\n", ERROR + INTERNAL_ERROR);
@@ -300,8 +311,15 @@ void cmd_netf(char *cmdbuf)
        fclose(ofp);
 
        snprintf(buf, sizeof buf,
        fclose(ofp);
 
        snprintf(buf, sizeof buf,
-                "cd ./files/%s; uuencode %s <%s 2>/dev/null >>%s",
-                CC->room.QRdirname, filename, filename, outfile);
+                        "cd "
+#ifndef HAVE_DATA_DIR
+                        "." /* FIXME: should here be CTDLDIR ? */
+#else
+                        DATA_DIR
+#endif
+                        /* FIXME: detect uuencode while installation? or inline */
+                        "/files/%s; uuencode %s <%s 2>/dev/null >>%s",
+                        CC->room.QRdirname, filename, filename, outfile);
        system(buf);
 
        ofp = fopen(outfile, "a");
        system(buf);
 
        ofp = fopen(outfile, "a");
@@ -374,7 +392,12 @@ void cmd_open(char *cmdbuf)
        }
 
        snprintf(pathname, sizeof pathname,
        }
 
        snprintf(pathname, sizeof pathname,
-                "./files/%s/%s", CC->room.QRdirname, filename);
+#ifndef HAVE_DATA_DIR
+                        "." /* FIXME: should here be CTDLDIR ? */
+#else
+                        DATA_DIR
+#endif
+                "/files/%s/%s", CC->room.QRdirname, filename);
        CC->download_fp = fopen(pathname, "r");
 
        if (CC->download_fp == NULL) {
        CC->download_fp = fopen(pathname, "r");
 
        if (CC->download_fp == NULL) {
@@ -419,12 +442,23 @@ void cmd_oimg(char *cmdbuf)
                                ERROR + NO_SUCH_USER);
                        return;
                }
                                ERROR + NO_SUCH_USER);
                        return;
                }
-               snprintf(pathname, sizeof pathname, "./userpics/%ld.gif",
-                        usbuf.usernum);
+               snprintf(pathname, sizeof pathname, 
+#ifndef HAVE_DATA_DIR
+                                "." /* FIXME: should here be CTDLDIR ? */
+#else
+                                DATA_DIR
+#endif
+                                "/userpics/%ld.gif",
+                                usbuf.usernum);
        } else if (!strcasecmp(filename, "_floorpic_")) {
                which_floor = extract_int(cmdbuf, 1);
                snprintf(pathname, sizeof pathname,
        } else if (!strcasecmp(filename, "_floorpic_")) {
                which_floor = extract_int(cmdbuf, 1);
                snprintf(pathname, sizeof pathname,
-                        "./images/floor.%d.gif", which_floor);
+#ifndef HAVE_DATA_DIR
+                                "." /* FIXME: should here be CTDLDIR ? */
+#else
+                                DATA_DIR
+#endif
+                                "/images/floor.%d.gif", which_floor);
        } else if (!strcasecmp(filename, "_roompic_")) {
                assoc_file_name(pathname, sizeof pathname, &CC->room, "images");
        } else {
        } else if (!strcasecmp(filename, "_roompic_")) {
                assoc_file_name(pathname, sizeof pathname, &CC->room, "images");
        } else {
@@ -434,8 +468,14 @@ void cmd_oimg(char *cmdbuf)
                                filename[a] = '_';
                        }
                }
                                filename[a] = '_';
                        }
                }
-               snprintf(pathname, sizeof pathname, "./images/%s.gif",
-                        filename);
+               snprintf(pathname, sizeof pathname, 
+#ifndef HAVE_DATA_DIR
+                                "." /* FIXME: should here be CTDLDIR ? */
+#else
+                                DATA_DIR
+#endif
+                                "/images/%s.gif",
+                                filename);
        }
 
        CC->download_fp = fopen(pathname, "rb");
        }
 
        CC->download_fp = fopen(pathname, "rb");
@@ -483,10 +523,21 @@ void cmd_uopn(char *cmdbuf)
                        CC->upl_file[a] = '_';
                }
        }
                        CC->upl_file[a] = '_';
                }
        }
-       snprintf(CC->upl_path, sizeof CC->upl_path, "./files/%s/%s",
-                CC->room.QRdirname, CC->upl_file);
+       snprintf(CC->upl_path, sizeof CC->upl_path, 
+#ifndef HAVE_DATA_DIR
+                        "." /* FIXME: should here be CTDLDIR ? */
+#else
+                        DATA_DIR
+#endif
+                        "/files/%s/%s",
+                        CC->room.QRdirname, CC->upl_file);
        snprintf(CC->upl_filedir, sizeof CC->upl_filedir,
        snprintf(CC->upl_filedir, sizeof CC->upl_filedir,
-                "./files/%s/filedir", CC->room.QRdirname);
+#ifndef HAVE_DATA_DIR
+                        "." /* FIXME: should here be CTDLDIR ? */
+#else
+                        DATA_DIR
+#endif
+                        "/files/%s/filedir", CC->room.QRdirname);
 
        CC->upload_fp = fopen(CC->upl_path, "r");
        if (CC->upload_fp != NULL) {
 
        CC->upload_fp = fopen(CC->upl_path, "r");
        if (CC->upload_fp != NULL) {
@@ -541,20 +592,36 @@ void cmd_uimg(char *cmdbuf)
        }
 
        if (CC->user.axlevel >= 6) {
        }
 
        if (CC->user.axlevel >= 6) {
-               snprintf(CC->upl_path, sizeof CC->upl_path, "./images/%s",
-                        basenm);
+               snprintf(CC->upl_path, sizeof CC->upl_path, 
+#ifndef HAVE_DATA_DIR
+                                "." /* FIXME: should here be CTDLDIR ? */
+#else
+                                DATA_DIR
+#endif
+                                "/images/%s",
+                                basenm);
        }
 
        if (!strcasecmp(basenm, "_userpic_")) {
                snprintf(CC->upl_path, sizeof CC->upl_path,
        }
 
        if (!strcasecmp(basenm, "_userpic_")) {
                snprintf(CC->upl_path, sizeof CC->upl_path,
-                        "./userpics/%ld.gif", CC->user.usernum);
+#ifndef HAVE_DATA_DIR
+                                "." /* FIXME: should here be CTDLDIR ? */
+#else
+                                DATA_DIR
+#endif
+                                "/userpics/%ld.gif", CC->user.usernum);
        }
 
        if ((!strcasecmp(basenm, "_floorpic_"))
            && (CC->user.axlevel >= 6)) {
                which_floor = extract_int(cmdbuf, 2);
                snprintf(CC->upl_path, sizeof CC->upl_path,
        }
 
        if ((!strcasecmp(basenm, "_floorpic_"))
            && (CC->user.axlevel >= 6)) {
                which_floor = extract_int(cmdbuf, 2);
                snprintf(CC->upl_path, sizeof CC->upl_path,
-                        "./images/floor.%d.gif", which_floor);
+#ifndef HAVE_DATA_DIR
+                                "." /* FIXME: should here be CTDLDIR ? */
+#else
+                                DATA_DIR
+#endif
+                                "/images/floor.%d.gif", which_floor);
        }
 
        if ((!strcasecmp(basenm, "_roompic_")) && (is_room_aide())) {
        }
 
        if ((!strcasecmp(basenm, "_roompic_")) && (is_room_aide())) {
@@ -601,8 +668,14 @@ void cmd_clos(void)
 
        if (CC->dl_is_net == 1) {
                CC->dl_is_net = 0;
 
        if (CC->dl_is_net == 1) {
                CC->dl_is_net = 0;
-               snprintf(buf, sizeof buf, "%s/network/spoolout/%s", CTDLDIR,
-                        CC->net_node);
+               snprintf(buf, sizeof buf, 
+#ifndef HAVE_SPOOL_DIR
+                                CTDLDIR
+#else
+                                SPOOL_DIR
+#endif
+                                "/network/spoolout/%s",
+                                CC->net_node);
                unlink(buf);
        }
 
                unlink(buf);
        }
 
@@ -759,8 +832,14 @@ void cmd_ndop(char *cmdbuf)
                return;
        }
 
                return;
        }
 
-       snprintf(pathname, sizeof pathname, "%s/network/spoolout/%s",
-                CTDLDIR, CC->net_node);
+       snprintf(pathname, sizeof pathname, 
+#ifndef HAVE_SPOOL_DIR
+                        CTDLDIR
+#else
+                        SPOOL_DIR
+#endif
+                        "/network/spoolout/%s",
+                        CC->net_node);
 
        /* first open the file in append mode in order to create a
         * zero-length file if it doesn't already exist 
 
        /* first open the file in append mode in order to create a
         * zero-length file if it doesn't already exist 
@@ -807,8 +886,13 @@ void cmd_nuop(char *cmdbuf)
        }
 
        snprintf(CC->upl_path, sizeof CC->upl_path,
        }
 
        snprintf(CC->upl_path, sizeof CC->upl_path,
-                "%s/network/spoolin/%s.%04lx.%04x",
-                CTDLDIR, CC->net_node, (long)getpid(), ++seq);
+#ifndef HAVE_SPOOL_DIR
+                        CTDLDIR
+#else
+                        SPOOL_DIR
+#endif
+                        "/network/spoolin/%s.%04lx.%04x",
+                        CC->net_node, (long)getpid(), ++seq);
 
        CC->upload_fp = fopen(CC->upl_path, "r");
        if (CC->upload_fp != NULL) {
 
        CC->upload_fp = fopen(CC->upl_path, "r");
        if (CC->upload_fp != NULL) {
index d55ddd1c3cb275cc2e30024f6255af31d54da811..51a61cdc3f95f46c003cb1eca5ff2281244aee31 100644 (file)
@@ -142,7 +142,13 @@ int alias(char *name)
        striplt(name);
        remove_any_whitespace_to_the_left_or_right_of_at_symbol(name);
 
        striplt(name);
        remove_any_whitespace_to_the_left_or_right_of_at_symbol(name);
 
-       fp = fopen("network/mail.aliases", "r");
+       fp = fopen(
+#ifndef HAVE_ETG_DIR
+                          "network/"
+#else
+                          ETC_DIR
+#endif
+                          "mail.aliases", "r");
        if (fp == NULL) {
                fp = fopen("/dev/null", "r");
        }
        if (fp == NULL) {
                fp = fopen("/dev/null", "r");
        }
@@ -237,7 +243,13 @@ void get_mm(void)
 {
        FILE *fp;
 
 {
        FILE *fp;
 
-       fp = fopen("citadel.control", "r");
+       fp = fopen(
+#ifndef HAVE_RUN_DIR
+                          "."
+#else
+                          RUN_DIR
+#endif
+                          "/citadel.control", "r");
        if (fp == NULL) {
                lprintf(CTDL_CRIT, "Cannot open citadel.control: %s\n",
                        strerror(errno));
        if (fp == NULL) {
                lprintf(CTDL_CRIT, "Cannot open citadel.control: %s\n",
                        strerror(errno));
@@ -2244,8 +2256,13 @@ long CtdlSubmitMsg(struct CtdlMessage *msg,      /* message to save */
                serialize_message(&smr, msg);
                if (smr.len > 0) {
                        snprintf(submit_filename, sizeof submit_filename,
                serialize_message(&smr, msg);
                if (smr.len > 0) {
                        snprintf(submit_filename, sizeof submit_filename,
-                               "./network/spoolin/netmail.%04lx.%04x.%04x",
-                               (long) getpid(), CC->cs_pid, ++seqnum);
+#ifndef HAVE_SPOOL_DIR
+                                        CTDLDIR
+#else
+                                        SPOOL_DIR
+#endif
+                                        "/network/spoolin/netmail.%04lx.%04x.%04x",
+                                        (long) getpid(), CC->cs_pid, ++seqnum);
                        network_fp = fopen(submit_filename, "wb+");
                        if (network_fp != NULL) {
                                fwrite(smr.ser, smr.len, 1, network_fp);
                        network_fp = fopen(submit_filename, "wb+");
                        if (network_fp != NULL) {
                                fwrite(smr.ser, smr.len, 1, network_fp);
index 4cc226dc3af00f3532d6f62eff4a8a9ea808894d..81b43db061dd2cb445c22ef5dc777113853d40d3 100644 (file)
@@ -1076,14 +1076,32 @@ void cmd_rdir(void)
                cprintf("%d not here.\n", ERROR + HIGHER_ACCESS_REQUIRED);
                return;
        }
                cprintf("%d not here.\n", ERROR + HIGHER_ACCESS_REQUIRED);
                return;
        }
-       cprintf("%d %s|%s/files/%s\n",
-       LISTING_FOLLOWS, config.c_fqdn, CTDLDIR, CC->room.QRdirname);
+       cprintf("%d %s|"
+#ifndef HAVE_DATA_DIR
+                       CTDLDIR
+#else
+                       DATA_DIR
+#endif
+                       "/files/%s\n",
+                       LISTING_FOLLOWS, config.c_fqdn, CC->room.QRdirname);
 
 
-        snprintf(buf, sizeof buf, "ls %s/files/%s  >%s 2> /dev/null",
-                CTDLDIR, CC->room.QRdirname, tempfilename);
-        system(buf);
+       snprintf(buf, sizeof buf, "ls "
+#ifndef HAVE_DATA_DIR
+                        CTDLDIR
+#else
+                        DATA_DIR
+#endif
+                        "/files/%s  >%s 2> /dev/null",
+                        CC->room.QRdirname, tempfilename);
+       system(buf);
 
 
-       snprintf(buf, sizeof buf, "%s/files/%s/filedir", CTDLDIR, CC->room.QRdirname);
+       snprintf(buf, sizeof buf, 
+#ifndef HAVE_DATA_DIR
+                        CTDLDIR
+#else
+                        DATA_DIR
+#endif
+                        "/files/%s/filedir", CC->room.QRdirname);
        fd = fopen(buf, "r");
        if (fd == NULL)
                fd = fopen("/dev/null", "r");
        fd = fopen(buf, "r");
        if (fd == NULL)
                fd = fopen("/dev/null", "r");
@@ -1092,8 +1110,14 @@ void cmd_rdir(void)
        while (fgets(flnm, sizeof flnm, ls) != NULL) {
                flnm[strlen(flnm) - 1] = 0;
                if (strcasecmp(flnm, "filedir")) {
        while (fgets(flnm, sizeof flnm, ls) != NULL) {
                flnm[strlen(flnm) - 1] = 0;
                if (strcasecmp(flnm, "filedir")) {
-                       snprintf(buf, sizeof buf, "%s/files/%s/%s",
-                               CTDLDIR, CC->room.QRdirname, flnm);
+                       snprintf(buf, sizeof buf, 
+#ifndef HAVE_DATA_DIR
+                                        CTDLDIR
+#else
+                                        DATA_DIR
+#endif
+                                        "/files/%s/%s",
+                                        CC->room.QRdirname, flnm);
                        stat(buf, &statbuf);
                        safestrncpy(comment, "", sizeof comment);
                        fseek(fd, 0L, 0);
                        stat(buf, &statbuf);
                        safestrncpy(comment, "", sizeof comment);
                        fseek(fd, 0L, 0);
@@ -1399,7 +1423,13 @@ void cmd_setr(char *args)
 
        /* Create a room directory if necessary */
        if (CC->room.QRflags & QR_DIRECTORY) {
 
        /* Create a room directory if necessary */
        if (CC->room.QRflags & QR_DIRECTORY) {
-               snprintf(buf, sizeof buf, "./files/%s", CC->room.QRdirname);
+               snprintf(buf, sizeof buf, 
+#ifndef HAVE_DATA_DIR
+                                CTDLDIR
+#else
+                                DATA_DIR
+#endif
+                                "/files/%s", CC->room.QRdirname);
                mkdir(buf, 0755);
        }
        snprintf(buf, sizeof buf, "%s> edited by %s\n", CC->room.QRname, CC->curr_user);
                mkdir(buf, 0755);
        }
        snprintf(buf, sizeof buf, "%s> edited by %s\n", CC->room.QRname, CC->curr_user);
index da37dd71c3ddd33fc443adc01bb60ed0cf136ffb..e5cab9aa8d54b02ebcead9c4768c3a6d57ea58a5 100644 (file)
@@ -111,7 +111,13 @@ void np_attach_to_server(void)
        int r;
 
        strcpy(hostbuf, UDS);   /* Only run on a unix domain socket */
        int r;
 
        strcpy(hostbuf, UDS);   /* Only run on a unix domain socket */
-       strcpy(portbuf, ".");   /* IPGM will refuse to run on the network */
+       strcpy(portbuf, 
+#ifndef HAVE_RUN_DIR
+                  "."  /* IPGM will refuse to run on the network */
+#else
+                  ""
+#endif
+                  );
        fprintf(stderr, "Attaching to server...\n");
        ipc = CtdlIPC_new(1, args, hostbuf, portbuf);
        if (!ipc) {
        fprintf(stderr, "Attaching to server...\n");
        ipc = CtdlIPC_new(1, args, hostbuf, portbuf);
        if (!ipc) {
index bac21b2b04ab67eec08f83c4512b84b6572967ae..c56258f34fbe63377112b7dc5a4f647f6bdb09e1 100644 (file)
@@ -61,8 +61,8 @@ void init_ssl(void)
        X509_NAME *name = NULL;
        FILE *fp;
 
        X509_NAME *name = NULL;
        FILE *fp;
 
-       if (!access("/var/run/egd-pool", F_OK))
-               RAND_egd("/var/run/egd-pool");
+       if (!access(EGD_POOL, F_OK))
+               RAND_egd(EGD_POOL);
 
        if (!RAND_status()) {
                lprintf(CTDL_CRIT,
 
        if (!RAND_status()) {
                lprintf(CTDL_CRIT,
index 867fabb22cc9c8db7929c3f7e72a6a5f51ec642e..f7594b520535b8bed984318108d02644ae94cddf 100644 (file)
@@ -723,8 +723,13 @@ void network_spool_msg(long msgnum, void *userdata) {
 
                                        /* write it to the spool file */
                                        snprintf(filename, sizeof filename,
 
                                        /* write it to the spool file */
                                        snprintf(filename, sizeof filename,
-                                               "./network/spoolout/%s",
-                                               mptr->remote_nodename);
+#ifndef HAVE_SPOOL_DIR
+                                                        CTDLDIR
+#else
+                                                        SPOOL_DIR
+#endif HAVE_SPOOL_DIR
+                                                        "/network/spoolout/%s",
+                                                        mptr->remote_nodename);
                                        fp = fopen(filename, "ab");
                                        if (fp != NULL) {
                                                fwrite(sermsg.ser,
                                        fp = fopen(filename, "ab");
                                        if (fp != NULL) {
                                                fwrite(sermsg.ser,
@@ -1371,7 +1376,12 @@ void network_process_buffer(char *buffer, long size) {
                                        strcpy(nexthop, msg->cm_fields['D']);
                                }
                                snprintf(filename, sizeof filename,
                                        strcpy(nexthop, msg->cm_fields['D']);
                                }
                                snprintf(filename, sizeof filename,
-                                       "./network/spoolout/%s", nexthop);
+#ifndef HAVE_SPOOL_DIR
+                                                CTDLDIR
+#else
+                                                SPOOL_DIR
+#endif HAVE_SPOOL_DIR
+                                                "/network/spoolout/%s", nexthop);
                                fp = fopen(filename, "ab");
                                if (fp != NULL) {
                                        fwrite(sermsg.ser,
                                fp = fopen(filename, "ab");
                                if (fp != NULL) {
                                        fwrite(sermsg.ser,
@@ -1537,13 +1547,24 @@ void network_do_spoolin(void) {
        struct dirent *d;
        char filename[256];
 
        struct dirent *d;
        char filename[256];
 
-       dp = opendir("./network/spoolin");
+       dp = opendir(
+#ifndef HAVE_SPOOL_DIR
+                                CTDLDIR
+#else
+                                SPOOL_DIR
+#endif HAVE_SPOOL_DIR
+                                "/network/spoolin");
        if (dp == NULL) return;
 
        while (d = readdir(dp), d != NULL) {
                if ((strcmp(d->d_name, ".")) && (strcmp(d->d_name, ".."))) {
                        snprintf(filename, sizeof filename,
        if (dp == NULL) return;
 
        while (d = readdir(dp), d != NULL) {
                if ((strcmp(d->d_name, ".")) && (strcmp(d->d_name, ".."))) {
                        snprintf(filename, sizeof filename,
-                               "./network/spoolin/%s", d->d_name);
+#ifndef HAVE_SPOOL_DIR
+                                        CTDLDIR
+#else
+                                        SPOOL_DIR
+#endif HAVE_SPOOL_DIR
+                                        "/network/spoolin/%s", d->d_name);
                        network_process_file(filename);
                }
        }
                        network_process_file(filename);
                }
        }
@@ -1563,14 +1584,25 @@ void network_purge_spoolout(void) {
        char nexthop[256];
        int i;
 
        char nexthop[256];
        int i;
 
-       dp = opendir("./network/spoolout");
+       dp = opendir(
+#ifndef HAVE_SPOOL_DIR
+                                CTDLDIR
+#else
+                                SPOOL_DIR
+#endif HAVE_SPOOL_DIR
+                                "/network/spoolout");
        if (dp == NULL) return;
 
        while (d = readdir(dp), d != NULL) {
                if (!strcmp(d->d_name, ".") || !strcmp(d->d_name, ".."))
                        continue;
                snprintf(filename, sizeof filename,
        if (dp == NULL) return;
 
        while (d = readdir(dp), d != NULL) {
                if (!strcmp(d->d_name, ".") || !strcmp(d->d_name, ".."))
                        continue;
                snprintf(filename, sizeof filename,
-                       "./network/spoolout/%s", d->d_name);
+#ifndef HAVE_SPOOL_DIR
+                                CTDLDIR
+#else
+                                SPOOL_DIR
+#endif HAVE_SPOOL_DIR
+                                "/network/spoolout/%s", d->d_name);
 
                strcpy(nexthop, "");
                i = is_valid_node(nexthop, NULL, d->d_name);
 
                strcpy(nexthop, "");
                i = is_valid_node(nexthop, NULL, d->d_name);
@@ -1655,8 +1687,15 @@ void receive_spool(int sock, char *remote_nodename) {
                lprintf(CTDL_NOTICE, "Received %ld octets from <%s>",
                                download_len, remote_nodename);
        lprintf(CTDL_DEBUG, "%s", buf);
                lprintf(CTDL_NOTICE, "Received %ld octets from <%s>",
                                download_len, remote_nodename);
        lprintf(CTDL_DEBUG, "%s", buf);
-       snprintf(buf, sizeof buf, "mv %s ./network/spoolin/%s.%ld",
-               tempfilename, remote_nodename, (long) getpid());
+       /* TODO: make move inline. forking is verry expensive. */
+       snprintf(buf, sizeof buf, "mv %s "
+#ifndef HAVE_SPOOL_DIR
+                        CTDLDIR
+#else
+                        SPOOL_DIR
+#endif HAVE_SPOOL_DIR
+                        "/network/spoolin/%s.%ld",
+                        tempfilename, remote_nodename, (long) getpid());
        system(buf);
 }
 
        system(buf);
 }
 
@@ -1681,7 +1720,13 @@ void transmit_spool(int sock, char *remote_nodename)
                return;
        }
 
                return;
        }
 
-       snprintf(sfname, sizeof sfname, "./network/spoolout/%s", remote_nodename);
+       snprintf(sfname, sizeof sfname, 
+#ifndef HAVE_SPOOL_DIR
+                        CTDLDIR
+#else
+                        SPOOL_DIR
+#endif HAVE_SPOOL_DIR
+                        "/network/spoolout/%s", remote_nodename);
        fd = open(sfname, O_RDONLY);
        if (fd < 0) {
                if (errno != ENOENT) {
        fd = open(sfname, O_RDONLY);
        if (fd < 0) {
                if (errno != ENOENT) {
@@ -1807,7 +1852,12 @@ void network_poll_other_citadel_nodes(int full_poll) {
                        poll = full_poll;
                        if (poll == 0) {
                                snprintf(spoolfile, sizeof spoolfile,
                        poll = full_poll;
                        if (poll == 0) {
                                snprintf(spoolfile, sizeof spoolfile,
-                                       "./network/spoolout/%s", node);
+#ifndef HAVE_SPOOL_DIR
+                                                CTDLDIR
+#else
+                                                SPOOL_DIR
+#endif
+                                                "/network/spoolout/%s", node);
                                if (access(spoolfile, R_OK) == 0) {
                                        poll = 1;
                                }
                                if (access(spoolfile, R_OK) == 0) {
                                        poll = 1;
                                }
index a1ff19cddcc999c12533618c4c7b67e659a913e4..0f0c7dbfec89ba67157e05f406b524fd8c7c0648 100644 (file)
@@ -1706,16 +1706,26 @@ char *serv_smtp_init(void)
                                NULL);
 
        CtdlRegisterServiceHook(0,                      /* local LMTP */
                                NULL);
 
        CtdlRegisterServiceHook(0,                      /* local LMTP */
-                               "lmtp.socket",
-                               lmtp_greeting,
-                               smtp_command_loop,
-                               NULL);
+#ifndef HAVE_RUN_DIR
+                                                       "."
+#else
+                                                       RUN_DIR
+#endif
+                                                       "/lmtp.socket",
+                                                       lmtp_greeting,
+                                                       smtp_command_loop,
+                                                       NULL);
 
        CtdlRegisterServiceHook(0,                      /* local LMTP */
 
        CtdlRegisterServiceHook(0,                      /* local LMTP */
-                               "lmtp-unfiltered.socket",
-                               lmtp_unfiltered_greeting,
-                               smtp_command_loop,
-                               NULL);
+#ifndef HAVE_RUN_DIR
+                                                       "."
+#else
+                                                       RUN_DIR
+#endif
+                                                       "/lmtp-unfiltered.socket",
+                                                       lmtp_unfiltered_greeting,
+                                                       smtp_command_loop,
+                                                       NULL);
 
        smtp_init_spoolout();
        CtdlRegisterSessionHook(smtp_do_queue, EVT_TIMER);
 
        smtp_init_spoolout();
        CtdlRegisterSessionHook(smtp_do_queue, EVT_TIMER);
index 6497d37871423acb56d9a9520b05e30272db795f..c29caa7aa9d5cca74356e3be3ed41e20017d3c05 100644 (file)
@@ -183,7 +183,12 @@ int main(int argc, char **argv)
         * Bind the server to a Unix-domain socket.
         */
        CtdlRegisterServiceHook(0,
         * Bind the server to a Unix-domain socket.
         */
        CtdlRegisterServiceHook(0,
-                               "citadel.socket",
+#ifndef HAVE_RUN_DIR
+                                        "."
+#else
+                                        RUN_DIR
+#endif
+                               "/citadel.socket",
                                citproto_begin_session,
                                do_command_loop,
                                do_async_loop);
                                citproto_begin_session,
                                do_command_loop,
                                do_async_loop);
index 1ff28e10f1718c90d7fd0253bcbd80db3a2aeea8..cfd3acc0769fa2a574b880b80d17e1a6b8241be8 100644 (file)
@@ -848,7 +848,13 @@ void write_config_to_disk(void)
        FILE *fp;
        int fd;
 
        FILE *fp;
        int fd;
 
-       if ((fd = creat("citadel.config", S_IRUSR | S_IWUSR)) == -1) {
+       if ((fd = creat(
+#ifndef HAVE_ETC_DIR
+                                       "."
+#else
+                                       ETC_DIR
+#endif
+                                       "/citadel.config", S_IRUSR | S_IWUSR)) == -1) {
                display_error("setup: cannot open citadel.config");
                cleanup(1);
        }
                display_error("setup: cannot open citadel.config");
                cleanup(1);
        }
@@ -992,7 +998,13 @@ int main(int argc, char *argv[])
         * completely new copy.
         */
 
         * completely new copy.
         */
 
-       if ((a = open("citadel.config", O_WRONLY | O_CREAT | O_APPEND,
+       if ((a = open(
+#ifndef HAVE_ETC_DIR
+                                 "."
+#else
+                                 ETC_DIR
+#endif
+                                 "/citadel.config", O_WRONLY | O_CREAT | O_APPEND,
                      S_IRUSR | S_IWUSR)) == -1) {
                display_error("setup: cannot append citadel.config");
                cleanup(errno);
                      S_IRUSR | S_IWUSR)) == -1) {
                display_error("setup: cannot append citadel.config");
                cleanup(errno);
@@ -1007,7 +1019,13 @@ int main(int argc, char *argv[])
        fclose(fp);
 
        /* now we re-open it, and read the old or blank configuration */
        fclose(fp);
 
        /* now we re-open it, and read the old or blank configuration */
-       fp = fopen("citadel.config", "rb");
+       fp = fopen(
+#ifndef HAVE_ETC_DIR
+                          "."
+#else
+                          ETC_DIR
+#endif
+                          "/citadel.config", "rb");
        if (fp == NULL) {
                display_error("setup: cannot open citadel.config");
                cleanup(errno);
        if (fp == NULL) {
                display_error("setup: cannot open citadel.config");
                cleanup(errno);
@@ -1193,7 +1211,13 @@ NEW_INST:
        chown(".", config.c_ctdluid, gid);
        sleep(1);
        progress("Setting file permissions", 1, 4);
        chown(".", config.c_ctdluid, gid);
        sleep(1);
        progress("Setting file permissions", 1, 4);
-       chown("citadel.config", config.c_ctdluid, gid);
+       chown(
+#ifndef HAVE_ETC_DIR
+                 "."
+#else
+                 ETC_DIR
+#endif
+                 "/citadel.config", config.c_ctdluid, gid);
        sleep(1);
        progress("Setting file permissions", 2, 4);
        snprintf(aaa, sizeof aaa,
        sleep(1);
        progress("Setting file permissions", 2, 4);
        snprintf(aaa, sizeof aaa,
@@ -1202,7 +1226,13 @@ NEW_INST:
        system(aaa);
        sleep(1);
        progress("Setting file permissions", 3, 4);
        system(aaa);
        sleep(1);
        progress("Setting file permissions", 3, 4);
-       chmod("citadel.config", S_IRUSR | S_IWUSR);
+       chmod(
+#ifndef HAVE_ETC_DIR
+                 "."
+#else
+                 ETC_DIR
+#endif
+                 "/citadel.config", S_IRUSR | S_IWUSR);
        sleep(1);
        progress("Setting file permissions", 4, 4);
 
        sleep(1);
        progress("Setting file permissions", 4, 4);
 
index 9f9588238fa82c0003e09b55e427cde86196ab20..c71e98f84b0891539c54b2ad9d8e5085eb344632 100644 (file)
@@ -756,11 +756,23 @@ int purge_user(char pname[])
        cdb_delete(CDB_USERS, usernamekey, strlen(usernamekey));
 
        /* remove the user's bio file */
        cdb_delete(CDB_USERS, usernamekey, strlen(usernamekey));
 
        /* remove the user's bio file */
-       snprintf(filename, sizeof filename, "./bio/%ld", usbuf.usernum);
+       snprintf(filename, sizeof filename, 
+#ifndef HAVE_DATA_DIR
+                        "." /* FIXME: should here be CTDLDIR ? */
+#else
+                        DATA_DIR
+#endif
+                        "/bio/%ld", usbuf.usernum);
        unlink(filename);
 
        /* remove the user's picture */
        unlink(filename);
 
        /* remove the user's picture */
-       snprintf(filename, sizeof filename, "./userpics/%ld.gif", usbuf.usernum);
+       snprintf(filename, sizeof filename, 
+#ifndef HAVE_DATA_DIR
+                        "." /* FIXME: should here be CTDLDIR ? */
+#else
+                        DATA_DIR
+#endif
+                        "/userpics/%ld.gif", usbuf.usernum);
        unlink(filename);
 
        return (0);
        unlink(filename);
 
        return (0);