roken: Export more snprintf symbols
[openafs.git] / acinclude.m4
index cc97b6a..1a3cde0 100644 (file)
@@ -1215,7 +1215,8 @@ AC_CHECK_HEADERS(windows.h direct.h sys/ipc.h sys/resource.h sys/un.h)
 AC_CHECK_HEADERS(security/pam_modules.h ucontext.h regex.h sys/statvfs.h sys/statfs.h sys/bitypes.h)
 AC_CHECK_HEADERS(sys/socket.h sys/ioctl.h errno.h time.h syslog.h)
 AC_CHECK_HEADERS(linux/errqueue.h,,,[#include <linux/types.h>])
-AC_CHECK_HEADERS(et/com_err.h)
+AC_CHECK_HEADERS(et/com_err.h stdio_ext.h)
+AC_CHECK_HEADERS(ncurses.h curses.h)
 
 AC_CHECK_TYPES([fsblkcnt_t],,,[
 #include <sys/types.h>
@@ -1230,6 +1231,17 @@ AC_CHECK_TYPES([fsblkcnt_t],,,[
 #endif
 ])
 
+dnl check for curses-lib
+save_LIBS=$LIBS
+AC_CHECK_LIB( [ncurses], [setupterm],
+[LIB_curses=-lncurses],
+    [AC_CHECK_LIB([Hcurses], [setupterm], [LIB_curses=-lHcurses],
+        [AC_CHECK_LIB([curses], [setupterm], [LIB_curses=-lcurses])
+    ])
+])
+LIBS=$save_LIBS
+AC_SUBST(LIB_curses)
+
 OPENAFS_TEST_PACKAGE(libintl,[#include <libintl.h>],[-lintl],,,INTL)
 
 dnl Don't build PAM on IRIX; the interface doesn't work for us.
@@ -1279,12 +1291,9 @@ AC_CHECK_FUNCS([ \
        setprogname \
        setvbuf \
        sigaction \
-       snprintf \
        strcasestr \
        strerror \
        timegm \
-       vsnprintf \
-       vsyslog \
 ])
 
 OPENAFS_ROKEN()
@@ -1310,8 +1319,17 @@ AC_CHECK_FUNCS([ \
        strsep \
 ])
 
-dnl Functions that we're going to try and get from libroken
+dnl Functions that are in objects that we always build from libroken
+AC_CHECK_FUNCS([ \
+       asprintf \
+       asnprintf \
+       vasprintf \
+       vasnprintf \
+       vsnprintf \
+       snprintf \
+])
 
+dnl Functions that we're going to try and get from libroken
 AC_REPLACE_FUNCS([ \
        daemon \
        ecalloc \
@@ -1321,12 +1339,15 @@ AC_REPLACE_FUNCS([ \
        errx \
        getopt \
        getprogname \
+       mkstemp \
        strcasecmp \
        strlcat \
        strnlen \
        strlcpy \
+       strsep \
        verr \
        verrx \
+       vsyslog \
        vwarn \
        vwarnx \
        warn \
@@ -1425,6 +1446,7 @@ AC_CHECK_TYPES([struct addrinfo], [], [], [
 #include <netdb.h>
 #endif
 ])
+AC_CHECK_TYPES([long long], [], [], [])
 
 AC_SIZEOF_TYPE(long)
 
@@ -1575,3 +1597,17 @@ dnl Eventually, this will look for the system one, or for OpenSSL
 LIB_hcrypto="-lafshcrypto"
 AC_SUBST(LIB_hcrypto)
 ])
+
+AC_DEFUN([SUMMARY], [
+    # Print a configuration summary
+echo 
+echo "**************************************"
+echo configure summary
+echo
+AS_IF([test $LIB_curses],[
+echo "LIB_curses :                $LIB_curses" ],[
+echo "XXX LIB_curses  not found! not building scout and afsmonitor!"
+])
+echo 
+echo "**************************************"
+])