Changeset 1892


Ignore:
Timestamp:
Mar 25, 2008 2:03:01 PM (11 years ago)
Author:
bennylp
Message:

Fixed autoconf configure warning when detecting mswsock.h on Mingw

Location:
pjproject/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/aconfigure

    r1891 r1892  
    83138313 
    83148314 
    8315 if test "${ac_cv_header_mswsock_h+set}" = set; then 
    8316   echo "$as_me:$LINENO: checking for mswsock.h" >&5 
    8317 echo $ECHO_N "checking for mswsock.h... $ECHO_C" >&6 
    8318 if test "${ac_cv_header_mswsock_h+set}" = set; then 
    8319   echo $ECHO_N "(cached) $ECHO_C" >&6 
    8320 fi 
    8321 echo "$as_me:$LINENO: result: $ac_cv_header_mswsock_h" >&5 
    8322 echo "${ECHO_T}$ac_cv_header_mswsock_h" >&6 
    8323 else 
    8324   # Is the header compilable? 
    8325 echo "$as_me:$LINENO: checking mswsock.h usability" >&5 
    8326 echo $ECHO_N "checking mswsock.h usability... $ECHO_C" >&6 
    8327 cat >conftest.$ac_ext <<_ACEOF 
    8328 /* confdefs.h.  */ 
    8329 _ACEOF 
    8330 cat confdefs.h >>conftest.$ac_ext 
    8331 cat >>conftest.$ac_ext <<_ACEOF 
    8332 /* end confdefs.h.  */ 
    8333 $ac_includes_default 
    8334 #include <mswsock.h> 
    8335 _ACEOF 
    8336 rm -f conftest.$ac_objext 
    8337 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 
    8338   (eval $ac_compile) 2>conftest.er1 
    8339   ac_status=$? 
    8340   grep -v '^ *+' conftest.er1 >conftest.err 
    8341   rm -f conftest.er1 
    8342   cat conftest.err >&5 
    8343   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    8344   (exit $ac_status); } && 
    8345          { ac_try='test -z "$ac_c_werror_flag" 
    8346                          || test ! -s conftest.err' 
    8347   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    8348   (eval $ac_try) 2>&5 
    8349   ac_status=$? 
    8350   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    8351   (exit $ac_status); }; } && 
    8352          { ac_try='test -s conftest.$ac_objext' 
    8353   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    8354   (eval $ac_try) 2>&5 
    8355   ac_status=$? 
    8356   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    8357   (exit $ac_status); }; }; then 
    8358   ac_header_compiler=yes 
    8359 else 
    8360   echo "$as_me: failed program was:" >&5 
    8361 sed 's/^/| /' conftest.$ac_ext >&5 
    8362  
    8363 ac_header_compiler=no 
    8364 fi 
    8365 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 
    8366 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 
    8367 echo "${ECHO_T}$ac_header_compiler" >&6 
    8368  
    8369 # Is the header present? 
    8370 echo "$as_me:$LINENO: checking mswsock.h presence" >&5 
    8371 echo $ECHO_N "checking mswsock.h presence... $ECHO_C" >&6 
    8372 cat >conftest.$ac_ext <<_ACEOF 
    8373 /* confdefs.h.  */ 
    8374 _ACEOF 
    8375 cat confdefs.h >>conftest.$ac_ext 
    8376 cat >>conftest.$ac_ext <<_ACEOF 
    8377 /* end confdefs.h.  */ 
    8378 #include <mswsock.h> 
    8379 _ACEOF 
    8380 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 
    8381   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 
    8382   ac_status=$? 
    8383   grep -v '^ *+' conftest.er1 >conftest.err 
    8384   rm -f conftest.er1 
    8385   cat conftest.err >&5 
    8386   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    8387   (exit $ac_status); } >/dev/null; then 
    8388   if test -s conftest.err; then 
    8389     ac_cpp_err=$ac_c_preproc_warn_flag 
    8390     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag 
    8391   else 
    8392     ac_cpp_err= 
    8393   fi 
    8394 else 
    8395   ac_cpp_err=yes 
    8396 fi 
    8397 if test -z "$ac_cpp_err"; then 
    8398   ac_header_preproc=yes 
    8399 else 
    8400   echo "$as_me: failed program was:" >&5 
    8401 sed 's/^/| /' conftest.$ac_ext >&5 
    8402  
    8403   ac_header_preproc=no 
    8404 fi 
    8405 rm -f conftest.err conftest.$ac_ext 
    8406 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 
    8407 echo "${ECHO_T}$ac_header_preproc" >&6 
    8408  
    8409 # So?  What about this header? 
    8410 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 
    8411   yes:no: ) 
    8412     { echo "$as_me:$LINENO: WARNING: mswsock.h: accepted by the compiler, rejected by the preprocessor!" >&5 
    8413 echo "$as_me: WARNING: mswsock.h: accepted by the compiler, rejected by the preprocessor!" >&2;} 
    8414     { echo "$as_me:$LINENO: WARNING: mswsock.h: proceeding with the compiler's result" >&5 
    8415 echo "$as_me: WARNING: mswsock.h: proceeding with the compiler's result" >&2;} 
    8416     ac_header_preproc=yes 
    8417     ;; 
    8418   no:yes:* ) 
    8419     { echo "$as_me:$LINENO: WARNING: mswsock.h: present but cannot be compiled" >&5 
    8420 echo "$as_me: WARNING: mswsock.h: present but cannot be compiled" >&2;} 
    8421     { echo "$as_me:$LINENO: WARNING: mswsock.h:     check for missing prerequisite headers?" >&5 
    8422 echo "$as_me: WARNING: mswsock.h:     check for missing prerequisite headers?" >&2;} 
    8423     { echo "$as_me:$LINENO: WARNING: mswsock.h: see the Autoconf documentation" >&5 
    8424 echo "$as_me: WARNING: mswsock.h: see the Autoconf documentation" >&2;} 
    8425     { echo "$as_me:$LINENO: WARNING: mswsock.h:     section \"Present But Cannot Be Compiled\"" >&5 
    8426 echo "$as_me: WARNING: mswsock.h:     section \"Present But Cannot Be Compiled\"" >&2;} 
    8427     { echo "$as_me:$LINENO: WARNING: mswsock.h: proceeding with the preprocessor's result" >&5 
    8428 echo "$as_me: WARNING: mswsock.h: proceeding with the preprocessor's result" >&2;} 
    8429     { echo "$as_me:$LINENO: WARNING: mswsock.h: in the future, the compiler will take precedence" >&5 
    8430 echo "$as_me: WARNING: mswsock.h: in the future, the compiler will take precedence" >&2;} 
    8431     ( 
    8432       cat <<\_ASBOX 
    8433 ## ------------------------------------ ## 
    8434 ## Report this to the pjproject lists.  ## 
    8435 ## ------------------------------------ ## 
    8436 _ASBOX 
    8437     ) | 
    8438       sed "s/^/$as_me: WARNING:     /" >&2 
    8439     ;; 
    8440 esac 
    8441 echo "$as_me:$LINENO: checking for mswsock.h" >&5 
    8442 echo $ECHO_N "checking for mswsock.h... $ECHO_C" >&6 
    8443 if test "${ac_cv_header_mswsock_h+set}" = set; then 
    8444   echo $ECHO_N "(cached) $ECHO_C" >&6 
    8445 else 
    8446   ac_cv_header_mswsock_h=$ac_header_preproc 
    8447 fi 
    8448 echo "$as_me:$LINENO: result: $ac_cv_header_mswsock_h" >&5 
    8449 echo "${ECHO_T}$ac_cv_header_mswsock_h" >&6 
    8450  
    8451 fi 
    8452 if test $ac_cv_header_mswsock_h = yes; then 
    8453   cat >>confdefs.h <<\_ACEOF 
    8454 #define PJ_HAS_MSWSOCK_H 1 
    8455 _ACEOF 
    8456  
    8457 fi 
    8458  
    8459  
    84608315if test "${ac_cv_header_winsock_h+set}" = set; then 
    84618316  echo "$as_me:$LINENO: checking for winsock.h" >&5 
     
    87488603 
    87498604 
     8605echo "$as_me:$LINENO: checking for mswsock.h" >&5 
     8606echo $ECHO_N "checking for mswsock.h... $ECHO_C" >&6 
     8607if test "${ac_cv_header_mswsock_h+set}" = set; then 
     8608  echo $ECHO_N "(cached) $ECHO_C" >&6 
     8609else 
     8610  cat >conftest.$ac_ext <<_ACEOF 
     8611/* confdefs.h.  */ 
     8612_ACEOF 
     8613cat confdefs.h >>conftest.$ac_ext 
     8614cat >>conftest.$ac_ext <<_ACEOF 
     8615/* end confdefs.h.  */ 
     8616#if PJ_HAS_WINSOCK2_H 
     8617                  #     include <winsock2.h> 
     8618                  #elif PJ_HAS_WINSOCK_H 
     8619                  #     include <winsock.h> 
     8620                  #endif 
     8621 
     8622 
     8623#include <mswsock.h> 
     8624_ACEOF 
     8625rm -f conftest.$ac_objext 
     8626if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 
     8627  (eval $ac_compile) 2>conftest.er1 
     8628  ac_status=$? 
     8629  grep -v '^ *+' conftest.er1 >conftest.err 
     8630  rm -f conftest.er1 
     8631  cat conftest.err >&5 
     8632  echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     8633  (exit $ac_status); } && 
     8634         { ac_try='test -z "$ac_c_werror_flag" 
     8635                         || test ! -s conftest.err' 
     8636  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
     8637  (eval $ac_try) 2>&5 
     8638  ac_status=$? 
     8639  echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     8640  (exit $ac_status); }; } && 
     8641         { ac_try='test -s conftest.$ac_objext' 
     8642  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
     8643  (eval $ac_try) 2>&5 
     8644  ac_status=$? 
     8645  echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     8646  (exit $ac_status); }; }; then 
     8647  ac_cv_header_mswsock_h=yes 
     8648else 
     8649  echo "$as_me: failed program was:" >&5 
     8650sed 's/^/| /' conftest.$ac_ext >&5 
     8651 
     8652ac_cv_header_mswsock_h=no 
     8653fi 
     8654rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 
     8655fi 
     8656echo "$as_me:$LINENO: result: $ac_cv_header_mswsock_h" >&5 
     8657echo "${ECHO_T}$ac_cv_header_mswsock_h" >&6 
     8658if test $ac_cv_header_mswsock_h = yes; then 
     8659  cat >>confdefs.h <<\_ACEOF 
     8660#define PJ_HAS_MSWSOCK_H 1 
     8661_ACEOF 
     8662 
     8663fi 
     8664 
     8665 
    87508666if test "${ac_cv_header_uuid_uuid_h+set}" = set; then 
    87518667  echo "$as_me:$LINENO: checking for uuid/uuid.h" >&5 
     
    88908806 
    88918807 
    8892  
    8893 for ac_header in net/if.h 
    8894 do 
    8895 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` 
    8896 echo "$as_me:$LINENO: checking for $ac_header" >&5 
    8897 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 
    8898 if eval "test \"\${$as_ac_Header+set}\" = set"; then 
     8808echo "$as_me:$LINENO: checking for net/if.h" >&5 
     8809echo $ECHO_N "checking for net/if.h... $ECHO_C" >&6 
     8810if test "${ac_cv_header_net_if_h+set}" = set; then 
    88998811  echo $ECHO_N "(cached) $ECHO_C" >&6 
    89008812else 
     
    89108822 
    89118823 
    8912 #include <$ac_header> 
     8824#include <net/if.h> 
    89138825_ACEOF 
    89148826rm -f conftest.$ac_objext 
     
    89348846  echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    89358847  (exit $ac_status); }; }; then 
    8936   eval "$as_ac_Header=yes" 
     8848  ac_cv_header_net_if_h=yes 
    89378849else 
    89388850  echo "$as_me: failed program was:" >&5 
    89398851sed 's/^/| /' conftest.$ac_ext >&5 
    89408852 
    8941 eval "$as_ac_Header=no" 
     8853ac_cv_header_net_if_h=no 
    89428854fi 
    89438855rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 
    89448856fi 
    8945 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 
    8946 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 
    8947 if 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 
     8857echo "$as_me:$LINENO: result: $ac_cv_header_net_if_h" >&5 
     8858echo "${ECHO_T}$ac_cv_header_net_if_h" >&6 
     8859if test $ac_cv_header_net_if_h = yes; then 
     8860  cat >>confdefs.h <<\_ACEOF 
    89528861#define PJ_HAS_NET_IF_H 1 
    89538862_ACEOF 
     
    89558864fi 
    89568865 
    8957 done 
    89588866 
    89598867 
  • pjproject/trunk/aconfigure.ac

    r1891 r1892  
    162162AC_CHECK_HEADER(time.h,[AC_DEFINE(PJ_HAS_TIME_H,1)]) 
    163163AC_CHECK_HEADER(unistd.h,[AC_DEFINE(PJ_HAS_UNISTD_H,1)]) 
    164 AC_CHECK_HEADER(mswsock.h,[AC_DEFINE(PJ_HAS_MSWSOCK_H,1)]) 
    165164AC_CHECK_HEADER(winsock.h,[AC_DEFINE(PJ_HAS_WINSOCK_H,1)]) 
    166165AC_CHECK_HEADER(winsock2.h,[AC_DEFINE(PJ_HAS_WINSOCK2_H,1)]) 
     166AC_CHECK_HEADER(mswsock.h,[AC_DEFINE(PJ_HAS_MSWSOCK_H,1)],[], 
     167                 [#if PJ_HAS_WINSOCK2_H 
     168                  #     include <winsock2.h> 
     169                  #elif PJ_HAS_WINSOCK_H 
     170                  #     include <winsock.h> 
     171                  #endif 
     172                 ]) 
    167173AC_CHECK_HEADER(uuid/uuid.h,[ac_has_uuid_h=1]) 
    168 AC_CHECK_HEADERS(net/if.h,[AC_DEFINE(PJ_HAS_NET_IF_H,1)],[], 
     174AC_CHECK_HEADER(net/if.h,[AC_DEFINE(PJ_HAS_NET_IF_H,1)],[], 
    169175                 [#if PJ_HAS_SYS_SOCKET_H 
    170176                  #     include <sys/socket.h> 
Note: See TracChangeset for help on using the changeset viewer.