@@ -668,6 +668,7 @@ BUILDEXEEXT
668668EGREP
669669GREP
670670CPP
671+ NO_AS_NEEDED
671672MAINCC
672673CXX
673674OBJEXT
@@ -1572,6 +1573,52 @@ fi
15721573
15731574} # ac_fn_c_try_compile
15741575
1576+ # ac_fn_c_try_link LINENO
1577+ # -----------------------
1578+ # Try to link conftest.$ac_ext, and return whether this succeeded.
1579+ ac_fn_c_try_link ()
1580+ {
1581+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1582+ rm -f conftest.$ac_objext conftest$ac_exeext
1583+ if { { ac_try="$ac_link"
1584+ case "(($ac_try" in
1585+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1586+ *) ac_try_echo=$ac_try;;
1587+ esac
1588+ eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1589+ $as_echo "$ac_try_echo"; } >&5
1590+ (eval "$ac_link") 2>conftest.err
1591+ ac_status=$?
1592+ if test -s conftest.err; then
1593+ grep -v ' ^ * +' conftest.err >conftest.er1
1594+ cat conftest.er1 >&5
1595+ mv -f conftest.er1 conftest.err
1596+ fi
1597+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1598+ test $ac_status = 0; } && {
1599+ test -z "$ac_c_werror_flag" ||
1600+ test ! -s conftest.err
1601+ } && test -s conftest$ac_exeext && {
1602+ test "$cross_compiling" = yes ||
1603+ $as_test_x conftest$ac_exeext
1604+ }; then :
1605+ ac_retval=0
1606+ else
1607+ $as_echo "$as_me: failed program was:" >&5
1608+ sed ' s/^/| /' conftest.$ac_ext >&5
1609+
1610+ ac_retval=1
1611+ fi
1612+ # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1613+ # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1614+ # interfere with the next link command; also delete a directory that is
1615+ # left behind by Apple' s compiler. We do this before executing the actions.
1616+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1617+ eval $as_lineno_stack ; ${as_lineno_stack: +: } unset as_lineno
1618+ as_fn_set_status $ac_retval
1619+
1620+ } # ac_fn_c_try_link
1621+
15751622# ac_fn_c_try_cpp LINENO
15761623# ----------------------
15771624# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
@@ -1773,52 +1820,6 @@ $as_echo "$ac_res" >&6; }
17731820
17741821} # ac_fn_c_check_header_compile
17751822
1776- # ac_fn_c_try_link LINENO
1777- # -----------------------
1778- # Try to link conftest.$ac_ext, and return whether this succeeded.
1779- ac_fn_c_try_link ()
1780- {
1781- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1782- rm -f conftest.$ac_objext conftest$ac_exeext
1783- if { { ac_try="$ac_link"
1784- case "(($ac_try" in
1785- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1786- *) ac_try_echo=$ac_try;;
1787- esac
1788- eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1789- $as_echo "$ac_try_echo"; } >&5
1790- (eval "$ac_link") 2>conftest.err
1791- ac_status=$?
1792- if test -s conftest.err; then
1793- grep -v ' ^ * +' conftest.err >conftest.er1
1794- cat conftest.er1 >&5
1795- mv -f conftest.er1 conftest.err
1796- fi
1797- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1798- test $ac_status = 0; } && {
1799- test -z "$ac_c_werror_flag" ||
1800- test ! -s conftest.err
1801- } && test -s conftest$ac_exeext && {
1802- test "$cross_compiling" = yes ||
1803- $as_test_x conftest$ac_exeext
1804- }; then :
1805- ac_retval=0
1806- else
1807- $as_echo "$as_me: failed program was:" >&5
1808- sed ' s/^/| /' conftest.$ac_ext >&5
1809-
1810- ac_retval=1
1811- fi
1812- # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1813- # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1814- # interfere with the next link command; also delete a directory that is
1815- # left behind by Apple' s compiler. We do this before executing the actions.
1816- rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1817- eval $as_lineno_stack ; ${as_lineno_stack: +: } unset as_lineno
1818- as_fn_set_status $ac_retval
1819-
1820- } # ac_fn_c_try_link
1821-
18221823# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
18231824# -------------------------------------------
18241825# Tests whether TYPE exists after having included INCLUDES, setting cache
@@ -4168,8 +4169,38 @@ $as_echo "$as_me: WARNING:
41684169fi
41694170
41704171
4171- # checks for UNIX variants that set C preprocessor variables
4172+ { $as_echo " $as_me :${as_lineno-$LINENO } : checking for -Wl,--no-as-needed" >&5
4173+ $as_echo_n " checking for -Wl,--no-as-needed... " >&6 ; }
4174+ save_LDFLAGS=" $LDFLAGS "
4175+ LDFLAGS=" $LDFLAGS -Wl,--no-as-needed"
41724176
4177+ cat confdefs.h - << _ACEOF >conftest.$ac_ext
4178+ /* end confdefs.h. */
4179+
4180+ int
4181+ main ()
4182+ {
4183+
4184+ ;
4185+ return 0;
4186+ }
4187+ _ACEOF
4188+ if ac_fn_c_try_link " $LINENO " ; then :
4189+ NO_AS_NEEDED=" -Wl,--no-as-needed"
4190+ { $as_echo " $as_me :${as_lineno-$LINENO } : result: yes" >&5
4191+ $as_echo " yes" >&6 ; }
4192+ else
4193+ NO_AS_NEEDED=" "
4194+ { $as_echo " $as_me :${as_lineno-$LINENO } : result: no" >&5
4195+ $as_echo " no" >&6 ; }
4196+ fi
4197+ rm -f core conftest.err conftest.$ac_objext \
4198+ conftest$ac_exeext conftest.$ac_ext
4199+ LDFLAGS=" $save_LDFLAGS "
4200+
4201+
4202+
4203+ # checks for UNIX variants that set C preprocessor variables
41734204ac_ext=c
41744205ac_cpp=' $CPP $CPPFLAGS'
41754206ac_compile=' $CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
0 commit comments