Changeset 2190 for pjproject/trunk


Ignore:
Timestamp:
Aug 4, 2008 2:45:02 PM (16 years ago)
Author:
bennylp
Message:

Fixed build error on FreeBSD (cannot use <netinet/ip.h> if <netinet/in_systm.h> is not included)

Location:
pjproject/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/aconfigure

    r2182 r2190  
    55595559 
    55605560 
     5561if test "${ac_cv_header_netinet_in_systm_h+set}" = set; then 
     5562  echo "$as_me:$LINENO: checking for netinet/in_systm.h" >&5 
     5563echo $ECHO_N "checking for netinet/in_systm.h... $ECHO_C" >&6 
     5564if test "${ac_cv_header_netinet_in_systm_h+set}" = set; then 
     5565  echo $ECHO_N "(cached) $ECHO_C" >&6 
     5566fi 
     5567echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_systm_h" >&5 
     5568echo "${ECHO_T}$ac_cv_header_netinet_in_systm_h" >&6 
     5569else 
     5570  # Is the header compilable? 
     5571echo "$as_me:$LINENO: checking netinet/in_systm.h usability" >&5 
     5572echo $ECHO_N "checking netinet/in_systm.h usability... $ECHO_C" >&6 
     5573cat >conftest.$ac_ext <<_ACEOF 
     5574/* confdefs.h.  */ 
     5575_ACEOF 
     5576cat confdefs.h >>conftest.$ac_ext 
     5577cat >>conftest.$ac_ext <<_ACEOF 
     5578/* end confdefs.h.  */ 
     5579$ac_includes_default 
     5580#include <netinet/in_systm.h> 
     5581_ACEOF 
     5582rm -f conftest.$ac_objext 
     5583if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 
     5584  (eval $ac_compile) 2>conftest.er1 
     5585  ac_status=$? 
     5586  grep -v '^ *+' conftest.er1 >conftest.err 
     5587  rm -f conftest.er1 
     5588  cat conftest.err >&5 
     5589  echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     5590  (exit $ac_status); } && 
     5591         { ac_try='test -z "$ac_c_werror_flag" 
     5592                         || test ! -s conftest.err' 
     5593  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
     5594  (eval $ac_try) 2>&5 
     5595  ac_status=$? 
     5596  echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     5597  (exit $ac_status); }; } && 
     5598         { ac_try='test -s conftest.$ac_objext' 
     5599  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
     5600  (eval $ac_try) 2>&5 
     5601  ac_status=$? 
     5602  echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     5603  (exit $ac_status); }; }; then 
     5604  ac_header_compiler=yes 
     5605else 
     5606  echo "$as_me: failed program was:" >&5 
     5607sed 's/^/| /' conftest.$ac_ext >&5 
     5608 
     5609ac_header_compiler=no 
     5610fi 
     5611rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 
     5612echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 
     5613echo "${ECHO_T}$ac_header_compiler" >&6 
     5614 
     5615# Is the header present? 
     5616echo "$as_me:$LINENO: checking netinet/in_systm.h presence" >&5 
     5617echo $ECHO_N "checking netinet/in_systm.h presence... $ECHO_C" >&6 
     5618cat >conftest.$ac_ext <<_ACEOF 
     5619/* confdefs.h.  */ 
     5620_ACEOF 
     5621cat confdefs.h >>conftest.$ac_ext 
     5622cat >>conftest.$ac_ext <<_ACEOF 
     5623/* end confdefs.h.  */ 
     5624#include <netinet/in_systm.h> 
     5625_ACEOF 
     5626if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 
     5627  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 
     5628  ac_status=$? 
     5629  grep -v '^ *+' conftest.er1 >conftest.err 
     5630  rm -f conftest.er1 
     5631  cat conftest.err >&5 
     5632  echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     5633  (exit $ac_status); } >/dev/null; then 
     5634  if test -s conftest.err; then 
     5635    ac_cpp_err=$ac_c_preproc_warn_flag 
     5636    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag 
     5637  else 
     5638    ac_cpp_err= 
     5639  fi 
     5640else 
     5641  ac_cpp_err=yes 
     5642fi 
     5643if test -z "$ac_cpp_err"; then 
     5644  ac_header_preproc=yes 
     5645else 
     5646  echo "$as_me: failed program was:" >&5 
     5647sed 's/^/| /' conftest.$ac_ext >&5 
     5648 
     5649  ac_header_preproc=no 
     5650fi 
     5651rm -f conftest.err conftest.$ac_ext 
     5652echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 
     5653echo "${ECHO_T}$ac_header_preproc" >&6 
     5654 
     5655# So?  What about this header? 
     5656case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 
     5657  yes:no: ) 
     5658    { echo "$as_me:$LINENO: WARNING: netinet/in_systm.h: accepted by the compiler, rejected by the preprocessor!" >&5 
     5659echo "$as_me: WARNING: netinet/in_systm.h: accepted by the compiler, rejected by the preprocessor!" >&2;} 
     5660    { echo "$as_me:$LINENO: WARNING: netinet/in_systm.h: proceeding with the compiler's result" >&5 
     5661echo "$as_me: WARNING: netinet/in_systm.h: proceeding with the compiler's result" >&2;} 
     5662    ac_header_preproc=yes 
     5663    ;; 
     5664  no:yes:* ) 
     5665    { echo "$as_me:$LINENO: WARNING: netinet/in_systm.h: present but cannot be compiled" >&5 
     5666echo "$as_me: WARNING: netinet/in_systm.h: present but cannot be compiled" >&2;} 
     5667    { echo "$as_me:$LINENO: WARNING: netinet/in_systm.h:     check for missing prerequisite headers?" >&5 
     5668echo "$as_me: WARNING: netinet/in_systm.h:     check for missing prerequisite headers?" >&2;} 
     5669    { echo "$as_me:$LINENO: WARNING: netinet/in_systm.h: see the Autoconf documentation" >&5 
     5670echo "$as_me: WARNING: netinet/in_systm.h: see the Autoconf documentation" >&2;} 
     5671    { echo "$as_me:$LINENO: WARNING: netinet/in_systm.h:     section \"Present But Cannot Be Compiled\"" >&5 
     5672echo "$as_me: WARNING: netinet/in_systm.h:     section \"Present But Cannot Be Compiled\"" >&2;} 
     5673    { echo "$as_me:$LINENO: WARNING: netinet/in_systm.h: proceeding with the preprocessor's result" >&5 
     5674echo "$as_me: WARNING: netinet/in_systm.h: proceeding with the preprocessor's result" >&2;} 
     5675    { echo "$as_me:$LINENO: WARNING: netinet/in_systm.h: in the future, the compiler will take precedence" >&5 
     5676echo "$as_me: WARNING: netinet/in_systm.h: in the future, the compiler will take precedence" >&2;} 
     5677    ( 
     5678      cat <<\_ASBOX 
     5679## ------------------------------------ ## 
     5680## Report this to the pjproject lists.  ## 
     5681## ------------------------------------ ## 
     5682_ASBOX 
     5683    ) | 
     5684      sed "s/^/$as_me: WARNING:     /" >&2 
     5685    ;; 
     5686esac 
     5687echo "$as_me:$LINENO: checking for netinet/in_systm.h" >&5 
     5688echo $ECHO_N "checking for netinet/in_systm.h... $ECHO_C" >&6 
     5689if test "${ac_cv_header_netinet_in_systm_h+set}" = set; then 
     5690  echo $ECHO_N "(cached) $ECHO_C" >&6 
     5691else 
     5692  ac_cv_header_netinet_in_systm_h=$ac_header_preproc 
     5693fi 
     5694echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_systm_h" >&5 
     5695echo "${ECHO_T}$ac_cv_header_netinet_in_systm_h" >&6 
     5696 
     5697fi 
     5698if test $ac_cv_header_netinet_in_systm_h = yes; then 
     5699  cat >>confdefs.h <<\_ACEOF 
     5700#define PJ_HAS_NETINET_IN_SYSTM_H 1 
     5701_ACEOF 
     5702 
     5703fi 
     5704 
     5705 
    55615706if test "${ac_cv_header_netinet_in_h+set}" = set; then 
    55625707  echo "$as_me:$LINENO: checking for netinet/in.h" >&5 
     
    57045849 
    57055850 
    5706 if test "${ac_cv_header_netinet_ip_h+set}" = set; then 
    5707   echo "$as_me:$LINENO: checking for netinet/ip.h" >&5 
    5708 echo $ECHO_N "checking for netinet/ip.h... $ECHO_C" >&6 
    5709 if test "${ac_cv_header_netinet_ip_h+set}" = set; then 
    5710   echo $ECHO_N "(cached) $ECHO_C" >&6 
    5711 fi 
    5712 echo "$as_me:$LINENO: result: $ac_cv_header_netinet_ip_h" >&5 
    5713 echo "${ECHO_T}$ac_cv_header_netinet_ip_h" >&6 
    5714 else 
    5715   # Is the header compilable? 
    5716 echo "$as_me:$LINENO: checking netinet/ip.h usability" >&5 
    5717 echo $ECHO_N "checking netinet/ip.h usability... $ECHO_C" >&6 
    5718 cat >conftest.$ac_ext <<_ACEOF 
    5719 /* confdefs.h.  */ 
    5720 _ACEOF 
    5721 cat confdefs.h >>conftest.$ac_ext 
    5722 cat >>conftest.$ac_ext <<_ACEOF 
    5723 /* end confdefs.h.  */ 
    5724 $ac_includes_default 
    5725 #include <netinet/ip.h> 
    5726 _ACEOF 
    5727 rm -f conftest.$ac_objext 
    5728 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 
    5729   (eval $ac_compile) 2>conftest.er1 
    5730   ac_status=$? 
    5731   grep -v '^ *+' conftest.er1 >conftest.err 
    5732   rm -f conftest.er1 
    5733   cat conftest.err >&5 
    5734   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    5735   (exit $ac_status); } && 
    5736          { ac_try='test -z "$ac_c_werror_flag" 
    5737                          || test ! -s conftest.err' 
    5738   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    5739   (eval $ac_try) 2>&5 
    5740   ac_status=$? 
    5741   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    5742   (exit $ac_status); }; } && 
    5743          { ac_try='test -s conftest.$ac_objext' 
    5744   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    5745   (eval $ac_try) 2>&5 
    5746   ac_status=$? 
    5747   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    5748   (exit $ac_status); }; }; then 
    5749   ac_header_compiler=yes 
    5750 else 
    5751   echo "$as_me: failed program was:" >&5 
    5752 sed 's/^/| /' conftest.$ac_ext >&5 
    5753  
    5754 ac_header_compiler=no 
    5755 fi 
    5756 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 
    5757 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 
    5758 echo "${ECHO_T}$ac_header_compiler" >&6 
    5759  
    5760 # Is the header present? 
    5761 echo "$as_me:$LINENO: checking netinet/ip.h presence" >&5 
    5762 echo $ECHO_N "checking netinet/ip.h presence... $ECHO_C" >&6 
    5763 cat >conftest.$ac_ext <<_ACEOF 
    5764 /* confdefs.h.  */ 
    5765 _ACEOF 
    5766 cat confdefs.h >>conftest.$ac_ext 
    5767 cat >>conftest.$ac_ext <<_ACEOF 
    5768 /* end confdefs.h.  */ 
    5769 #include <netinet/ip.h> 
    5770 _ACEOF 
    5771 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 
    5772   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 
    5773   ac_status=$? 
    5774   grep -v '^ *+' conftest.er1 >conftest.err 
    5775   rm -f conftest.er1 
    5776   cat conftest.err >&5 
    5777   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    5778   (exit $ac_status); } >/dev/null; then 
    5779   if test -s conftest.err; then 
    5780     ac_cpp_err=$ac_c_preproc_warn_flag 
    5781     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag 
    5782   else 
    5783     ac_cpp_err= 
    5784   fi 
    5785 else 
    5786   ac_cpp_err=yes 
    5787 fi 
    5788 if test -z "$ac_cpp_err"; then 
    5789   ac_header_preproc=yes 
    5790 else 
    5791   echo "$as_me: failed program was:" >&5 
    5792 sed 's/^/| /' conftest.$ac_ext >&5 
    5793  
    5794   ac_header_preproc=no 
    5795 fi 
    5796 rm -f conftest.err conftest.$ac_ext 
    5797 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 
    5798 echo "${ECHO_T}$ac_header_preproc" >&6 
    5799  
    5800 # So?  What about this header? 
    5801 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 
    5802   yes:no: ) 
    5803     { echo "$as_me:$LINENO: WARNING: netinet/ip.h: accepted by the compiler, rejected by the preprocessor!" >&5 
    5804 echo "$as_me: WARNING: netinet/ip.h: accepted by the compiler, rejected by the preprocessor!" >&2;} 
    5805     { echo "$as_me:$LINENO: WARNING: netinet/ip.h: proceeding with the compiler's result" >&5 
    5806 echo "$as_me: WARNING: netinet/ip.h: proceeding with the compiler's result" >&2;} 
    5807     ac_header_preproc=yes 
    5808     ;; 
    5809   no:yes:* ) 
    5810     { echo "$as_me:$LINENO: WARNING: netinet/ip.h: present but cannot be compiled" >&5 
    5811 echo "$as_me: WARNING: netinet/ip.h: present but cannot be compiled" >&2;} 
    5812     { echo "$as_me:$LINENO: WARNING: netinet/ip.h:     check for missing prerequisite headers?" >&5 
    5813 echo "$as_me: WARNING: netinet/ip.h:     check for missing prerequisite headers?" >&2;} 
    5814     { echo "$as_me:$LINENO: WARNING: netinet/ip.h: see the Autoconf documentation" >&5 
    5815 echo "$as_me: WARNING: netinet/ip.h: see the Autoconf documentation" >&2;} 
    5816     { echo "$as_me:$LINENO: WARNING: netinet/ip.h:     section \"Present But Cannot Be Compiled\"" >&5 
    5817 echo "$as_me: WARNING: netinet/ip.h:     section \"Present But Cannot Be Compiled\"" >&2;} 
    5818     { echo "$as_me:$LINENO: WARNING: netinet/ip.h: proceeding with the preprocessor's result" >&5 
    5819 echo "$as_me: WARNING: netinet/ip.h: proceeding with the preprocessor's result" >&2;} 
    5820     { echo "$as_me:$LINENO: WARNING: netinet/ip.h: in the future, the compiler will take precedence" >&5 
    5821 echo "$as_me: WARNING: netinet/ip.h: in the future, the compiler will take precedence" >&2;} 
    5822     ( 
    5823       cat <<\_ASBOX 
    5824 ## ------------------------------------ ## 
    5825 ## Report this to the pjproject lists.  ## 
    5826 ## ------------------------------------ ## 
    5827 _ASBOX 
    5828     ) | 
    5829       sed "s/^/$as_me: WARNING:     /" >&2 
    5830     ;; 
    5831 esac 
    58325851echo "$as_me:$LINENO: checking for netinet/ip.h" >&5 
    58335852echo $ECHO_N "checking for netinet/ip.h... $ECHO_C" >&6 
     
    58355854  echo $ECHO_N "(cached) $ECHO_C" >&6 
    58365855else 
    5837   ac_cv_header_netinet_ip_h=$ac_header_preproc 
     5856  cat >conftest.$ac_ext <<_ACEOF 
     5857/* confdefs.h.  */ 
     5858_ACEOF 
     5859cat confdefs.h >>conftest.$ac_ext 
     5860cat >>conftest.$ac_ext <<_ACEOF 
     5861/* end confdefs.h.  */ 
     5862#if PJ_HAS_NETINET_IN_SYSTM_H 
     5863                  #     include <netinet/in_systm.h> 
     5864                  #endif 
     5865 
     5866 
     5867#include <netinet/ip.h> 
     5868_ACEOF 
     5869rm -f conftest.$ac_objext 
     5870if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 
     5871  (eval $ac_compile) 2>conftest.er1 
     5872  ac_status=$? 
     5873  grep -v '^ *+' conftest.er1 >conftest.err 
     5874  rm -f conftest.er1 
     5875  cat conftest.err >&5 
     5876  echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     5877  (exit $ac_status); } && 
     5878         { ac_try='test -z "$ac_c_werror_flag" 
     5879                         || test ! -s conftest.err' 
     5880  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
     5881  (eval $ac_try) 2>&5 
     5882  ac_status=$? 
     5883  echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     5884  (exit $ac_status); }; } && 
     5885         { ac_try='test -s conftest.$ac_objext' 
     5886  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
     5887  (eval $ac_try) 2>&5 
     5888  ac_status=$? 
     5889  echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     5890  (exit $ac_status); }; }; then 
     5891  ac_cv_header_netinet_ip_h=yes 
     5892else 
     5893  echo "$as_me: failed program was:" >&5 
     5894sed 's/^/| /' conftest.$ac_ext >&5 
     5895 
     5896ac_cv_header_netinet_ip_h=no 
     5897fi 
     5898rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 
    58385899fi 
    58395900echo "$as_me:$LINENO: result: $ac_cv_header_netinet_ip_h" >&5 
    58405901echo "${ECHO_T}$ac_cv_header_netinet_ip_h" >&6 
    5841  
    5842 fi 
    58435902if test $ac_cv_header_netinet_ip_h = yes; then 
    58445903  cat >>confdefs.h <<\_ACEOF 
  • pjproject/trunk/aconfigure.ac

    r2182 r2190  
    143143AC_CHECK_HEADER(malloc.h,[AC_DEFINE(PJ_HAS_MALLOC_H,1)]) 
    144144AC_CHECK_HEADER(netdb.h,[AC_DEFINE(PJ_HAS_NETDB_H,1)]) 
     145AC_CHECK_HEADER(netinet/in_systm.h,[AC_DEFINE(PJ_HAS_NETINET_IN_SYSTM_H,1)]) 
    145146AC_CHECK_HEADER(netinet/in.h,[AC_DEFINE(PJ_HAS_NETINET_IN_H,1)]) 
    146 AC_CHECK_HEADER(netinet/ip.h,[AC_DEFINE(PJ_HAS_NETINET_IP_H,1)]) 
     147AC_CHECK_HEADER(netinet/ip.h,[AC_DEFINE(PJ_HAS_NETINET_IP_H,1)],[], 
     148                 [#if PJ_HAS_NETINET_IN_SYSTM_H 
     149                  #     include <netinet/in_systm.h> 
     150                  #endif 
     151                 ]) 
    147152AC_CHECK_HEADER(ifaddrs.h,[AC_DEFINE(PJ_HAS_IFADDRS_H,1)]) 
    148153AC_CHECK_HEADER(semaphore.h,[AC_DEFINE(PJ_HAS_SEMAPHORE_H,1)]) 
  • pjproject/trunk/pjlib/include/pj/compat/os_auto.h.in

    r2160 r2190  
    5151#undef PJ_HAS_MALLOC_H 
    5252#undef PJ_HAS_NETDB_H 
     53#undef PJ_HAS_NETINET_IN_SYSTM_H 
    5354#undef PJ_HAS_NETINET_IN_H 
    5455#undef PJ_HAS_NETINET_IP_H 
  • pjproject/trunk/pjlib/include/pj/compat/socket.h

    r2039 r2190  
    9090#if defined(PJ_HAS_NETINET_IN_H) && PJ_HAS_NETINET_IN_H != 0 
    9191#  include <netinet/in.h> 
     92#endif 
     93 
     94#if defined(PJ_HAS_NETINET_IN_SYSTM_H) && PJ_HAS_NETINET_IN_SYSTM_H != 0 
     95/* Required to include netinet/ip.h in FreeBSD 7.0 */ 
     96#  include <netinet/in_systm.h> 
    9297#endif 
    9398 
Note: See TracChangeset for help on using the changeset viewer.