diff options
author | Todd C. Miller <Todd.Miller@sudo.ws> | 2022-12-05 12:33:42 -0700 |
---|---|---|
committer | Todd C. Miller <Todd.Miller@sudo.ws> | 2022-12-05 12:33:42 -0700 |
commit | ccfbe83a62eb8942cfb5604bfc22955f17e9b87d (patch) | |
tree | 624e2ce89e8ad6e8c76f68c850641043e9cc2098 | |
parent | 89841351d8b9267cd0645fdb1b9a4a549bdd8f26 (diff) | |
download | sudo-ccfbe83a62eb8942cfb5604bfc22955f17e9b87d.tar.gz |
Move symbol visibility checks to m4/visibility.m4
-rw-r--r-- | MANIFEST | 1 | ||||
-rw-r--r-- | aclocal.m4 | 1 | ||||
-rwxr-xr-x | configure | 228 | ||||
-rw-r--r-- | configure.ac | 139 | ||||
-rw-r--r-- | m4/visibility.m4 | 140 |
5 files changed, 260 insertions, 249 deletions
@@ -434,6 +434,7 @@ m4/lt~obsolete.m4 m4/python.m4 m4/runlog.m4 m4/sudo.m4 +m4/visibility.m4 pathnames.h.in plugins/audit_json/Makefile.in plugins/audit_json/audit_json.c diff --git a/aclocal.m4 b/aclocal.m4 index 239cafa26..93d20ede7 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -27,3 +27,4 @@ m4_include([m4/lt~obsolete.m4]) m4_include([m4/python.m4]) m4_include([m4/runlog.m4]) m4_include([m4/sudo.m4]) +m4_include([m4/visibility.m4]) @@ -31602,84 +31602,9 @@ fi ;; esac -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts -Wl,--allow-multiple-definition" >&5 -printf %s "checking whether the linker accepts -Wl,--allow-multiple-definition... " >&6; } -if test ${ax_cv_check_ldflags___Wl___allow_multiple_definition+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) - ax_check_save_flags=$LDFLAGS - LDFLAGS="$LDFLAGS -Wl,--allow-multiple-definition" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int -main (void) -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - ax_cv_check_ldflags___Wl___allow_multiple_definition=yes -else case e in #( - e) ax_cv_check_ldflags___Wl___allow_multiple_definition=no ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$ax_check_save_flags ;; -esac -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_ldflags___Wl___allow_multiple_definition" >&5 -printf "%s\n" "$ax_cv_check_ldflags___Wl___allow_multiple_definition" >&6; } -if test x"$ax_cv_check_ldflags___Wl___allow_multiple_definition" = xyes -then : - -if test ${LDFLAGS+y} -then : - - case " $LDFLAGS " in #( - *" -Wl,--allow-multiple-definition "*) : - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : LDFLAGS already contains -Wl,--allow-multiple-definition"; } >&5 - (: LDFLAGS already contains -Wl,--allow-multiple-definition) 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } ;; #( - *) : - - as_fn_append LDFLAGS " -Wl,--allow-multiple-definition" - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : LDFLAGS=\"\$LDFLAGS\""; } >&5 - (: LDFLAGS="$LDFLAGS") 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; -esac - -else case e in #( - e) - LDFLAGS=-Wl,--allow-multiple-definition - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : LDFLAGS=\"\$LDFLAGS\""; } >&5 - (: LDFLAGS="$LDFLAGS") 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; -esac -fi - -else case e in #( - e) : ;; -esac -fi - - -if test -n "$GCC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -fvisibility=hidden" >&5 + if test -n "$GCC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -fvisibility=hidden" >&5 printf %s "checking whether C compiler accepts -fvisibility=hidden... " >&6; } if test ${ax_cv_check_cflags___fvisibility_hidden+y} then : @@ -31715,7 +31640,7 @@ printf "%s\n" "$ax_cv_check_cflags___fvisibility_hidden" >&6; } if test "x$ax_cv_check_cflags___fvisibility_hidden" = xyes then : - printf "%s\n" "#define HAVE_DSO_VISIBILITY 1" >>confdefs.h + printf "%s\n" "#define HAVE_DSO_VISIBILITY 1" >>confdefs.h if test ${CFLAGS+y} @@ -31751,16 +31676,16 @@ else case e in #( esac fi - LT_LDEXPORTS= - LT_LDDEP= + LT_LDEXPORTS= + LT_LDDEP= else case e in #( e) : ;; esac fi -else - case "$host_os" in + else + case "$host_os" in hpux*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Bhidden_def" >&5 printf %s "checking whether C compiler accepts -Bhidden_def... " >&6; } @@ -31963,29 +31888,29 @@ esac fi ;; - esac -fi + esac + fi -if test "$lt_cv_prog_gnu_ld" = "yes"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ld supports anonymous map files" >&5 + if test "$lt_cv_prog_gnu_ld" = "yes"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ld supports anonymous map files" >&5 printf %s "checking whether ld supports anonymous map files... " >&6; } if test ${sudo_cv_var_gnu_ld_anon_map+y} then : printf %s "(cached) " >&6 else case e in #( e) - sudo_cv_var_gnu_ld_anon_map=no - cat > conftest.map <<-EOF - { - global: foo; - local: *; - }; -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 + sudo_cv_var_gnu_ld_anon_map=no + cat > conftest.map <<-EOF + { + global: foo; + local: *; + }; + 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 @@ -32002,19 +31927,20 @@ then : fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - CFLAGS="$_CFLAGS" - LDFLAGS="$_LDFLAGS" + CFLAGS="$_CFLAGS" + LDFLAGS="$_LDFLAGS" + rm -f conftest.map - ;; + ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $sudo_cv_var_gnu_ld_anon_map" >&5 printf "%s\n" "$sudo_cv_var_gnu_ld_anon_map" >&6; } - if test "$sudo_cv_var_gnu_ld_anon_map" = "yes"; then - LT_LDDEP="\$(shlib_map)"; LT_LDEXPORTS="-Wl,--version-script,\$(shlib_map)" - fi -else - case "$host_os" in + if test "$sudo_cv_var_gnu_ld_anon_map" = "yes"; then + LT_LDDEP="\$(shlib_map)"; LT_LDEXPORTS="-Wl,--version-script,\$(shlib_map)" + fi + else + case "$host_os" in solaris2*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ld supports anonymous map files" >&5 printf %s "checking whether ld supports anonymous map files... " >&6; } @@ -32025,11 +31951,11 @@ else case e in #( e) sudo_cv_var_solaris_ld_anon_map=no cat > conftest.map <<-EOF - { - global: foo; - local: *; - }; -EOF + { + global: foo; + local: *; + }; + EOF _CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $lt_prog_compiler_pic" _LDFLAGS="$LDFLAGS" @@ -32053,6 +31979,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext CFLAGS="$_CFLAGS" LDFLAGS="$_LDFLAGS" + rm -f conftest.map ;; esac @@ -32111,8 +32038,85 @@ printf "%s\n" "$sudo_cv_var_hpux_ld_symbol_export" >&6; } LT_LDDEP="\$(shlib_opt)"; LT_LDEXPORTS="-Wl,-c,\$(shlib_opt)" fi ;; - esac + esac + fi + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts -Wl,--allow-multiple-definition" >&5 +printf %s "checking whether the linker accepts -Wl,--allow-multiple-definition... " >&6; } +if test ${ax_cv_check_ldflags___Wl___allow_multiple_definition+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) + ax_check_save_flags=$LDFLAGS + LDFLAGS="$LDFLAGS -Wl,--allow-multiple-definition" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ax_cv_check_ldflags___Wl___allow_multiple_definition=yes +else case e in #( + e) ax_cv_check_ldflags___Wl___allow_multiple_definition=no ;; +esac fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$ax_check_save_flags ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_ldflags___Wl___allow_multiple_definition" >&5 +printf "%s\n" "$ax_cv_check_ldflags___Wl___allow_multiple_definition" >&6; } +if test x"$ax_cv_check_ldflags___Wl___allow_multiple_definition" = xyes +then : + +if test ${LDFLAGS+y} +then : + + case " $LDFLAGS " in #( + *" -Wl,--allow-multiple-definition "*) : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : LDFLAGS already contains -Wl,--allow-multiple-definition"; } >&5 + (: LDFLAGS already contains -Wl,--allow-multiple-definition) 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } ;; #( + *) : + + as_fn_append LDFLAGS " -Wl,--allow-multiple-definition" + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : LDFLAGS=\"\$LDFLAGS\""; } >&5 + (: LDFLAGS="$LDFLAGS") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; +esac + +else case e in #( + e) + LDFLAGS=-Wl,--allow-multiple-definition + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : LDFLAGS=\"\$LDFLAGS\""; } >&5 + (: LDFLAGS="$LDFLAGS") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; +esac +fi + +else case e in #( + e) : ;; +esac +fi + if test "$enable_sanitizer" != "no"; then as_CACHEVAR=`printf "%s\n" "ax_cv_check_cflags__$enable_sanitizer" | sed "$as_sed_sh"` diff --git a/configure.ac b/configure.ac index ed395de16..27c15959d 100644 --- a/configure.ac +++ b/configure.ac @@ -4568,6 +4568,8 @@ case "$OS" in ;; esac +SUDO_SYMBOL_VISIBILITY + dnl dnl For fuzz_policy we redefine getaddrinfo() and freeaddrinfo(), but dnl this can cause problems with ld.lld when sanitizers are enabled. @@ -4575,143 +4577,6 @@ dnl AX_CHECK_LINK_FLAG([-Wl,--allow-multiple-definition], [AX_APPEND_FLAG([-Wl,--allow-multiple-definition], [LDFLAGS])]) dnl -dnl Check for symbol visibility support. -dnl This test relies on AC_LANG_WERROR -dnl -if test -n "$GCC"; then - AX_CHECK_COMPILE_FLAG([-fvisibility=hidden], [ - AC_DEFINE(HAVE_DSO_VISIBILITY) - AX_APPEND_FLAG([-fvisibility=hidden], [CFLAGS]) - LT_LDEXPORTS= - LT_LDDEP= - ]) -else - case "$host_os" in - hpux*) - AX_CHECK_COMPILE_FLAG([-Bhidden_def], [ - # HP-UX cc may not allow __declspec(dllexport) to be - # used in conjunction with #pragma HP_DEFINED_EXTERNAL - # when redefining standard libc functions. - AC_CACHE_CHECK([whether __declspec(dllexport) can be used when overriding libc functions], - [sudo_cv_var_hpux_declspec_libc_function], - [ - _CFLAGS="$CFLAGS" - CFLAGS="${CFLAGS} -Bhidden_def" - AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <stdlib.h> - __declspec(dllexport) char * getenv(const char *n) { return NULL; }]])], [ - sudo_cv_var_hpux_declspec_libc_function=yes - ], [ - sudo_cv_var_hpux_declspec_libc_function=no - ]) - CFLAGS="$_CFLAGS" - ] - ) - if test "$sudo_cv_var_hpux_declspec_libc_function" = "yes"; then - AC_DEFINE(HAVE_DSO_VISIBILITY) - AX_APPEND_FLAG([-Bhidden_def], [CFLAGS]) - LT_LDEXPORTS= - LT_LDDEP= - fi - ]) - ;; - solaris2*) - AX_CHECK_COMPILE_FLAG([-xldscope=hidden], [ - AC_DEFINE(HAVE_DSO_VISIBILITY) - AX_APPEND_FLAG([-xldscope=hidden], [CFLAGS]) - LT_LDEXPORTS= - LT_LDDEP= - ]) - ;; - esac -fi - -dnl -dnl Check whether ld supports version scripts (only GNU and Solaris ld). -dnl If possible, we use this even if the compiler has symbol visibility -dnl support so we will notice mismatches between the exports file and -dnl sudo_dso_public annotations in the source code. -dnl This test relies on AC_LANG_WERROR -dnl -if test "$lt_cv_prog_gnu_ld" = "yes"; then - AC_CACHE_CHECK([whether ld supports anonymous map files], - [sudo_cv_var_gnu_ld_anon_map], - [ - sudo_cv_var_gnu_ld_anon_map=no - cat > conftest.map <<-EOF - { - global: foo; - local: *; - }; -EOF - _CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $lt_prog_compiler_pic" - _LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -fpic -shared -Wl,--version-script,./conftest.map" - AC_LINK_IFELSE([AC_LANG_PROGRAM([[int foo;]], [[]])], - [sudo_cv_var_gnu_ld_anon_map=yes]) - CFLAGS="$_CFLAGS" - LDFLAGS="$_LDFLAGS" - ] - ) - if test "$sudo_cv_var_gnu_ld_anon_map" = "yes"; then - LT_LDDEP="\$(shlib_map)"; LT_LDEXPORTS="-Wl,--version-script,\$(shlib_map)" - fi -else - case "$host_os" in - solaris2*) - AC_CACHE_CHECK([whether ld supports anonymous map files], - [sudo_cv_var_solaris_ld_anon_map], - [ - sudo_cv_var_solaris_ld_anon_map=no - 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_LINK_IFELSE([AC_LANG_PROGRAM([[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_LDDEP="\$(shlib_map)"; LT_LDEXPORTS="-Wl,-M,\$(shlib_map)" - fi - ;; - hpux*) - AC_CACHE_CHECK([whether ld supports controlling exported symbols], - [sudo_cv_var_hpux_ld_symbol_export], - [ - sudo_cv_var_hpux_ld_symbol_export=no - echo "+e foo" > conftest.opt - _CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $lt_prog_compiler_pic" - _LDFLAGS="$LDFLAGS" - if test -n "$GCC"; then - LDFLAGS="$LDFLAGS -shared -Wl,-c,./conftest.opt" - else - LDFLAGS="$LDFLAGS -b -Wl,-c,./conftest.opt" - fi - AC_LINK_IFELSE([AC_LANG_PROGRAM([[int foo;]], [[]])], - [sudo_cv_var_hpux_ld_symbol_export=yes]) - CFLAGS="$_CFLAGS" - LDFLAGS="$_LDFLAGS" - rm -f conftest.opt - ] - ) - if test "$sudo_cv_var_hpux_ld_symbol_export" = "yes"; then - LT_LDDEP="\$(shlib_opt)"; LT_LDEXPORTS="-Wl,-c,\$(shlib_opt)" - fi - ;; - esac -fi - -dnl dnl Check for -fsanitize support dnl This test relies on AC_LANG_WERROR dnl diff --git a/m4/visibility.m4 b/m4/visibility.m4 new file mode 100644 index 000000000..4e07c27ae --- /dev/null +++ b/m4/visibility.m4 @@ -0,0 +1,140 @@ +AC_DEFUN([SUDO_SYMBOL_VISIBILITY], [ + dnl + dnl Check for symbol visibility support. + dnl This test relies on AC_LANG_WERROR + dnl + if test -n "$GCC"; then + AX_CHECK_COMPILE_FLAG([-fvisibility=hidden], [ + AC_DEFINE(HAVE_DSO_VISIBILITY) + AX_APPEND_FLAG([-fvisibility=hidden], [CFLAGS]) + LT_LDEXPORTS= + LT_LDDEP= + ]) + else + case "$host_os" in + hpux*) + AX_CHECK_COMPILE_FLAG([-Bhidden_def], [ + # HP-UX cc may not allow __declspec(dllexport) to be + # used in conjunction with #pragma HP_DEFINED_EXTERNAL + # when redefining standard libc functions. + AC_CACHE_CHECK([whether __declspec(dllexport) can be used when overriding libc functions], + [sudo_cv_var_hpux_declspec_libc_function], + [ + _CFLAGS="$CFLAGS" + CFLAGS="${CFLAGS} -Bhidden_def" + AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <stdlib.h> + __declspec(dllexport) char * getenv(const char *n) { return NULL; }]])], [ + sudo_cv_var_hpux_declspec_libc_function=yes + ], [ + sudo_cv_var_hpux_declspec_libc_function=no + ]) + CFLAGS="$_CFLAGS" + ] + ) + if test "$sudo_cv_var_hpux_declspec_libc_function" = "yes"; then + AC_DEFINE(HAVE_DSO_VISIBILITY) + AX_APPEND_FLAG([-Bhidden_def], [CFLAGS]) + LT_LDEXPORTS= + LT_LDDEP= + fi + ]) + ;; + solaris2*) + AX_CHECK_COMPILE_FLAG([-xldscope=hidden], [ + AC_DEFINE(HAVE_DSO_VISIBILITY) + AX_APPEND_FLAG([-xldscope=hidden], [CFLAGS]) + LT_LDEXPORTS= + LT_LDDEP= + ]) + ;; + esac + fi + + dnl + dnl Check whether ld supports version scripts (most ELF linkers). + dnl If possible, we use this even if the compiler has symbol visibility + dnl support so we will notice mismatches between the exports file and + dnl sudo_dso_public annotations in the source code. + dnl This test relies on AC_LANG_WERROR + dnl + if test "$lt_cv_prog_gnu_ld" = "yes"; then + AC_CACHE_CHECK([whether ld supports anonymous map files], + [sudo_cv_var_gnu_ld_anon_map], + [ + sudo_cv_var_gnu_ld_anon_map=no + cat > conftest.map <<-EOF + { + global: foo; + local: *; + }; + EOF + _CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $lt_prog_compiler_pic" + _LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -fpic -shared -Wl,--version-script,./conftest.map" + AC_LINK_IFELSE([AC_LANG_PROGRAM([[int foo;]], [[]])], + [sudo_cv_var_gnu_ld_anon_map=yes]) + CFLAGS="$_CFLAGS" + LDFLAGS="$_LDFLAGS" + rm -f conftest.map + ] + ) + if test "$sudo_cv_var_gnu_ld_anon_map" = "yes"; then + LT_LDDEP="\$(shlib_map)"; LT_LDEXPORTS="-Wl,--version-script,\$(shlib_map)" + fi + else + case "$host_os" in + solaris2*) + AC_CACHE_CHECK([whether ld supports anonymous map files], + [sudo_cv_var_solaris_ld_anon_map], + [ + sudo_cv_var_solaris_ld_anon_map=no + 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_LINK_IFELSE([AC_LANG_PROGRAM([[int foo;]], [[]])], + [sudo_cv_var_solaris_ld_anon_map=yes]) + CFLAGS="$_CFLAGS" + LDFLAGS="$_LDFLAGS" + rm -f conftest.map + ] + ) + if test "$sudo_cv_var_solaris_ld_anon_map" = "yes"; then + LT_LDDEP="\$(shlib_map)"; LT_LDEXPORTS="-Wl,-M,\$(shlib_map)" + fi + ;; + hpux*) + AC_CACHE_CHECK([whether ld supports controlling exported symbols], + [sudo_cv_var_hpux_ld_symbol_export], + [ + sudo_cv_var_hpux_ld_symbol_export=no + echo "+e foo" > conftest.opt + _CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $lt_prog_compiler_pic" + _LDFLAGS="$LDFLAGS" + if test -n "$GCC"; then + LDFLAGS="$LDFLAGS -shared -Wl,-c,./conftest.opt" + else + LDFLAGS="$LDFLAGS -b -Wl,-c,./conftest.opt" + fi + AC_LINK_IFELSE([AC_LANG_PROGRAM([[int foo;]], [[]])], + [sudo_cv_var_hpux_ld_symbol_export=yes]) + CFLAGS="$_CFLAGS" + LDFLAGS="$_LDFLAGS" + rm -f conftest.opt + ] + ) + if test "$sudo_cv_var_hpux_ld_symbol_export" = "yes"; then + LT_LDDEP="\$(shlib_opt)"; LT_LDEXPORTS="-Wl,-c,\$(shlib_opt)" + fi + ;; + esac + fi +]) |