Ignore:
Timestamp:
Mar 25, 2008 1:53:16 PM (17 years ago)
Author:
bennylp
Message:

Fixed autoconf configure warning when detecting net/if.h on MacOS X

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/aconfigure

    r1871 r1891  
    58485848 
    58495849 
    5850 if test "${ac_cv_header_net_if_h+set}" = set; then 
    5851   echo "$as_me:$LINENO: checking for net/if.h" >&5 
    5852 echo $ECHO_N "checking for net/if.h... $ECHO_C" >&6 
    5853 if test "${ac_cv_header_net_if_h+set}" = set; then 
    5854   echo $ECHO_N "(cached) $ECHO_C" >&6 
    5855 fi 
    5856 echo "$as_me:$LINENO: result: $ac_cv_header_net_if_h" >&5 
    5857 echo "${ECHO_T}$ac_cv_header_net_if_h" >&6 
    5858 else 
    5859   # Is the header compilable? 
    5860 echo "$as_me:$LINENO: checking net/if.h usability" >&5 
    5861 echo $ECHO_N "checking net/if.h usability... $ECHO_C" >&6 
    5862 cat >conftest.$ac_ext <<_ACEOF 
    5863 /* confdefs.h.  */ 
    5864 _ACEOF 
    5865 cat confdefs.h >>conftest.$ac_ext 
    5866 cat >>conftest.$ac_ext <<_ACEOF 
    5867 /* end confdefs.h.  */ 
    5868 $ac_includes_default 
    5869 #include <net/if.h> 
    5870 _ACEOF 
    5871 rm -f conftest.$ac_objext 
    5872 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 
    5873   (eval $ac_compile) 2>conftest.er1 
    5874   ac_status=$? 
    5875   grep -v '^ *+' conftest.er1 >conftest.err 
    5876   rm -f conftest.er1 
    5877   cat conftest.err >&5 
    5878   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    5879   (exit $ac_status); } && 
    5880          { ac_try='test -z "$ac_c_werror_flag" 
    5881                          || test ! -s conftest.err' 
    5882   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    5883   (eval $ac_try) 2>&5 
    5884   ac_status=$? 
    5885   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    5886   (exit $ac_status); }; } && 
    5887          { ac_try='test -s conftest.$ac_objext' 
    5888   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    5889   (eval $ac_try) 2>&5 
    5890   ac_status=$? 
    5891   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    5892   (exit $ac_status); }; }; then 
    5893   ac_header_compiler=yes 
    5894 else 
    5895   echo "$as_me: failed program was:" >&5 
    5896 sed 's/^/| /' conftest.$ac_ext >&5 
    5897  
    5898 ac_header_compiler=no 
    5899 fi 
    5900 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 
    5901 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 
    5902 echo "${ECHO_T}$ac_header_compiler" >&6 
    5903  
    5904 # Is the header present? 
    5905 echo "$as_me:$LINENO: checking net/if.h presence" >&5 
    5906 echo $ECHO_N "checking net/if.h presence... $ECHO_C" >&6 
    5907 cat >conftest.$ac_ext <<_ACEOF 
    5908 /* confdefs.h.  */ 
    5909 _ACEOF 
    5910 cat confdefs.h >>conftest.$ac_ext 
    5911 cat >>conftest.$ac_ext <<_ACEOF 
    5912 /* end confdefs.h.  */ 
    5913 #include <net/if.h> 
    5914 _ACEOF 
    5915 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 
    5916   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 
    5917   ac_status=$? 
    5918   grep -v '^ *+' conftest.er1 >conftest.err 
    5919   rm -f conftest.er1 
    5920   cat conftest.err >&5 
    5921   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    5922   (exit $ac_status); } >/dev/null; then 
    5923   if test -s conftest.err; then 
    5924     ac_cpp_err=$ac_c_preproc_warn_flag 
    5925     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag 
    5926   else 
    5927     ac_cpp_err= 
    5928   fi 
    5929 else 
    5930   ac_cpp_err=yes 
    5931 fi 
    5932 if test -z "$ac_cpp_err"; then 
    5933   ac_header_preproc=yes 
    5934 else 
    5935   echo "$as_me: failed program was:" >&5 
    5936 sed 's/^/| /' conftest.$ac_ext >&5 
    5937  
    5938   ac_header_preproc=no 
    5939 fi 
    5940 rm -f conftest.err conftest.$ac_ext 
    5941 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 
    5942 echo "${ECHO_T}$ac_header_preproc" >&6 
    5943  
    5944 # So?  What about this header? 
    5945 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 
    5946   yes:no: ) 
    5947     { echo "$as_me:$LINENO: WARNING: net/if.h: accepted by the compiler, rejected by the preprocessor!" >&5 
    5948 echo "$as_me: WARNING: net/if.h: accepted by the compiler, rejected by the preprocessor!" >&2;} 
    5949     { echo "$as_me:$LINENO: WARNING: net/if.h: proceeding with the compiler's result" >&5 
    5950 echo "$as_me: WARNING: net/if.h: proceeding with the compiler's result" >&2;} 
    5951     ac_header_preproc=yes 
    5952     ;; 
    5953   no:yes:* ) 
    5954     { echo "$as_me:$LINENO: WARNING: net/if.h: present but cannot be compiled" >&5 
    5955 echo "$as_me: WARNING: net/if.h: present but cannot be compiled" >&2;} 
    5956     { echo "$as_me:$LINENO: WARNING: net/if.h:     check for missing prerequisite headers?" >&5 
    5957 echo "$as_me: WARNING: net/if.h:     check for missing prerequisite headers?" >&2;} 
    5958     { echo "$as_me:$LINENO: WARNING: net/if.h: see the Autoconf documentation" >&5 
    5959 echo "$as_me: WARNING: net/if.h: see the Autoconf documentation" >&2;} 
    5960     { echo "$as_me:$LINENO: WARNING: net/if.h:     section \"Present But Cannot Be Compiled\"" >&5 
    5961 echo "$as_me: WARNING: net/if.h:     section \"Present But Cannot Be Compiled\"" >&2;} 
    5962     { echo "$as_me:$LINENO: WARNING: net/if.h: proceeding with the preprocessor's result" >&5 
    5963 echo "$as_me: WARNING: net/if.h: proceeding with the preprocessor's result" >&2;} 
    5964     { echo "$as_me:$LINENO: WARNING: net/if.h: in the future, the compiler will take precedence" >&5 
    5965 echo "$as_me: WARNING: net/if.h: in the future, the compiler will take precedence" >&2;} 
    5966     ( 
    5967       cat <<\_ASBOX 
    5968 ## ------------------------------------ ## 
    5969 ## Report this to the pjproject lists.  ## 
    5970 ## ------------------------------------ ## 
    5971 _ASBOX 
    5972     ) | 
    5973       sed "s/^/$as_me: WARNING:     /" >&2 
    5974     ;; 
    5975 esac 
    5976 echo "$as_me:$LINENO: checking for net/if.h" >&5 
    5977 echo $ECHO_N "checking for net/if.h... $ECHO_C" >&6 
    5978 if test "${ac_cv_header_net_if_h+set}" = set; then 
    5979   echo $ECHO_N "(cached) $ECHO_C" >&6 
    5980 else 
    5981   ac_cv_header_net_if_h=$ac_header_preproc 
    5982 fi 
    5983 echo "$as_me:$LINENO: result: $ac_cv_header_net_if_h" >&5 
    5984 echo "${ECHO_T}$ac_cv_header_net_if_h" >&6 
    5985  
    5986 fi 
    5987 if test $ac_cv_header_net_if_h = yes; then 
    5988   cat >>confdefs.h <<\_ACEOF 
    5989 #define PJ_HAS_NET_IF_H 1 
    5990 _ACEOF 
    5991  
    5992 fi 
    5993  
    5994  
    59955850if test "${ac_cv_header_ifaddrs_h+set}" = set; then 
    59965851  echo "$as_me:$LINENO: checking for ifaddrs.h" >&5 
     
    90348889fi 
    90358890 
     8891 
     8892 
     8893for ac_header in net/if.h 
     8894do 
     8895as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` 
     8896echo "$as_me:$LINENO: checking for $ac_header" >&5 
     8897echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 
     8898if eval "test \"\${$as_ac_Header+set}\" = set"; then 
     8899  echo $ECHO_N "(cached) $ECHO_C" >&6 
     8900else 
     8901  cat >conftest.$ac_ext <<_ACEOF 
     8902/* confdefs.h.  */ 
     8903_ACEOF 
     8904cat confdefs.h >>conftest.$ac_ext 
     8905cat >>conftest.$ac_ext <<_ACEOF 
     8906/* end confdefs.h.  */ 
     8907#if PJ_HAS_SYS_SOCKET_H 
     8908                  #     include <sys/socket.h> 
     8909                  #endif 
     8910 
     8911 
     8912#include <$ac_header> 
     8913_ACEOF 
     8914rm -f conftest.$ac_objext 
     8915if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 
     8916  (eval $ac_compile) 2>conftest.er1 
     8917  ac_status=$? 
     8918  grep -v '^ *+' conftest.er1 >conftest.err 
     8919  rm -f conftest.er1 
     8920  cat conftest.err >&5 
     8921  echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     8922  (exit $ac_status); } && 
     8923         { ac_try='test -z "$ac_c_werror_flag" 
     8924                         || test ! -s conftest.err' 
     8925  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
     8926  (eval $ac_try) 2>&5 
     8927  ac_status=$? 
     8928  echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     8929  (exit $ac_status); }; } && 
     8930         { ac_try='test -s conftest.$ac_objext' 
     8931  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
     8932  (eval $ac_try) 2>&5 
     8933  ac_status=$? 
     8934  echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     8935  (exit $ac_status); }; }; then 
     8936  eval "$as_ac_Header=yes" 
     8937else 
     8938  echo "$as_me: failed program was:" >&5 
     8939sed 's/^/| /' conftest.$ac_ext >&5 
     8940 
     8941eval "$as_ac_Header=no" 
     8942fi 
     8943rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 
     8944fi 
     8945echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 
     8946echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 
     8947if test `eval echo '${'$as_ac_Header'}'` = yes; then 
     8948  cat >>confdefs.h <<_ACEOF 
     8949#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 
     8950_ACEOF 
     8951 cat >>confdefs.h <<\_ACEOF 
     8952#define PJ_HAS_NET_IF_H 1 
     8953_ACEOF 
     8954 
     8955fi 
     8956 
     8957done 
    90368958 
    90378959 
Note: See TracChangeset for help on using the changeset viewer.