Don't hardcode libstdc++, fixes build on systems which don't provide it
clang ignores -lstdc++ even if it is absent from the system, giving the wrong hint to the configure, which proceeds to add it to the list of libraries. Then libtool fails because it can't find it. Why is clang ignoring -lstdc++? Convenience?
This commit is contained in:
parent
2538484cbe
commit
01a30de9b6
57
audio/adplug/patches/patch-configure
Normal file
57
audio/adplug/patches/patch-configure
Normal file
@ -0,0 +1,57 @@
|
||||
$OpenBSD: patch-configure,v 1.1 2017/10/12 15:04:52 jca Exp $
|
||||
|
||||
XXX libstdc++ detected even if not present
|
||||
|
||||
Index: configure
|
||||
--- configure.orig
|
||||
+++ configure
|
||||
@@ -15013,49 +15013,6 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
|
||||
|
||||
|
||||
# Check for needed libraries.
|
||||
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lstdc++" >&5
|
||||
-$as_echo_n "checking for main in -lstdc++... " >&6; }
|
||||
-if test "${ac_cv_lib_stdcpp_main+set}" = set; then :
|
||||
- $as_echo_n "(cached) " >&6
|
||||
-else
|
||||
- ac_check_lib_save_LIBS=$LIBS
|
||||
-LIBS="-lstdc++ $LIBS"
|
||||
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
-/* end confdefs.h. */
|
||||
-
|
||||
-
|
||||
-int
|
||||
-main ()
|
||||
-{
|
||||
-return main ();
|
||||
- ;
|
||||
- return 0;
|
||||
-}
|
||||
-_ACEOF
|
||||
-if ac_fn_cxx_try_link "$LINENO"; then :
|
||||
- ac_cv_lib_stdcpp_main=yes
|
||||
-else
|
||||
- ac_cv_lib_stdcpp_main=no
|
||||
-fi
|
||||
-rm -f core conftest.err conftest.$ac_objext \
|
||||
- conftest$ac_exeext conftest.$ac_ext
|
||||
-LIBS=$ac_check_lib_save_LIBS
|
||||
-fi
|
||||
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_stdcpp_main" >&5
|
||||
-$as_echo "$ac_cv_lib_stdcpp_main" >&6; }
|
||||
-if test "x$ac_cv_lib_stdcpp_main" = x""yes; then :
|
||||
- cat >>confdefs.h <<_ACEOF
|
||||
-#define HAVE_LIBSTDC__ 1
|
||||
-_ACEOF
|
||||
-
|
||||
- LIBS="-lstdc++ $LIBS"
|
||||
-
|
||||
-else
|
||||
- as_fn_error "libstdc++ not installed" "$LINENO" 5
|
||||
-fi
|
||||
-
|
||||
-
|
||||
-
|
||||
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
|
||||
if test -n "$ac_tool_prefix"; then
|
||||
# Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
|
Loading…
Reference in New Issue
Block a user