Changeset 3205


Ignore:
Timestamp:
Jun 15, 2010 5:21:43 AM (14 years ago)
Author:
bennylp
Message:

Misc fixes (re #1068): fixed aconfigure to handle the case where ifaddrs.h is present but the functions are not available, as reported to happen with uClibc (thanks Jones Desougi for the patch)

Location:
pjproject/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/aconfigure

    r3181 r3205  
    11#! /bin/sh 
    22# Guess values for system-dependent variables and create Makefiles. 
    3 # Generated by GNU Autoconf 2.64 for pjproject 1.x. 
     3# Generated by GNU Autoconf 2.65 for pjproject 1.x. 
     4# 
    45# 
    56# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 
    6 # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software 
    7 # Foundation, Inc. 
     7# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, 
     8# Inc. 
     9# 
    810# 
    911# This configure script is free software; the Free Software Foundation 
     
    525527 
    526528 
    527 exec 7<&0 </dev/null 6>&1 
     529test -n "$DJDIR" || exec 7<&0 </dev/null 
     530exec 6>&1 
    528531 
    529532# Name of the host. 
     
    14021405              nonstandard directory <lib dir> 
    14031406  LIBS        libraries to pass to the linker, e.g. -l<library> 
    1404   CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if 
     1407  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if 
    14051408              you have headers in a nonstandard directory <include dir> 
    14061409  CXX         C++ compiler command 
     
    14751478  cat <<\_ACEOF 
    14761479pjproject configure 1.x 
    1477 generated by GNU Autoconf 2.64 
     1480generated by GNU Autoconf 2.65 
    14781481 
    14791482Copyright (C) 2009 Free Software Foundation, Inc. 
     
    15221525fi 
    15231526  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} 
    1524   return $ac_retval 
     1527  as_fn_set_status $ac_retval 
    15251528 
    15261529} # ac_fn_c_try_compile 
     
    15601563fi 
    15611564  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} 
    1562   return $ac_retval 
     1565  as_fn_set_status $ac_retval 
    15631566 
    15641567} # ac_fn_cxx_try_compile 
     
    16061609  rm -rf conftest.dSYM conftest_ipa8_conftest.oo 
    16071610  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} 
    1608   return $ac_retval 
     1611  as_fn_set_status $ac_retval 
    16091612 
    16101613} # ac_fn_c_try_link 
     
    16481651  rm -rf conftest.dSYM conftest_ipa8_conftest.oo 
    16491652  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} 
    1650   return $ac_retval 
     1653  as_fn_set_status $ac_retval 
    16511654 
    16521655} # ac_fn_c_try_run 
     
    16851688fi 
    16861689  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} 
    1687   return $ac_retval 
     1690  as_fn_set_status $ac_retval 
    16881691 
    16891692} # ac_fn_c_try_cpp 
     
    18061809 
    18071810} # ac_fn_c_check_header_mongrel 
     1811 
     1812# ac_fn_c_check_func LINENO FUNC VAR 
     1813# ---------------------------------- 
     1814# Tests whether FUNC exists, setting the cache variable VAR accordingly 
     1815ac_fn_c_check_func () 
     1816{ 
     1817  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 
     1818  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 
     1819$as_echo_n "checking for $2... " >&6; } 
     1820if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : 
     1821  $as_echo_n "(cached) " >&6 
     1822else 
     1823  cat confdefs.h - <<_ACEOF >conftest.$ac_ext 
     1824/* end confdefs.h.  */ 
     1825/* Define $2 to an innocuous variant, in case <limits.h> declares $2. 
     1826   For example, HP-UX 11i <limits.h> declares gettimeofday.  */ 
     1827#define $2 innocuous_$2 
     1828 
     1829/* System header to define __stub macros and hopefully few prototypes, 
     1830    which can conflict with char $2 (); below. 
     1831    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since 
     1832    <limits.h> exists even on freestanding compilers.  */ 
     1833 
     1834#ifdef __STDC__ 
     1835# include <limits.h> 
     1836#else 
     1837# include <assert.h> 
     1838#endif 
     1839 
     1840#undef $2 
     1841 
     1842/* Override any GCC internal prototype to avoid an error. 
     1843   Use char because int might match the return type of a GCC 
     1844   builtin and then its argument prototype would still apply.  */ 
     1845#ifdef __cplusplus 
     1846extern "C" 
     1847#endif 
     1848char $2 (); 
     1849/* The GNU C library defines this for functions which it implements 
     1850    to always fail with ENOSYS.  Some functions are actually named 
     1851    something starting with __ and the normal name is an alias.  */ 
     1852#if defined __stub_$2 || defined __stub___$2 
     1853choke me 
     1854#endif 
     1855 
     1856int 
     1857main () 
     1858{ 
     1859return $2 (); 
     1860  ; 
     1861  return 0; 
     1862} 
     1863_ACEOF 
     1864if ac_fn_c_try_link "$LINENO"; then : 
     1865  eval "$3=yes" 
     1866else 
     1867  eval "$3=no" 
     1868fi 
     1869rm -f core conftest.err conftest.$ac_objext \ 
     1870    conftest$ac_exeext conftest.$ac_ext 
     1871fi 
     1872eval ac_res=\$$3 
     1873               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 
     1874$as_echo "$ac_res" >&6; } 
     1875  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} 
     1876 
     1877} # ac_fn_c_check_func 
    18081878cat >config.log <<_ACEOF 
    18091879This file contains any messages produced by compilers while 
     
    18111881 
    18121882It was created by pjproject $as_me 1.x, which was 
    1813 generated by GNU Autoconf 2.64.  Invocation command line was 
     1883generated by GNU Autoconf 2.65.  Invocation command line was 
    18141884 
    18151885  $ $0 $@ 
     
    20642134do 
    20652135  test "x$ac_site_file" = xNONE && continue 
    2066   if test -r "$ac_site_file"; then 
     2136  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then 
    20672137    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 
    20682138$as_echo "$as_me: loading site script $ac_site_file" >&6;} 
     
    20732143 
    20742144if test -r "$cache_file"; then 
    2075   # Some versions of bash will fail to source /dev/null (special 
    2076   # files actually), so we avoid doing that. 
    2077   if test -f "$cache_file"; then 
     2145  # Some versions of bash will fail to source /dev/null (special files 
     2146  # actually), so we avoid doing that.  DJGPP emulates it as a regular file. 
     2147  if test /dev/null != "$cache_file" && test -f "$cache_file"; then 
    20782148    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 
    20792149$as_echo "$as_me: loading cache $cache_file" >&6;} 
     
    26292699         10q' conftest.err >conftest.er1 
    26302700    cat conftest.er1 >&5 
    2631     rm -f conftest.er1 conftest.err 
    26322701  fi 
     2702  rm -f conftest.er1 conftest.err 
    26332703  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 
    26342704  test $ac_status = 0; } 
     
    26372707cat confdefs.h - <<_ACEOF >conftest.$ac_ext 
    26382708/* end confdefs.h.  */ 
    2639 #include <stdio.h> 
     2709 
    26402710int 
    26412711main () 
    26422712{ 
    2643 FILE *f = fopen ("conftest.out", "w"); 
    2644  return ferror (f) || fclose (f) != 0; 
    26452713 
    26462714  ; 
     
    26492717_ACEOF 
    26502718ac_clean_files_save=$ac_clean_files 
    2651 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out" 
     2719ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" 
    26522720# Try to create an executable without -o first, disregard a.out. 
    26532721# It will help us diagnose broken compilers, and finding out an intuition 
    26542722# of exeext. 
    2655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 
    2656 $as_echo_n "checking for C compiler default output file name... " >&6; } 
     2723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 
     2724$as_echo_n "checking whether the C compiler works... " >&6; } 
    26572725ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` 
    26582726 
     
    27162784  ac_file='' 
    27172785fi 
    2718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 
    2719 $as_echo "$ac_file" >&6; } 
    27202786if test -z "$ac_file"; then : 
    2721   $as_echo "$as_me: failed program was:" >&5 
     2787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 
     2788$as_echo "no" >&6; } 
     2789$as_echo "$as_me: failed program was:" >&5 
    27222790sed 's/^/| /' conftest.$ac_ext >&5 
    27232791 
     
    27272795as_fn_error "C compiler cannot create executables 
    27282796See \`config.log' for more details." "$LINENO" 5; }; } 
    2729 fi 
     2797else 
     2798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 
     2799$as_echo "yes" >&6; } 
     2800fi 
     2801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 
     2802$as_echo_n "checking for C compiler default output file name... " >&6; } 
     2803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 
     2804$as_echo "$ac_file" >&6; } 
    27302805ac_exeext=$ac_cv_exeext 
    27312806 
    2732 # Check that the compiler produces executables we can run.  If not, either 
    2733 # the compiler is broken, or we cross compile. 
    2734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 
    2735 $as_echo_n "checking whether the C compiler works... " >&6; } 
    2736 # If not cross compiling, check that we can run a simple program. 
    2737 if test "$cross_compiling" != yes; then 
    2738   if { ac_try='./$ac_file' 
    2739   { { case "(($ac_try" in 
    2740   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 
    2741   *) ac_try_echo=$ac_try;; 
    2742 esac 
    2743 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 
    2744 $as_echo "$ac_try_echo"; } >&5 
    2745   (eval "$ac_try") 2>&5 
    2746   ac_status=$? 
    2747   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 
    2748   test $ac_status = 0; }; }; then 
    2749     cross_compiling=no 
    2750   else 
    2751     if test "$cross_compiling" = maybe; then 
    2752         cross_compiling=yes 
    2753     else 
    2754         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 
    2755 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 
    2756 as_fn_error "cannot run C compiled programs. 
    2757 If you meant to cross compile, use \`--host'. 
    2758 See \`config.log' for more details." "$LINENO" 5; } 
    2759     fi 
    2760   fi 
    2761 fi 
    2762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 
    2763 $as_echo "yes" >&6; } 
    2764  
    2765 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out 
     2807rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out 
    27662808ac_clean_files=$ac_clean_files_save 
    2767 # Check that the compiler produces executables we can run.  If not, either 
    2768 # the compiler is broken, or we cross compile. 
    2769 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 
    2770 $as_echo_n "checking whether we are cross compiling... " >&6; } 
    2771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 
    2772 $as_echo "$cross_compiling" >&6; } 
    2773  
    27742809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 
    27752810$as_echo_n "checking for suffix of executables... " >&6; } 
     
    28042839See \`config.log' for more details." "$LINENO" 5; } 
    28052840fi 
    2806 rm -f conftest$ac_cv_exeext 
     2841rm -f conftest conftest$ac_cv_exeext 
    28072842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 
    28082843$as_echo "$ac_cv_exeext" >&6; } 
     
    28112846EXEEXT=$ac_cv_exeext 
    28122847ac_exeext=$EXEEXT 
     2848cat confdefs.h - <<_ACEOF >conftest.$ac_ext 
     2849/* end confdefs.h.  */ 
     2850#include <stdio.h> 
     2851int 
     2852main () 
     2853{ 
     2854FILE *f = fopen ("conftest.out", "w"); 
     2855 return ferror (f) || fclose (f) != 0; 
     2856 
     2857  ; 
     2858  return 0; 
     2859} 
     2860_ACEOF 
     2861ac_clean_files="$ac_clean_files conftest.out" 
     2862# Check that the compiler produces executables we can run.  If not, either 
     2863# the compiler is broken, or we cross compile. 
     2864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 
     2865$as_echo_n "checking whether we are cross compiling... " >&6; } 
     2866if test "$cross_compiling" != yes; then 
     2867  { { ac_try="$ac_link" 
     2868case "(($ac_try" in 
     2869  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 
     2870  *) ac_try_echo=$ac_try;; 
     2871esac 
     2872eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 
     2873$as_echo "$ac_try_echo"; } >&5 
     2874  (eval "$ac_link") 2>&5 
     2875  ac_status=$? 
     2876  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 
     2877  test $ac_status = 0; } 
     2878  if { ac_try='./conftest$ac_cv_exeext' 
     2879  { { case "(($ac_try" in 
     2880  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 
     2881  *) ac_try_echo=$ac_try;; 
     2882esac 
     2883eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 
     2884$as_echo "$ac_try_echo"; } >&5 
     2885  (eval "$ac_try") 2>&5 
     2886  ac_status=$? 
     2887  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 
     2888  test $ac_status = 0; }; }; then 
     2889    cross_compiling=no 
     2890  else 
     2891    if test "$cross_compiling" = maybe; then 
     2892        cross_compiling=yes 
     2893    else 
     2894        { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 
     2895$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 
     2896as_fn_error "cannot run C compiled programs. 
     2897If you meant to cross compile, use \`--host'. 
     2898See \`config.log' for more details." "$LINENO" 5; } 
     2899    fi 
     2900  fi 
     2901fi 
     2902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 
     2903$as_echo "$cross_compiling" >&6; } 
     2904 
     2905rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out 
     2906ac_clean_files=$ac_clean_files_save 
    28132907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 
    28142908$as_echo_n "checking for suffix of object files... " >&6; } 
     
    32043298         10q' conftest.err >conftest.er1 
    32053299    cat conftest.er1 >&5 
    3206     rm -f conftest.er1 conftest.err 
    32073300  fi 
     3301  rm -f conftest.er1 conftest.err 
    32083302  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 
    32093303  test $ac_status = 0; } 
     
    46734767ac_fn_c_check_header_mongrel "$LINENO" "ifaddrs.h" "ac_cv_header_ifaddrs_h" "$ac_includes_default" 
    46744768if test "x$ac_cv_header_ifaddrs_h" = x""yes; then : 
     4769  ac_fn_c_check_func "$LINENO" "getifaddrs" "ac_cv_func_getifaddrs" 
     4770if test "x$ac_cv_func_getifaddrs" = x""yes; then : 
    46754771  $as_echo "#define PJ_HAS_IFADDRS_H 1" >>confdefs.h 
     4772 
     4773fi 
    46764774 
    46774775fi 
     
    67156813ac_log=" 
    67166814This file was extended by pjproject $as_me 1.x, which was 
    6717 generated by GNU Autoconf 2.64.  Invocation command line was 
     6815generated by GNU Autoconf 2.65.  Invocation command line was 
    67186816 
    67196817  CONFIG_FILES    = $CONFIG_FILES 
     
    67546852  -h, --help       print this help, then exit 
    67556853  -V, --version    print version number and configuration settings, then exit 
     6854      --config     print configuration, then exit 
    67566855  -q, --quiet, --silent 
    67576856                   do not print progress messages 
     
    67736872_ACEOF 
    67746873cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 
     6874ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" 
    67756875ac_cs_version="\\ 
    67766876pjproject config.status 1.x 
    6777 configured by $0, generated by GNU Autoconf 2.64, 
    6778   with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" 
     6877configured by $0, generated by GNU Autoconf 2.65, 
     6878  with options \\"\$ac_cs_config\\" 
    67796879 
    67806880Copyright (C) 2009 Free Software Foundation, Inc. 
     
    68116911  --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) 
    68126912    $as_echo "$ac_cs_version"; exit ;; 
     6913  --config | --confi | --conf | --con | --co | --c ) 
     6914    $as_echo "$ac_cs_config"; exit ;; 
    68136915  --debug | --debu | --deb | --de | --d | -d ) 
    68146916    debug=: ;; 
     
    70037105:nl 
    70047106h 
    7005 s/\(.\{148\}\).*/\1/ 
     7107s/\(.\{148\}\)..*/\1/ 
    70067108t more1 
    70077109s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ 
     
    70177119:delim 
    70187120h 
    7019 s/\(.\{148\}\).*/\1/ 
     7121s/\(.\{148\}\)..*/\1/ 
    70207122t more2 
    70217123s/["\\]/\\&/g; s/^/"/; s/$/"/ 
  • pjproject/trunk/aconfigure.ac

    r3181 r3205  
    189189                 ]) 
    190190AC_CHECK_HEADER(netinet/tcp.h,[AC_DEFINE(PJ_HAS_NETINET_TCP_H,1)]) 
    191 AC_CHECK_HEADER(ifaddrs.h,[AC_DEFINE(PJ_HAS_IFADDRS_H,1)]) 
     191AC_CHECK_HEADER(ifaddrs.h, 
     192                [AC_CHECK_FUNC(getifaddrs,[AC_DEFINE(PJ_HAS_IFADDRS_H,1)])]) 
    192193AC_CHECK_HEADER(semaphore.h,[AC_DEFINE(PJ_HAS_SEMAPHORE_H,1)]) 
    193194AC_CHECK_HEADER(setjmp.h,[AC_DEFINE(PJ_HAS_SETJMP_H,1)]) 
Note: See TracChangeset for help on using the changeset viewer.