Ignore:
Timestamp:
Aug 2, 2016 8:35:28 AM (8 years ago)
Author:
ming
Message:

Re #1945 (misc): Set IPv6 sockets to be IPv6 only

Auto-detect in configure script if this option is supported, and if yes, Set IPv6 sockets to be IPv6 only.

Thanks to Alexander Traud for the patch.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/aconfigure

    r5393 r5403  
    752752oldincludedir 
    753753includedir 
    754 runstatedir 
    755754localstatedir 
    756755sharedstatedir 
     
    875874sharedstatedir='${prefix}/com' 
    876875localstatedir='${prefix}/var' 
    877 runstatedir='${localstatedir}/run' 
    878876includedir='${prefix}/include' 
    879877oldincludedir='/usr/include' 
     
    11281126    silent=yes ;; 
    11291127 
    1130   -runstatedir | --runstatedir | --runstatedi | --runstated \ 
    1131   | --runstate | --runstat | --runsta | --runst | --runs \ 
    1132   | --run | --ru | --r) 
    1133     ac_prev=runstatedir ;; 
    1134   -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ 
    1135   | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ 
    1136   | --run=* | --ru=* | --r=*) 
    1137     runstatedir=$ac_optarg ;; 
    1138  
    11391128  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) 
    11401129    ac_prev=sbindir ;; 
     
    12741263                datadir sysconfdir sharedstatedir localstatedir includedir \ 
    12751264                oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ 
    1276                 libdir localedir mandir runstatedir 
     1265                libdir localedir mandir 
    12771266do 
    12781267  eval ac_val=\$$ac_var 
     
    14271416  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com] 
    14281417  --localstatedir=DIR     modifiable single-machine data [PREFIX/var] 
    1429   --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run] 
    14301418  --libdir=DIR            object code libraries [EPREFIX/lib] 
    14311419  --includedir=DIR        C header files [PREFIX/include] 
     
    56075595rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 
    56085596 
     5597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if IPV6_V6ONLY is available" >&5 
     5598$as_echo_n "checking if IPV6_V6ONLY is available... " >&6; } 
     5599cat confdefs.h - <<_ACEOF >conftest.$ac_ext 
     5600/* end confdefs.h.  */ 
     5601#include <sys/socket.h> 
     5602                                     #include <netinet/in.h> 
     5603int 
     5604main () 
     5605{ 
     5606int opt = IPV6_V6ONLY; 
     5607  ; 
     5608  return 0; 
     5609} 
     5610_ACEOF 
     5611if ac_fn_c_try_compile "$LINENO"; then : 
     5612  $as_echo "#define PJ_SOCK_HAS_IPV6_V6ONLY 1" >>confdefs.h 
     5613 
     5614                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 
     5615$as_echo "yes" >&6; } 
     5616else 
     5617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 
     5618$as_echo "no" >&6; } 
     5619fi 
     5620rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 
     5621 
    56095622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if SO_ERROR is available" >&5 
    56105623$as_echo_n "checking if SO_ERROR is available... " >&6; } 
Note: See TracChangeset for help on using the changeset viewer.