[openssl-dev] AI_ADDRCONFIG test from configure

The Doctor doctor at doctor.nl2k.ab.ca
Sat Mar 12 03:56:11 UTC 2016


Here is a segment that should work


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working AI_ADDRCONFIG fla
g" >&5
$as_echo_n "checking for working AI_ADDRCONFIG flag... " >&6; }
if ${inn_cv_func_getaddrinfo_addrconfig_works+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if test "$cross_compiling" = yes; then :
  inn_cv_func_getaddrinfo_addrconfig_works=no
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <netdb.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/socket.h>

int
main(void) {
    struct addrinfo hints, *ai;

    memset(&hints, 0, sizeof(hints));
    hints.ai_family = AF_UNSPEC;
    hints.ai_socktype = SOCK_STREAM;
    hints.ai_flags = AI_ADDRCONFIG;
    return (getaddrinfo("localhost", NULL, &hints, &ai) != 0);
}

_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
  inn_cv_func_getaddrinfo_addrconfig_works=yes
else
  inn_cv_func_getaddrinfo_addrconfig_works=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $inn_cv_func_getaddrinfo_addrc
onfig_works" >&5
$as_echo "$inn_cv_func_getaddrinfo_addrconfig_works" >&6; }
 if test x"$inn_cv_func_getaddrinfo_addrconfig_works" = xyes; then :

$as_echo "#define HAVE_GETADDRINFO_ADDRCONFIG 1" >>confdefs.h 

-- 
Member - Liberal International This is doctor@@nl2k.ab.ca Ici doctor@@nl2k.ab.ca
God,Queen and country!Never Satan President Republic!Beware AntiChrist rising! 
http://www.fullyfollow.me/rootnl2k  Look at Psalms 14 and 53 on Atheism
Manitoba and Saskatchewan! Save your provinces in April! Vote Liberal!!


More information about the openssl-dev mailing list