Permalink
Browse files

Add flags for reexporting libobjc and ObjFW.

  • Loading branch information...
1 parent 312c435 commit ac6df8bdf16913ae6be2506ccce269526b477f10 @Midar committed May 9, 2010
Showing with 16 additions and 1 deletion.
  1. +7 −0 configure.ac
  2. +1 −0 extra.mk.in
  3. +1 −0 src/Makefile
  4. +7 −1 utils/objfw-config.in
View
@@ -124,6 +124,13 @@ if test x"$PLUGIN_SUFFIX" != "x"; then
AC_SUBST(OFPLUGINS_DEF, "-DOF_PLUGINS")
fi
+case "$host_os" in
+ darwin*)
+ AC_SUBST(REEXPORT_LIBOBJC, [-Wl,-reexport-lobjc])
+ AC_SUBST(LDFLAGS_REEXPORT, [-Wl,-reexport-lobjfw])
+ ;;
+esac
+
AC_C_BIGENDIAN([
AC_DEFINE(OF_BIG_ENDIAN, 1, [Whether we are big endian])
AC_SUBST(ENDIANESS_DEF, "-DOF_BIG_ENDIAN")])
View
@@ -11,6 +11,7 @@ OFPLUGINTESTS_M = @OFPLUGINTESTS_M@
OFTHREAD_M = @OFTHREAD_M@
OFTHREADTESTS_M = @OFTHREADTESTS_M@
PROPERTIESTESTS_M = @PROPERTIESTESTS_M@
+REEXPORT_LIBOBJC = @REEXPORT_LIBOBJC@
TESTPLUGIN = @TESTPLUGIN@
TESTS = @TESTS@
TEST_LAUNCHER = @TEST_LAUNCHER@
View
@@ -51,3 +51,4 @@ include ../buildsys.mk
CPPFLAGS += -I.. ${LIB_CPPFLAGS}
OBJCFLAGS += ${LIB_CFLAGS}
LD = ${OBJC}
+LDFLAGS += ${REEXPORT_LIBOBJC}
View
@@ -10,6 +10,7 @@ OBJCFLAGS="@GNU_RUNTIME@ -fexceptions -fobjc-exceptions"
OBJCFLAGS="$OBJCFLAGS -fconstant-string-class=OFConstString"
OBJCFLAGS="$OBJCFLAGS @NO_CONST_CFSTRINGS@ @NO_WARN_UNUSED@ @ATOMIC_OBJCFLAGS@"
LDFLAGS=""
+LDFLAGS_REEXPORT="@LDFLAGS_REEXPORT@"
LDFLAGS_RPATH="@LDFLAGS_RPATH@"
LIBS="-L${libdir} -lobjfw @LIBS@"
VERSION="0.4-dev"
@@ -25,6 +26,7 @@ objfw-config: Available arguments are:
--objc Outputs the OBJC used to compile ObjFW
--objcflags Outputs the required OBJCFLAGS
--ldflags Outputs the required LDFLAGS
+ --reexport Outputs LDFLAGS to reexport ObjFW
--rpath Outputs LDFLAGS for using rpath
--libs Outputs the required LIBS
--version Outputs the installed version
@@ -42,7 +44,8 @@ while test ! -z "$1"; do
echo "$CXXFLAGS"
echo "$OBJCFLAGS"
echo "$LDFLAGS"
- echo "$RPATH_LDFLAGS"
+ echo "$LDFLAGS_REEXPORT"
+ echo "$LDFLAGS_RPATH"
echo "$LIBS"
;;
--cflags)
@@ -66,6 +69,9 @@ while test ! -z "$1"; do
--ldflags)
echo "$LDFLAGS"
;;
+ --reexport)
+ echo "$LDFLAGS_REEXPORT"
+ ;;
--rpath)
echo "$LDFLAGS_RPATH"
;;

0 comments on commit ac6df8b

Please sign in to comment.