* configure.in (LIBMUDFLAPTH): Fix thinko.
* configure.in: Check for more headers.
* mf-hooks2.c: Conditionalize on HAVE_SYS_SOCKET_H etc.
* mf-runtime.c: In two places conditionalize on SIUSR1 rather than
HAVE_SIGNAL as mingw has signal.h but not SIUSR1.
From-SVN: r82627
+2004-06-04 Per Bothner <per@bothner.com>
+
+ * configure.in (LIBMUDFLAPTH): Fix thinko.
+
+ * configure.in: Check for more headers.
+ * mf-hooks2.c: Conditionalize on HAVE_SYS_SOCKET_H etc.
+
+ * mf-runtime.c: In two places conditionalize on SIUSR1 rather than
+ HAVE_SIGNAL as mingw has signal.h but not SIUSR1.
+
2004-06-01 Andreas Jaeger <aj@suse.de>
* configure.in: Handle multilibs, support
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
+/* Define to 1 if you have the <netdb.h> header file. */
+#undef HAVE_NETDB_H
+
/* define if you have <pthread.h> */
#undef HAVE_PTHREAD_H
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
+/* Define to 1 if you have the <sys/ipc.h> header file. */
+#undef HAVE_SYS_IPC_H
+
+/* Define to 1 if you have the <sys/sem.h> header file. */
+#undef HAVE_SYS_SEM_H
+
+/* Define to 1 if you have the <sys/socket.h> header file. */
+#undef HAVE_SYS_SOCKET_H
+
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
+/* Define to 1 if you have the <sys/wait.h> header file. */
+#undef HAVE_SYS_WAIT_H
+
/* union semun defined in sys/ipc.h or sys/sem.h */
#undef HAVE_UNION_SEMUN
-for ac_header in stdint.h execinfo.h signal.h dlfcn.h
+
+
+
+
+
+for ac_header in stdint.h execinfo.h signal.h dlfcn.h \
+ netdb.h sys/ipc.h sys/sem.h sys/wait.h sys/socket.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if eval "test \"\${$as_ac_Header+set}\" = set"; then
case $host in
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 4793 "configure"' > conftest.$ac_ext
+ echo '#line 4799 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
-if test "x$ac_have_pthread_h" != ""; then
+if test "$ac_have_pthread_h" != ""; then
LIBMUDFLAPTH_TRUE=
LIBMUDFLAPTH_FALSE='#'
else
[AC_MSG_RESULT(no)
enable_shared=no])
-AC_CHECK_HEADERS(stdint.h execinfo.h signal.h dlfcn.h)
+AC_CHECK_HEADERS(stdint.h execinfo.h signal.h dlfcn.h \
+ netdb.h sys/ipc.h sys/sem.h sys/wait.h sys/socket.h)
AC_CHECK_FUNCS(backtrace backtrace_symbols gettimeofday signal)
dnl Check for 64-bit stdio calls related to Large File Support
],[
ac_have_pthread_h=
])
-AM_CONDITIONAL(LIBMUDFLAPTH, [test "x$ac_have_pthread_h" != ""])
+AM_CONDITIONAL(LIBMUDFLAPTH, [test "$ac_have_pthread_h" != ""])
AC_CHECK_LIB(dl, dlsym)
}
#endif
+#ifdef HAVE_SYS_SOCKET_H
+
#ifdef WRAP_recv
#include <sys/socket.h>
WRAPPER2(int, recv, int s, void *buf, size_t len, int flags)
}
#endif
+#endif /* HAVE_SYS_SOCKET_H */
+
#ifdef WRAP_gethostname
WRAPPER2(int, gethostname, char *name, size_t len)
{
}
#endif
+#ifdef HAVE_NETDB_H
+
#ifdef WRAP_gethostbyname
#include <netdb.h>
WRAPPER2(struct hostent *, gethostbyname, const char *name)
}
#endif
+#endif /* HAVE_NETDB_H */
+
+#ifdef SYS_WAIT_H
+
#ifdef WRAP_wait
#include <sys/wait.h>
WRAPPER2(pid_t, wait, int *status)
}
#endif
+#endif /* HAVE_SYS_WAIT_H */
+
#ifdef WRAP_popen
WRAPPER2(FILE *, popen, const char *command, const char *mode)
{
}
#endif
+#if defined(HAVE_SYS_IPC_H) && defined(HAVE_SYS_SEM_H)
+
#ifdef WRAP_semop
#include <sys/ipc.h>
#include <sys/sem.h>
}
#endif
+#endif /* defined(HAVE_SYS_IPC_H) && defined(HAVE_SYS_SEM_H) */
+
{"collect-stats",
"collect statistics on mudflap's operation",
set_option, 1, &__mf_opts.collect_stats},
-#if HAVE_SIGNAL
+#ifdef SIGUSR1
{"sigusr1-report",
"print report upon SIGUSR1",
set_option, 1, &__mf_opts.sigusr1_report},
{
static int handler_installed;
-#if HAVE_SIGNAL
+#ifdef SIGUSR1
/* Manage handler */
if (__mf_opts.sigusr1_report && ! handler_installed)
{