Use the autoconf cache when checking for symbol export control support.
This commit is contained in:
148
configure
vendored
148
configure
vendored
@@ -20256,54 +20256,70 @@ fi
|
|||||||
|
|
||||||
if test -n "$LT_LDEXPORTS"; then
|
if test -n "$LT_LDEXPORTS"; then
|
||||||
if test "$lt_cv_prog_gnu_ld" = "yes"; then
|
if test "$lt_cv_prog_gnu_ld" = "yes"; then
|
||||||
cat > conftest.map <<-EOF
|
|
||||||
{
|
|
||||||
global: foo;
|
|
||||||
local: *;
|
|
||||||
};
|
|
||||||
EOF
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ld supports anonymous map files" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ld supports anonymous map files" >&5
|
||||||
$as_echo_n "checking whether ld supports anonymous map files... " >&6; }
|
$as_echo_n "checking whether ld supports anonymous map files... " >&6; }
|
||||||
_CFLAGS="$CFLAGS"
|
if ${sudo_cv_var_gnu_ld_anon_map+:} false; then :
|
||||||
CFLAGS="$CFLAGS $lt_prog_compiler_pic"
|
$as_echo_n "(cached) " >&6
|
||||||
_LDFLAGS="$LDFLAGS"
|
else
|
||||||
LDFLAGS="$LDFLAGS -fpic -shared -Wl,--version-script,./conftest.map"
|
|
||||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
|
||||||
/* end confdefs.h. */
|
|
||||||
int foo;
|
|
||||||
int
|
|
||||||
main ()
|
|
||||||
{
|
|
||||||
|
|
||||||
;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
_ACEOF
|
|
||||||
if ac_fn_c_try_link "$LINENO"; then :
|
|
||||||
|
|
||||||
LT_LDEXPORTS=; LT_LDDEP="\$(shlib_map)"; LT_LDMAP="-Wl,--version-script,\$(shlib_map)"
|
|
||||||
|
|
||||||
fi
|
|
||||||
rm -f core conftest.err conftest.$ac_objext \
|
|
||||||
conftest$ac_exeext conftest.$ac_ext
|
|
||||||
CFLAGS="$_CFLAGS"
|
|
||||||
LDFLAGS="$_LDFLAGS"
|
|
||||||
else
|
|
||||||
case "$host" in
|
|
||||||
*-*-solaris2*)
|
|
||||||
cat > conftest.map <<-EOF
|
cat > conftest.map <<-EOF
|
||||||
{
|
{
|
||||||
global: foo;
|
global: foo;
|
||||||
local: *;
|
local: *;
|
||||||
};
|
};
|
||||||
EOF
|
EOF
|
||||||
|
_CFLAGS="$CFLAGS"
|
||||||
|
CFLAGS="$CFLAGS $lt_prog_compiler_pic"
|
||||||
|
_LDFLAGS="$LDFLAGS"
|
||||||
|
LDFLAGS="$LDFLAGS -fpic -shared -Wl,--version-script,./conftest.map"
|
||||||
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||||
|
/* end confdefs.h. */
|
||||||
|
int foo;
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
|
||||||
|
;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
_ACEOF
|
||||||
|
if ac_fn_c_try_link "$LINENO"; then :
|
||||||
|
|
||||||
|
sudo_cv_var_gnu_ld_anon_map=yes
|
||||||
|
|
||||||
|
fi
|
||||||
|
rm -f core conftest.err conftest.$ac_objext \
|
||||||
|
conftest$ac_exeext conftest.$ac_ext
|
||||||
|
CFLAGS="$_CFLAGS"
|
||||||
|
LDFLAGS="$_LDFLAGS"
|
||||||
|
|
||||||
|
|
||||||
|
fi
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sudo_cv_var_gnu_ld_anon_map" >&5
|
||||||
|
$as_echo "$sudo_cv_var_gnu_ld_anon_map" >&6; }
|
||||||
|
if test "$sudo_cv_var_gnu_ld_anon_map" = "yes"; then
|
||||||
|
LT_LDEXPORTS=; LT_LDDEP="\$(shlib_map)"; LT_LDMAP="-Wl,--version-script,\$(shlib_map)"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
case "$host" in
|
||||||
|
*-*-solaris2*)
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ld supports anonymous map files" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ld supports anonymous map files" >&5
|
||||||
$as_echo_n "checking whether ld supports anonymous map files... " >&6; }
|
$as_echo_n "checking whether ld supports anonymous map files... " >&6; }
|
||||||
_CFLAGS="$CFLAGS"
|
if ${sudo_cv_var_solaris_ld_anon_map+:} false; then :
|
||||||
CFLAGS="$CFLAGS $lt_prog_compiler_pic"
|
$as_echo_n "(cached) " >&6
|
||||||
_LDFLAGS="$LDFLAGS"
|
else
|
||||||
LDFLAGS="$LDFLAGS -shared -Wl,-M,./conftest.map"
|
|
||||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
cat > conftest.map <<-EOF
|
||||||
|
{
|
||||||
|
global: foo;
|
||||||
|
local: *;
|
||||||
|
};
|
||||||
|
EOF
|
||||||
|
_CFLAGS="$CFLAGS"
|
||||||
|
CFLAGS="$CFLAGS $lt_prog_compiler_pic"
|
||||||
|
_LDFLAGS="$LDFLAGS"
|
||||||
|
LDFLAGS="$LDFLAGS -shared -Wl,-M,./conftest.map"
|
||||||
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||||
/* end confdefs.h. */
|
/* end confdefs.h. */
|
||||||
int foo;
|
int foo;
|
||||||
int
|
int
|
||||||
@@ -20316,29 +20332,39 @@ main ()
|
|||||||
_ACEOF
|
_ACEOF
|
||||||
if ac_fn_c_try_link "$LINENO"; then :
|
if ac_fn_c_try_link "$LINENO"; then :
|
||||||
|
|
||||||
LT_LDEXPORTS=; LT_LDDEP="\$(shlib_map)"; LT_LDMAP="-Wl,-M,\$(shlib_map)"
|
sudo_cv_var_solaris_ld_anon_map=yes
|
||||||
|
|
||||||
fi
|
fi
|
||||||
rm -f core conftest.err conftest.$ac_objext \
|
rm -f core conftest.err conftest.$ac_objext \
|
||||||
conftest$ac_exeext conftest.$ac_ext
|
conftest$ac_exeext conftest.$ac_ext
|
||||||
CFLAGS="$_CFLAGS"
|
CFLAGS="$_CFLAGS"
|
||||||
LDFLAGS="$_LDFLAGS"
|
LDFLAGS="$_LDFLAGS"
|
||||||
|
|
||||||
|
|
||||||
|
fi
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sudo_cv_var_solaris_ld_anon_map" >&5
|
||||||
|
$as_echo "$sudo_cv_var_solaris_ld_anon_map" >&6; }
|
||||||
|
if test "$sudo_cv_var_solaris_ld_anon_map" = "yes"; then
|
||||||
|
LT_LDEXPORTS=; LT_LDDEP="\$(shlib_map)"; LT_LDMAP="-Wl,-M,\$(shlib_map)"
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
*-*-hpux*)
|
*-*-hpux*)
|
||||||
cat > conftest.opt <<-EOF
|
|
||||||
+e foo
|
|
||||||
EOF
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ld supports controlling exported symbols" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ld supports controlling exported symbols" >&5
|
||||||
$as_echo_n "checking whether ld supports controlling exported symbols... " >&6; }
|
$as_echo_n "checking whether ld supports controlling exported symbols... " >&6; }
|
||||||
_CFLAGS="$CFLAGS"
|
if ${sudo_cv_var_hpux_ld_symbol_export+:} false; then :
|
||||||
CFLAGS="$CFLAGS $lt_prog_compiler_pic"
|
$as_echo_n "(cached) " >&6
|
||||||
_LDFLAGS="$LDFLAGS"
|
else
|
||||||
if test -n "$GCC"; then
|
|
||||||
LDFLAGS="$LDFLAGS -shared -Wl,-c,./conftest.opt"
|
echo "+e foo" > conftest.opt
|
||||||
else
|
_CFLAGS="$CFLAGS"
|
||||||
LDFLAGS="$LDFLAGS -Wl,-b -Wl,-c,./conftest.opt"
|
CFLAGS="$CFLAGS $lt_prog_compiler_pic"
|
||||||
fi
|
_LDFLAGS="$LDFLAGS"
|
||||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
if test -n "$GCC"; then
|
||||||
|
LDFLAGS="$LDFLAGS -shared -Wl,-c,./conftest.opt"
|
||||||
|
else
|
||||||
|
LDFLAGS="$LDFLAGS -Wl,-b -Wl,-c,./conftest.opt"
|
||||||
|
fi
|
||||||
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||||
/* end confdefs.h. */
|
/* end confdefs.h. */
|
||||||
int foo;
|
int foo;
|
||||||
int
|
int
|
||||||
@@ -20351,19 +20377,27 @@ main ()
|
|||||||
_ACEOF
|
_ACEOF
|
||||||
if ac_fn_c_try_link "$LINENO"; then :
|
if ac_fn_c_try_link "$LINENO"; then :
|
||||||
|
|
||||||
LT_LDEXPORTS=; LT_LDDEP="\$(shlib_opt)"; LT_LDOPT="-Wl,-c,\$(shlib_opt)"
|
sudo_cv_var_hpux_ld_symbol_export=yes
|
||||||
|
|
||||||
fi
|
fi
|
||||||
rm -f core conftest.err conftest.$ac_objext \
|
rm -f core conftest.err conftest.$ac_objext \
|
||||||
conftest$ac_exeext conftest.$ac_ext
|
conftest$ac_exeext conftest.$ac_ext
|
||||||
CFLAGS="$_CFLAGS"
|
CFLAGS="$_CFLAGS"
|
||||||
LDFLAGS="$_LDFLAGS"
|
LDFLAGS="$_LDFLAGS"
|
||||||
|
|
||||||
|
|
||||||
|
fi
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sudo_cv_var_hpux_ld_symbol_export" >&5
|
||||||
|
$as_echo "$sudo_cv_var_hpux_ld_symbol_export" >&6; }
|
||||||
|
if test "$sudo_cv_var_hpux_ld_symbol_export" = "yes"; then
|
||||||
|
LT_LDEXPORTS=; LT_LDDEP="\$(shlib_opt)"; LT_LDOPT="-Wl,-c,\$(shlib_opt)"
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$enable_pie" != "no"; then
|
if test "$enable_pie" != "no" -a -n "$GCC"; then
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -fPIE" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -fPIE" >&5
|
||||||
$as_echo_n "checking whether C compiler accepts -fPIE... " >&6; }
|
$as_echo_n "checking whether C compiler accepts -fPIE... " >&6; }
|
||||||
if ${ax_cv_check_cflags___fPIE+:} false; then :
|
if ${ax_cv_check_cflags___fPIE+:} false; then :
|
||||||
|
99
configure.in
99
configure.in
@@ -3219,60 +3219,79 @@ dnl This test relies on AC_LANG_WERROR
|
|||||||
dnl
|
dnl
|
||||||
if test -n "$LT_LDEXPORTS"; then
|
if test -n "$LT_LDEXPORTS"; then
|
||||||
if test "$lt_cv_prog_gnu_ld" = "yes"; then
|
if test "$lt_cv_prog_gnu_ld" = "yes"; then
|
||||||
cat > conftest.map <<-EOF
|
AC_CACHE_CHECK([whether ld supports anonymous map files],
|
||||||
{
|
[sudo_cv_var_gnu_ld_anon_map],
|
||||||
global: foo;
|
[
|
||||||
local: *;
|
|
||||||
};
|
|
||||||
EOF
|
|
||||||
AC_MSG_CHECKING([whether ld supports anonymous map files])
|
|
||||||
_CFLAGS="$CFLAGS"
|
|
||||||
CFLAGS="$CFLAGS $lt_prog_compiler_pic"
|
|
||||||
_LDFLAGS="$LDFLAGS"
|
|
||||||
LDFLAGS="$LDFLAGS -fpic -shared -Wl,--version-script,./conftest.map"
|
|
||||||
AC_TRY_LINK([int foo;], [], [
|
|
||||||
LT_LDEXPORTS=; LT_LDDEP="\$(shlib_map)"; LT_LDMAP="-Wl,--version-script,\$(shlib_map)"
|
|
||||||
])
|
|
||||||
CFLAGS="$_CFLAGS"
|
|
||||||
LDFLAGS="$_LDFLAGS"
|
|
||||||
else
|
|
||||||
case "$host" in
|
|
||||||
*-*-solaris2*)
|
|
||||||
cat > conftest.map <<-EOF
|
cat > conftest.map <<-EOF
|
||||||
{
|
{
|
||||||
global: foo;
|
global: foo;
|
||||||
local: *;
|
local: *;
|
||||||
};
|
};
|
||||||
EOF
|
EOF
|
||||||
AC_MSG_CHECKING([whether ld supports anonymous map files])
|
|
||||||
_CFLAGS="$CFLAGS"
|
_CFLAGS="$CFLAGS"
|
||||||
CFLAGS="$CFLAGS $lt_prog_compiler_pic"
|
CFLAGS="$CFLAGS $lt_prog_compiler_pic"
|
||||||
_LDFLAGS="$LDFLAGS"
|
_LDFLAGS="$LDFLAGS"
|
||||||
LDFLAGS="$LDFLAGS -shared -Wl,-M,./conftest.map"
|
LDFLAGS="$LDFLAGS -fpic -shared -Wl,--version-script,./conftest.map"
|
||||||
AC_TRY_LINK([int foo;], [], [
|
AC_TRY_LINK([int foo;], [], [
|
||||||
LT_LDEXPORTS=; LT_LDDEP="\$(shlib_map)"; LT_LDMAP="-Wl,-M,\$(shlib_map)"
|
sudo_cv_var_gnu_ld_anon_map=yes
|
||||||
])
|
])
|
||||||
CFLAGS="$_CFLAGS"
|
CFLAGS="$_CFLAGS"
|
||||||
LDFLAGS="$_LDFLAGS"
|
LDFLAGS="$_LDFLAGS"
|
||||||
|
]
|
||||||
|
)
|
||||||
|
if test "$sudo_cv_var_gnu_ld_anon_map" = "yes"; then
|
||||||
|
LT_LDEXPORTS=; LT_LDDEP="\$(shlib_map)"; LT_LDMAP="-Wl,--version-script,\$(shlib_map)"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
case "$host" in
|
||||||
|
*-*-solaris2*)
|
||||||
|
AC_CACHE_CHECK([whether ld supports anonymous map files],
|
||||||
|
[sudo_cv_var_solaris_ld_anon_map],
|
||||||
|
[
|
||||||
|
cat > conftest.map <<-EOF
|
||||||
|
{
|
||||||
|
global: foo;
|
||||||
|
local: *;
|
||||||
|
};
|
||||||
|
EOF
|
||||||
|
_CFLAGS="$CFLAGS"
|
||||||
|
CFLAGS="$CFLAGS $lt_prog_compiler_pic"
|
||||||
|
_LDFLAGS="$LDFLAGS"
|
||||||
|
LDFLAGS="$LDFLAGS -shared -Wl,-M,./conftest.map"
|
||||||
|
AC_TRY_LINK([int foo;], [], [
|
||||||
|
sudo_cv_var_solaris_ld_anon_map=yes
|
||||||
|
])
|
||||||
|
CFLAGS="$_CFLAGS"
|
||||||
|
LDFLAGS="$_LDFLAGS"
|
||||||
|
]
|
||||||
|
)
|
||||||
|
if test "$sudo_cv_var_solaris_ld_anon_map" = "yes"; then
|
||||||
|
LT_LDEXPORTS=; LT_LDDEP="\$(shlib_map)"; LT_LDMAP="-Wl,-M,\$(shlib_map)"
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
*-*-hpux*)
|
*-*-hpux*)
|
||||||
cat > conftest.opt <<-EOF
|
AC_CACHE_CHECK([whether ld supports controlling exported symbols],
|
||||||
+e foo
|
[sudo_cv_var_hpux_ld_symbol_export],
|
||||||
EOF
|
[
|
||||||
AC_MSG_CHECKING([whether ld supports controlling exported symbols])
|
echo "+e foo" > conftest.opt
|
||||||
_CFLAGS="$CFLAGS"
|
_CFLAGS="$CFLAGS"
|
||||||
CFLAGS="$CFLAGS $lt_prog_compiler_pic"
|
CFLAGS="$CFLAGS $lt_prog_compiler_pic"
|
||||||
_LDFLAGS="$LDFLAGS"
|
_LDFLAGS="$LDFLAGS"
|
||||||
if test -n "$GCC"; then
|
if test -n "$GCC"; then
|
||||||
LDFLAGS="$LDFLAGS -shared -Wl,-c,./conftest.opt"
|
LDFLAGS="$LDFLAGS -shared -Wl,-c,./conftest.opt"
|
||||||
else
|
else
|
||||||
LDFLAGS="$LDFLAGS -Wl,-b -Wl,-c,./conftest.opt"
|
LDFLAGS="$LDFLAGS -Wl,-b -Wl,-c,./conftest.opt"
|
||||||
fi
|
fi
|
||||||
AC_TRY_LINK([int foo;], [], [
|
AC_TRY_LINK([int foo;], [], [
|
||||||
|
sudo_cv_var_hpux_ld_symbol_export=yes
|
||||||
|
])
|
||||||
|
CFLAGS="$_CFLAGS"
|
||||||
|
LDFLAGS="$_LDFLAGS"
|
||||||
|
]
|
||||||
|
)
|
||||||
|
if test "$sudo_cv_var_hpux_ld_symbol_export" = "yes"; then
|
||||||
LT_LDEXPORTS=; LT_LDDEP="\$(shlib_opt)"; LT_LDOPT="-Wl,-c,\$(shlib_opt)"
|
LT_LDEXPORTS=; LT_LDDEP="\$(shlib_opt)"; LT_LDOPT="-Wl,-c,\$(shlib_opt)"
|
||||||
])
|
fi
|
||||||
CFLAGS="$_CFLAGS"
|
|
||||||
LDFLAGS="$_LDFLAGS"
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
@@ -3282,7 +3301,7 @@ dnl
|
|||||||
dnl Check for PIE executable support if using gcc.
|
dnl Check for PIE executable support if using gcc.
|
||||||
dnl This test relies on AC_LANG_WERROR
|
dnl This test relies on AC_LANG_WERROR
|
||||||
dnl
|
dnl
|
||||||
if test "$enable_pie" != "no"; then
|
if test "$enable_pie" != "no" -a -n "$GCC"; then
|
||||||
AX_CHECK_COMPILE_FLAG([-fPIE], [
|
AX_CHECK_COMPILE_FLAG([-fPIE], [
|
||||||
_CFLAGS="$CFLAGS"
|
_CFLAGS="$CFLAGS"
|
||||||
CFLAGS="$CFLAGS -fPIE"
|
CFLAGS="$CFLAGS -fPIE"
|
||||||
|
Reference in New Issue
Block a user