]> git.saurik.com Git - wxWidgets.git/commitdiff
use specific linker flags under Mac OS X when linking executables against the
authorGilles Depeyrot <gilles_depeyrot@mac.com>
Fri, 19 Apr 2002 18:39:06 +0000 (18:39 +0000)
committerGilles Depeyrot <gilles_depeyrot@mac.com>
Fri, 19 Apr 2002 18:39:06 +0000 (18:39 +0000)
wxWindows dynamic shared library (LDFLAGS_EXE)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15205 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

configure
configure.in
src/make.env.in
src/makeprog.env.in
wx-config.in

index 8cb80b0d648b5686c6cb010ffaa6091592fb54cf..b5ebf1bd03af0c363b16876e847ae273a2eda9d0 100755 (executable)
--- a/configure
+++ b/configure
@@ -13570,7 +13570,7 @@ echo "$ac_t""$wx_cv_prog_icc" 1>&6
       *-*-darwin* )
                         CFLAGS="$CFLAGS -fno-common -DDYLIB_INIT"
         CXXFLAGS="$CXXFLAGS -fno-common -DDYLIB_INIT"
       *-*-darwin* )
                         CFLAGS="$CFLAGS -fno-common -DDYLIB_INIT"
         CXXFLAGS="$CXXFLAGS -fno-common -DDYLIB_INIT"
-                        LDFLAGS="$LDFLAGS -Wl,-bind_at_load"
+                        LDFLAGS_EXE="$LDFLAGS_EXE -Wl,-bind_at_load"
         SHARED_LD="$CXX -dynamiclib -init _wxWindowsDylibInit -o"
         PIC_FLAG="-dynamic -fPIC"
         SONAME_FLAGS="-compatibility_version ${WX_RELEASE} -current_version ${WX_VERSION}"
         SHARED_LD="$CXX -dynamiclib -init _wxWindowsDylibInit -o"
         PIC_FLAG="-dynamic -fPIC"
         SONAME_FLAGS="-compatibility_version ${WX_RELEASE} -current_version ${WX_VERSION}"
@@ -20471,10 +20471,11 @@ SAMPLES_SUBDIRS="`echo $SAMPLES_SUBDIRS | tr -s ' ' | tr ' ' '\n' | sort | uniq
 
 
 
 
 
 
+
 
 
 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
 
 
 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:20478: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:20479: checking whether ${MAKE-make} sets \${MAKE}" >&5
 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -20752,6 +20753,7 @@ s%@PORT_FILES@%$PORT_FILES%g
 s%@DISTDIR@%$DISTDIR%g
 s%@SAMPLES_SUBDIRS@%$SAMPLES_SUBDIRS%g
 s%@LDFLAGS_GL@%$LDFLAGS_GL%g
 s%@DISTDIR@%$DISTDIR%g
 s%@SAMPLES_SUBDIRS@%$SAMPLES_SUBDIRS%g
 s%@LDFLAGS_GL@%$LDFLAGS_GL%g
+s%@LDFLAGS_EXE@%$LDFLAGS_EXE%g
 s%@OPENGL_LIBS@%$OPENGL_LIBS%g
 s%@DMALLOC_LIBS@%$DMALLOC_LIBS%g
 s%@EXTRADEFS@%$EXTRADEFS%g
 s%@OPENGL_LIBS@%$OPENGL_LIBS%g
 s%@DMALLOC_LIBS@%$DMALLOC_LIBS%g
 s%@EXTRADEFS@%$EXTRADEFS%g
index c0f0c90fe16b6d14a02576eac4089e52e8be73c4..1903aa6f42e8707212e854245866c074ab170558 100644 (file)
@@ -2433,7 +2433,7 @@ if test "$wxUSE_SHARED" = "yes"; then
         CXXFLAGS="$CXXFLAGS -fno-common -DDYLIB_INIT"
         dnl Executables must necessarily fully bind the wxWindows library at
         dnl program launch otherwise lazy binding breaks RTTI class info
         CXXFLAGS="$CXXFLAGS -fno-common -DDYLIB_INIT"
         dnl Executables must necessarily fully bind the wxWindows library at
         dnl program launch otherwise lazy binding breaks RTTI class info
-        LDFLAGS="$LDFLAGS -Wl,-bind_at_load"
+        LDFLAGS_EXE="$LDFLAGS_EXE -Wl,-bind_at_load"
         SHARED_LD="$CXX -dynamiclib -init _wxWindowsDylibInit -o"
         PIC_FLAG="-dynamic -fPIC"
         SONAME_FLAGS="-compatibility_version ${WX_RELEASE} -current_version ${WX_VERSION}"
         SHARED_LD="$CXX -dynamiclib -init _wxWindowsDylibInit -o"
         PIC_FLAG="-dynamic -fPIC"
         SONAME_FLAGS="-compatibility_version ${WX_RELEASE} -current_version ${WX_VERSION}"
