]> jfr.im git - irc/ircd-hybrid/bopm.git/commitdiff
configure.in:
authorandy <redacted>
Tue, 19 Feb 2002 23:00:40 +0000 (23:00 +0000)
committerandy <redacted>
Tue, 19 Feb 2002 23:00:40 +0000 (23:00 +0000)
Fix sys/poll.h check

configure
configure.in
setup.h.in

index 6fe39010d6a535617b6e8dab4aea04fd902b2d60..21650f60530133e9464f2c795d9680d40d802f15 100755 (executable)
--- a/configure
+++ b/configure
@@ -2293,23 +2293,26 @@ fi
 
 done
 
-if test "${ac_cv_header_sys_poll_h+set}" = set; then
-  echo "$as_me:$LINENO: checking for sys/poll.h" >&5
-echo $ECHO_N "checking for sys/poll.h... $ECHO_C" >&6
-if test "${ac_cv_header_sys_poll_h+set}" = set; then
+for ac_header in sys/poll.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 fi
-echo "$as_me:$LINENO: result: $ac_cv_header_sys_poll_h" >&5
-echo "${ECHO_T}$ac_cv_header_sys_poll_h" >&6
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 else
   # Is the header compilable?
-echo "$as_me:$LINENO: checking sys/poll.h usability" >&5
-echo $ECHO_N "checking sys/poll.h usability... $ECHO_C" >&6
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
 cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
 $ac_includes_default
-#include <sys/poll.h>
+#include <$ac_header>
 _ACEOF
 rm -f conftest.$ac_objext
 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
@@ -2334,12 +2337,12 @@ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 echo "${ECHO_T}$ac_header_compiler" >&6
 
 # Is the header present?
-echo "$as_me:$LINENO: checking sys/poll.h presence" >&5
-echo $ECHO_N "checking sys/poll.h presence... $ECHO_C" >&6
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
 cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
-#include <sys/poll.h>
+#include <$ac_header>
 _ACEOF
 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
@@ -2371,35 +2374,40 @@ echo "${ECHO_T}$ac_header_preproc" >&6
 # So?  What about this header?
 case $ac_header_compiler:$ac_header_preproc in
   yes:no )
-    { echo "$as_me:$LINENO: WARNING: sys/poll.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: sys/poll.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: sys/poll.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: sys/poll.h: proceeding with the preprocessor's result" >&2;};;
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
   no:yes )
-    { echo "$as_me:$LINENO: WARNING: sys/poll.h: present but cannot be compiled." >&5
-echo "$as_me: WARNING: sys/poll.h: present but cannot be compiled." >&2;}
-    { echo "$as_me:$LINENO: WARNING: sys/poll.h: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: sys/poll.h: check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: sys/poll.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: sys/poll.h: proceeding with the preprocessor's result" >&2;};;
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled." >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled." >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
 esac
-echo "$as_me:$LINENO: checking for sys/poll.h" >&5
-echo $ECHO_N "checking for sys/poll.h... $ECHO_C" >&6
-if test "${ac_cv_header_sys_poll_h+set}" = set; then
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  ac_cv_header_sys_poll_h=$ac_header_preproc
+  eval "$as_ac_Header=$ac_header_preproc"
 fi
-echo "$as_me:$LINENO: result: $ac_cv_header_sys_poll_h" >&5
-echo "${ECHO_T}$ac_cv_header_sys_poll_h" >&6
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
 fi
-if test $ac_cv_header_sys_poll_h = yes; then
-  have_poll_sys_h=yes
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+ have_poll_sys_h=yes
 else
   have_sys_poll_h=no
 fi
 
+done
+
 fi
 
 if test "$with_unreal" = "yes"; then
index e212a360ea64992e6ef67563b307c2ae865293cb..b555a13bab772cca75a0a77a443449c34328d5d5 100644 (file)
@@ -20,7 +20,7 @@ if test "$with_select" = "yes"; then
  echo "use of select() forced, skipping poll() checks..."
  AC_DEFINE(WITH_SELECT, 1, [Define if you wish to force use of select() even when poll() may be present])
 else
- AC_CHECK_HEADER(sys/poll.h, have_poll_sys_h=yes, have_sys_poll_h=no)
+ AC_CHECK_HEADERS(sys/poll.h, have_poll_sys_h=yes, have_sys_poll_h=no)
 fi
 
 if test "$with_unreal" = "yes"; then
index c2c6e04701357b651244fc9d72b06642a2eb893b..cd6126845d46230aeb7c79db19f3b10eeb92c2ce 100644 (file)
@@ -36,6 +36,9 @@
 /* Define if you have the `strstr' function. */
 #undef HAVE_STRSTR
 
+/* Define if you have the <sys/poll.h> header file. */
+#undef HAVE_SYS_POLL_H
+
 /* Define if you have the <sys/stat.h> header file. */
 #undef HAVE_SYS_STAT_H