summaryrefslogtreecommitdiff
path: root/aconfigure
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2008-08-04 14:45:02 +0000
committerBenny Prijono <bennylp@teluu.com>2008-08-04 14:45:02 +0000
commit98dc6db2fc17166e04ffebe294928620eb604c44 (patch)
treea3685f58229daa98f678558ab6e035ba438188fc /aconfigure
parent789e340b0ef1e24911c9ed8ddc0507775f803129 (diff)
Fixed build error on FreeBSD (cannot use <netinet/ip.h> if <netinet/in_systm.h> is not included)
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2190 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'aconfigure')
-rwxr-xr-xaconfigure193
1 files changed, 126 insertions, 67 deletions
diff --git a/aconfigure b/aconfigure
index 4e8e2e50..065dbb91 100755
--- a/aconfigure
+++ b/aconfigure
@@ -5558,18 +5558,18 @@ _ACEOF
fi
-if test "${ac_cv_header_netinet_in_h+set}" = set; then
- echo "$as_me:$LINENO: checking for netinet/in.h" >&5
-echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6
-if test "${ac_cv_header_netinet_in_h+set}" = set; then
+if test "${ac_cv_header_netinet_in_systm_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for netinet/in_systm.h" >&5
+echo $ECHO_N "checking for netinet/in_systm.h... $ECHO_C" >&6
+if test "${ac_cv_header_netinet_in_systm_h+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
fi
-echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
-echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6
+echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_systm_h" >&5
+echo "${ECHO_T}$ac_cv_header_netinet_in_systm_h" >&6
else
# Is the header compilable?
-echo "$as_me:$LINENO: checking netinet/in.h usability" >&5
-echo $ECHO_N "checking netinet/in.h usability... $ECHO_C" >&6
+echo "$as_me:$LINENO: checking netinet/in_systm.h usability" >&5
+echo $ECHO_N "checking netinet/in_systm.h usability... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -5577,7 +5577,7 @@ cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
-#include <netinet/in.h>
+#include <netinet/in_systm.h>
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
@@ -5613,15 +5613,15 @@ 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 netinet/in.h presence" >&5
-echo $ECHO_N "checking netinet/in.h presence... $ECHO_C" >&6
+echo "$as_me:$LINENO: checking netinet/in_systm.h presence" >&5
+echo $ECHO_N "checking netinet/in_systm.h presence... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <netinet/in.h>
+#include <netinet/in_systm.h>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
@@ -5655,25 +5655,25 @@ echo "${ECHO_T}$ac_header_preproc" >&6
# So? What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
yes:no: )
- { echo "$as_me:$LINENO: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: netinet/in.h: proceeding with the compiler's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: netinet/in_systm.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: netinet/in_systm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: netinet/in_systm.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: netinet/in_systm.h: proceeding with the compiler's result" >&2;}
ac_header_preproc=yes
;;
no:yes:* )
- { echo "$as_me:$LINENO: WARNING: netinet/in.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: netinet/in.h: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: netinet/in.h: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: netinet/in.h: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: netinet/in.h: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: netinet/in.h: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: netinet/in.h: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: netinet/in.h: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: netinet/in.h: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: netinet/in.h: in the future, the compiler will take precedence" >&2;}
+ { echo "$as_me:$LINENO: WARNING: netinet/in_systm.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: netinet/in_systm.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: netinet/in_systm.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: netinet/in_systm.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: netinet/in_systm.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: netinet/in_systm.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: netinet/in_systm.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: netinet/in_systm.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: netinet/in_systm.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: netinet/in_systm.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: netinet/in_systm.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: netinet/in_systm.h: in the future, the compiler will take precedence" >&2;}
(
cat <<\_ASBOX
## ------------------------------------ ##
@@ -5684,37 +5684,37 @@ _ASBOX
sed "s/^/$as_me: WARNING: /" >&2
;;
esac
-echo "$as_me:$LINENO: checking for netinet/in.h" >&5
-echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6
-if test "${ac_cv_header_netinet_in_h+set}" = set; then
+echo "$as_me:$LINENO: checking for netinet/in_systm.h" >&5
+echo $ECHO_N "checking for netinet/in_systm.h... $ECHO_C" >&6
+if test "${ac_cv_header_netinet_in_systm_h+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_cv_header_netinet_in_h=$ac_header_preproc
+ ac_cv_header_netinet_in_systm_h=$ac_header_preproc
fi
-echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
-echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6
+echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_systm_h" >&5
+echo "${ECHO_T}$ac_cv_header_netinet_in_systm_h" >&6
fi
-if test $ac_cv_header_netinet_in_h = yes; then
+if test $ac_cv_header_netinet_in_systm_h = yes; then
cat >>confdefs.h <<\_ACEOF
-#define PJ_HAS_NETINET_IN_H 1
+#define PJ_HAS_NETINET_IN_SYSTM_H 1
_ACEOF
fi
-if test "${ac_cv_header_netinet_ip_h+set}" = set; then
- echo "$as_me:$LINENO: checking for netinet/ip.h" >&5
-echo $ECHO_N "checking for netinet/ip.h... $ECHO_C" >&6
-if test "${ac_cv_header_netinet_ip_h+set}" = set; then
+if test "${ac_cv_header_netinet_in_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for netinet/in.h" >&5
+echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6
+if test "${ac_cv_header_netinet_in_h+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
fi
-echo "$as_me:$LINENO: result: $ac_cv_header_netinet_ip_h" >&5
-echo "${ECHO_T}$ac_cv_header_netinet_ip_h" >&6
+echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
+echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6
else
# Is the header compilable?
-echo "$as_me:$LINENO: checking netinet/ip.h usability" >&5
-echo $ECHO_N "checking netinet/ip.h usability... $ECHO_C" >&6
+echo "$as_me:$LINENO: checking netinet/in.h usability" >&5
+echo $ECHO_N "checking netinet/in.h usability... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -5722,7 +5722,7 @@ cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
-#include <netinet/ip.h>
+#include <netinet/in.h>
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
@@ -5758,15 +5758,15 @@ 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 netinet/ip.h presence" >&5
-echo $ECHO_N "checking netinet/ip.h presence... $ECHO_C" >&6
+echo "$as_me:$LINENO: checking netinet/in.h presence" >&5
+echo $ECHO_N "checking netinet/in.h presence... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <netinet/ip.h>
+#include <netinet/in.h>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
@@ -5800,25 +5800,25 @@ echo "${ECHO_T}$ac_header_preproc" >&6
# So? What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
yes:no: )
- { echo "$as_me:$LINENO: WARNING: netinet/ip.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: netinet/ip.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: netinet/ip.h: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: netinet/ip.h: proceeding with the compiler's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: netinet/in.h: proceeding with the compiler's result" >&2;}
ac_header_preproc=yes
;;
no:yes:* )
- { echo "$as_me:$LINENO: WARNING: netinet/ip.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: netinet/ip.h: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: netinet/ip.h: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: netinet/ip.h: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: netinet/ip.h: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: netinet/ip.h: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: netinet/ip.h: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: netinet/ip.h: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: netinet/ip.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: netinet/ip.h: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: netinet/ip.h: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: netinet/ip.h: in the future, the compiler will take precedence" >&2;}
+ { echo "$as_me:$LINENO: WARNING: netinet/in.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: netinet/in.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: netinet/in.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: netinet/in.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: netinet/in.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: netinet/in.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: netinet/in.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: netinet/in.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: netinet/in.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: netinet/in.h: in the future, the compiler will take precedence" >&2;}
(
cat <<\_ASBOX
## ------------------------------------ ##
@@ -5829,17 +5829,76 @@ _ASBOX
sed "s/^/$as_me: WARNING: /" >&2
;;
esac
+echo "$as_me:$LINENO: checking for netinet/in.h" >&5
+echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6
+if test "${ac_cv_header_netinet_in_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_netinet_in_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
+echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6
+
+fi
+if test $ac_cv_header_netinet_in_h = yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define PJ_HAS_NETINET_IN_H 1
+_ACEOF
+
+fi
+
+
echo "$as_me:$LINENO: checking for netinet/ip.h" >&5
echo $ECHO_N "checking for netinet/ip.h... $ECHO_C" >&6
if test "${ac_cv_header_netinet_ip_h+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_cv_header_netinet_ip_h=$ac_header_preproc
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#if PJ_HAS_NETINET_IN_SYSTM_H
+ # include <netinet/in_systm.h>
+ #endif
+
+
+#include <netinet/ip.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_header_netinet_ip_h=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_netinet_ip_h=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_header_netinet_ip_h" >&5
echo "${ECHO_T}$ac_cv_header_netinet_ip_h" >&6
-
-fi
if test $ac_cv_header_netinet_ip_h = yes; then
cat >>confdefs.h <<\_ACEOF
#define PJ_HAS_NETINET_IP_H 1