@@ -4883,6 +4883,7 @@ AC_SUBST(SAMPLES_SUBDIRS)
 dnl additional libraries and linker settings
 AC_SUBST(LDFLAGS)
 AC_SUBST(LDFLAGS_GL)
 dnl additional libraries and linker settings
 AC_SUBST(LDFLAGS)
 AC_SUBST(LDFLAGS_GL)
+AC_SUBST(LDFLAGS_EXE)
 AC_SUBST(OPENGL_LIBS)
 AC_SUBST(DMALLOC_LIBS)
 AC_SUBST(EXTRADEFS)
 AC_SUBST(OPENGL_LIBS)
 AC_SUBST(DMALLOC_LIBS)
 AC_SUBST(EXTRADEFS)
index 473217cd2f2d75fc3464839706221cad55f8ac58..f9a251650cd7ba42e1ba17d7a05fb55c16de5091 100644 (file)
@@ -75,3 +75,7 @@ PICFLAGS = @PIC_FLAG@
 # EXTRALIBS instead (see above)
 # LDFLAGS = @LDFLAGS@
 
 # EXTRALIBS instead (see above)
 # LDFLAGS = @LDFLAGS@
 
+# specific linker flags for when building executables since there
+# Mac OS X requires specific linker flags for executables linked
+# against dynamic shared libraries
+LDFLAGS_EXE = @LDFLAGS_EXE@
index 5611fbf13cfe5580d6fce07e1d27fd92781118c0..1b2d8aebd5f5c1cb1f7efda407bbe548de0ff9b8 100644 (file)
@@ -30,7 +30,7 @@ include $(top_builddir)/src/make.env
 all:    $(BIN_PROGRAM) @MACOSX_BUNDLE@ install_dirs install_data
 
 $(BIN_PROGRAM):        $(OBJECTS) $(top_builddir)/lib/@WX_TARGET_LIBRARY@ $(RES_PROGRAM_OBJ) @LIBWXMACRES@
 all:    $(BIN_PROGRAM) @MACOSX_BUNDLE@ install_dirs install_data
 
 $(BIN_PROGRAM):        $(OBJECTS) $(top_builddir)/lib/@WX_TARGET_LIBRARY@ $(RES_PROGRAM_OBJ) @LIBWXMACRES@
-       $(CXX) $(LDFLAGS) -o $(BIN_PROGRAM) $(OBJECTS) $(LDLIBS) $(LIBRARIES) $(RES_PROGRAM_OBJ)
+       $(CXX) $(LDFLAGS_EXE) -o $(BIN_PROGRAM) $(OBJECTS) $(LDLIBS) $(LIBRARIES) $(RES_PROGRAM_OBJ)
        @LIBWXMACRESCOMP@
 
 install_dirs:
        @LIBWXMACRESCOMP@
 
 install_dirs:
index 86218ba3ab0540274706e3962daf10a59b4927dd..f0380ce4312856d3d222e8a3989fab65f0a833cb 100755 (executable)
@@ -14,7 +14,8 @@ usage()
 {
     cat <<EOF
 Usage: wx-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--static]
 {
     cat <<EOF
 Usage: wx-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--static]
-                 [--libs] [--gl-libs] [--cppflags] [--cflags] [--cxxflags] [--rezflags]
+                 [--libs] [--gl-libs]
+                 [--cppflags] [--cflags] [--cxxflags] [--ldflags] [--rezflags]
                  [--cc] [--cxx] [--ld]
 
 wx-config returns configuration information about the installed
                  [--cc] [--cxx] [--ld]
 
 wx-config returns configuration information about the installed
@@ -88,6 +89,9 @@ while test $# -gt 0; do
     --cxxflags)
       echo `cppflags` @CODE_GEN_FLAGS@ @CODE_GEN_FLAGS_CXX@
       ;;
     --cxxflags)
       echo `cppflags` @CODE_GEN_FLAGS@ @CODE_GEN_FLAGS_CXX@
       ;;
+    --ldflags)
+      echo @LDFLAGS_EXE@
+      ;;
     --rezflags)
       echo @LIBWXMACRESWXCONFIG@
       ;;
     --rezflags)
       echo @LIBWXMACRESWXCONFIG@
       ;;