configure.in (LIBMUDFLAPTH): Fix thinko.

* 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
This commit is contained in:
Per Bothner 2004-06-04 10:20:22 -07:00 committed by Per Bothner
parent 14bbffa1d2
commit b9d71ce3e4
6 changed files with 55 additions and 7 deletions

View File

@ -1,3 +1,13 @@
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> 2004-06-01 Andreas Jaeger <aj@suse.de>
* configure.in: Handle multilibs, support * configure.in: Handle multilibs, support

View File

@ -36,6 +36,9 @@
/* Define to 1 if you have the <memory.h> header file. */ /* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H #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> */ /* define if you have <pthread.h> */
#undef HAVE_PTHREAD_H #undef HAVE_PTHREAD_H
@ -63,12 +66,24 @@
/* Define to 1 if you have the <string.h> header file. */ /* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H #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. */ /* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H #undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/types.h> header file. */ /* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H #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 */ /* union semun defined in sys/ipc.h or sys/sem.h */
#undef HAVE_UNION_SEMUN #undef HAVE_UNION_SEMUN

12
libmudflap/configure vendored
View File

@ -3574,7 +3574,13 @@ done
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 do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if eval "test \"\${$as_ac_Header+set}\" = set"; then if eval "test \"\${$as_ac_Header+set}\" = set"; then
@ -4790,7 +4796,7 @@ test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
case $host in case $host in
*-*-irix6*) *-*-irix6*)
# Find out which ABI we are using. # 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 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5 (eval $ac_compile) 2>&5
ac_status=$? ac_status=$?
@ -5424,7 +5430,7 @@ fi
if test "x$ac_have_pthread_h" != ""; then if test "$ac_have_pthread_h" != ""; then
LIBMUDFLAPTH_TRUE= LIBMUDFLAPTH_TRUE=
LIBMUDFLAPTH_FALSE='#' LIBMUDFLAPTH_FALSE='#'
else else

View File

@ -62,7 +62,8 @@ AC_TRY_COMPILE([
[AC_MSG_RESULT(no) [AC_MSG_RESULT(no)
enable_shared=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) AC_CHECK_FUNCS(backtrace backtrace_symbols gettimeofday signal)
dnl Check for 64-bit stdio calls related to Large File Support dnl Check for 64-bit stdio calls related to Large File Support
@ -114,7 +115,7 @@ ac_have_pthread_h=yes
],[ ],[
ac_have_pthread_h= 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) AC_CHECK_LIB(dl, dlsym)

View File

@ -1206,6 +1206,8 @@ WRAPPER2(struct dirent *, readdir, DIR *dir)
} }
#endif #endif
#ifdef HAVE_SYS_SOCKET_H
#ifdef WRAP_recv #ifdef WRAP_recv
#include <sys/socket.h> #include <sys/socket.h>
WRAPPER2(int, recv, int s, void *buf, size_t len, int flags) WRAPPER2(int, recv, int s, void *buf, size_t len, int flags)
@ -1327,6 +1329,8 @@ WRAPPER2(int, connect, int sockfd, const struct sockaddr *addr,
} }
#endif #endif
#endif /* HAVE_SYS_SOCKET_H */
#ifdef WRAP_gethostname #ifdef WRAP_gethostname
WRAPPER2(int, gethostname, char *name, size_t len) WRAPPER2(int, gethostname, char *name, size_t len)
{ {
@ -1345,6 +1349,8 @@ WRAPPER2(int, sethostname, const char *name, size_t len)
} }
#endif #endif
#ifdef HAVE_NETDB_H
#ifdef WRAP_gethostbyname #ifdef WRAP_gethostbyname
#include <netdb.h> #include <netdb.h>
WRAPPER2(struct hostent *, gethostbyname, const char *name) WRAPPER2(struct hostent *, gethostbyname, const char *name)
@ -1425,6 +1431,10 @@ WRAPPER2(struct hostent *, gethostbyname, const char *name)
} }
#endif #endif
#endif /* HAVE_NETDB_H */
#ifdef SYS_WAIT_H
#ifdef WRAP_wait #ifdef WRAP_wait
#include <sys/wait.h> #include <sys/wait.h>
WRAPPER2(pid_t, wait, int *status) WRAPPER2(pid_t, wait, int *status)
@ -1449,6 +1459,8 @@ WRAPPER2(pid_t, waitpid, pid_t pid, int *status, int options)
} }
#endif #endif
#endif /* HAVE_SYS_WAIT_H */
#ifdef WRAP_popen #ifdef WRAP_popen
WRAPPER2(FILE *, popen, const char *command, const char *mode) WRAPPER2(FILE *, popen, const char *command, const char *mode)
{ {
@ -1651,6 +1663,8 @@ WRAPPER2(void *, dlsym, void *handle, char *symbol)
} }
#endif #endif
#if defined(HAVE_SYS_IPC_H) && defined(HAVE_SYS_SEM_H)
#ifdef WRAP_semop #ifdef WRAP_semop
#include <sys/ipc.h> #include <sys/ipc.h>
#include <sys/sem.h> #include <sys/sem.h>
@ -1765,3 +1779,5 @@ WRAPPER2(int, shmdt, const void *shmaddr)
} }
#endif #endif
#endif /* defined(HAVE_SYS_IPC_H) && defined(HAVE_SYS_SEM_H) */

View File

@ -296,7 +296,7 @@ options [] =
{"collect-stats", {"collect-stats",
"collect statistics on mudflap's operation", "collect statistics on mudflap's operation",
set_option, 1, &__mf_opts.collect_stats}, set_option, 1, &__mf_opts.collect_stats},
#if HAVE_SIGNAL #ifdef SIGUSR1
{"sigusr1-report", {"sigusr1-report",
"print report upon SIGUSR1", "print report upon SIGUSR1",
set_option, 1, &__mf_opts.sigusr1_report}, set_option, 1, &__mf_opts.sigusr1_report},
@ -2354,7 +2354,7 @@ __mf_sigusr1_respond ()
{ {
static int handler_installed; static int handler_installed;
#if HAVE_SIGNAL #ifdef SIGUSR1
/* Manage handler */ /* Manage handler */
if (__mf_opts.sigusr1_report && ! handler_installed) if (__mf_opts.sigusr1_report && ! handler_installed)
{ {