From 8a9a351e9dd97da8cbdaea490f1b9c29946831c0 Mon Sep 17 00:00:00 2001 From: "Nate Bargmann, N0NB" Date: Fri, 30 Oct 2009 17:59:10 +0000 Subject: [PATCH] OSX patches from Stelios, M0GLD git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@2742 7ae35d74-ebe9-4afe-98af-79ac388436b8 --- configure.ac | 5 +++++ src/Makefile.am | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index a8d058bbb..b3ba947ef 100644 --- a/configure.ac +++ b/configure.ac @@ -187,6 +187,11 @@ darwin* | rhapsody*) # TODO: check the compiler actually does support these options CFLAGS="${CFLAGS} -no-cpp-precomp" CXXFLAGS="${CXXFLAGS} -no-cpp-precomp" + # Tell the OS X linker to allocate enough space inside the + # libhamlib.X.dylib shared object for install_name_tool(1) to + # work. This is useful when including hamlib in an app bundle. + OSXLDFLAGS="-Wl,-headerpad_max_install_names" + AC_SUBST([OSXLDFLAGS]) ;; mingw* | pw32* | cygwin*) WINLDFLAGS="-Wl,--output-def,libhamlib.def -Wl,--add-stdcall-alias" diff --git a/src/Makefile.am b/src/Makefile.am index 4bc4257a0..8a7b7a208 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -5,7 +5,7 @@ RIGSRC = rig.c serial.c misc.c register.c event.c cal.c conf.c tones.c \ lib_LTLIBRARIES = libhamlib.la libhamlib_la_SOURCES = $(RIGSRC) -libhamlib_la_LDFLAGS = $(WINLDFLAGS) -no-undefined -version-info @ABI_VERSION@:10:0 +libhamlib_la_LDFLAGS = $(WINLDFLAGS) $(OSXLDFLAGS) -no-undefined -version-info @ABI_VERSION@:10:0 libhamlib_la_CFLAGS = -DIN_HAMLIB $(AM_CFLAGS) -DHAMLIB_MODULE_DIR=\"$(libdir)\" libhamlib_la_LIBADD = @LIBLTDL@ $(top_builddir)/lib/libmisc.la \ @NET_LIBS@ @MATH_LIBS@ $(LIBUSB_LIBS)