configure now *requires* libresolv to be present.
authorArt Cancro <ajc@citadel.org>
Tue, 8 Jan 2008 19:33:13 +0000 (19:33 +0000)
committerArt Cancro <ajc@citadel.org>
Tue, 8 Jan 2008 19:33:13 +0000 (19:33 +0000)
citadel/configure.ac
citadel/domain.c

index cf892f6f0549bc9866db66a4a9e4e8c2b0030938..4880fd3064c86a272bd86a9ffb844b259ad1a1e1 100644 (file)
@@ -382,7 +382,12 @@ dnl (Linux shadow passwords)
        fi
 
 test -f /usr/local/lib/libresolv.a && LDFLAGS="$LDFLAGS -L/usr/local/lib"
-AC_CHECK_LIB(resolv, res_query, RESOLV="$RESOLV -lresolv")
+AC_CHECK_LIB(resolv, res_query,
+       RESOLV="$RESOLV -lresolv",
+       [
+               AC_MSG_ERROR(libresolv was not found.  Citadel requires the resolver library.)
+       ]
+)
 
 if test "x$with_ncurses" != "xno"; then
        AC_SEARCH_LIBS(tgetent, [ncurses curses termcap])
index da1c9bf9544020d10f4d0314435b31f55bc8222b..fda55e86e2f98d0dd0066d63412e96460b97cb7d 100644 (file)
@@ -102,9 +102,6 @@ int getmx(char *mxbuf, char *dest) {
                        u_char bytes[1024];
                        HEADER header;
     } answer;
-#else
-       char buf[SIZ];
-       FILE *fp;
 #endif
 
        int ret;
@@ -125,24 +122,7 @@ int getmx(char *mxbuf, char *dest) {
 
        /*
         * No smart-host?  Look up the best MX for a site.
-        */
-
-#ifndef HAVE_RESOLV_H
-
-       /*
-        * On systems with b0rken or non-standard resolver libraries, learn
-        * the MX records by calling "nslookup" from the command line.
-        *
-        * Someday.
-        *
-        */
-
-       return(0);
-
-#else /* HAVE_RESOLV_H */
-
-       /*
-        * Make a call to the standard resolver library.
+        * Make a call to the resolver library.
         */
 
        ret = res_query(
@@ -216,7 +196,6 @@ int getmx(char *mxbuf, char *dest) {
                        }
                }
        }
-#endif /* HAVE_RESOLV_H */
 
        /* Sort the MX records by preference */
        if (num_mxrecs > 1) {