Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
Unhappy with fixes for mac-compilation
Jenna:
New patch, that includes the check-link macro, as it is not installed on all platforms, requires at least autoconf 2.64:
--- Code: (diff) ---commit ed4eaf496c3c1297119d3888ecc3152d32bcb458
Author: None <github@jenslody.de>
Date: Mon May 4 00:12:48 2015 +0200
- check whether the linker accepts "--no-undefined", should fix https://sourceforge.net/p/codeblocks/tickets/9 correctly
Index: acinclude.m4
===================================================================
--- acinclude.m4
+++ acinclude.m4
@@ -59,6 +59,23 @@
AM_CONDITIONAL(CODEBLOCKS_DARWIN, test x$darwin = xtrue )
])
+dnl copied and renamed from autoconf-archive AX_CHECK_LINK_FLAG
+AC_DEFUN([CODEBLOCKS_CHECK_LINK_FLAG],
+[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
+AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_ldflags_$4_$1])dnl
+AC_CACHE_CHECK([whether the linker accepts $1], CACHEVAR, [
+ ax_check_save_flags=$LDFLAGS
+ LDFLAGS="$LDFLAGS $4 $1"
+ AC_LINK_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
+ [AS_VAR_SET(CACHEVAR,[yes])],
+ [AS_VAR_SET(CACHEVAR,[no])])
+ LDFLAGS=$ax_check_save_flags])
+AS_VAR_IF(CACHEVAR,yes,
+ [m4_default([$2], :)],
+ [m4_default([$3], :)])
+AS_VAR_POPDEF([CACHEVAR])dnl
+])dnl CODEBLOCKS_CHECK_LINK_FLAG
+
dnl check whether to enable debugging
AC_DEFUN([CODEBLOCKS_CHECK_DEBUG],
[
Index: configure.ac
===================================================================
--- configure.ac
+++ configure.ac
@@ -21,8 +21,6 @@
AM_CONDITIONAL([LINUX], [test `uname` = "Linux"])
AM_CONDITIONAL([DARWIN], [test `uname` = "Darwin"])
-CODEBLOCKS_CHECK_DEBUG
-
dnl Checks for programs.
AC_PROG_CXX
AC_PROG_CPP
@@ -33,6 +31,10 @@
AC_PROG_MAKE_SET
AC_PROG_AWK
+CODEBLOCKS_CHECK_LINK_FLAG([-Wl,--no-undefined],[LDFLAGS="-Wl,--no-undefined $LDFLAGS"])
+
+CODEBLOCKS_CHECK_DEBUG
+
CODEBLOCKS_SETUP_FOR_TARGET
AC_DISABLE_STATIC
--- End code ---
Navigation
[0] Message Index
[*] Previous page
Go to full version