From b169eb0ce8604cb43d4f10d7be7d3d606130bf02 Mon Sep 17 00:00:00 2001 From: Jean-Paul Saman Date: Sun, 28 Aug 2011 11:06:13 +0200 Subject: [PATCH] Use -no-undefined when bullding for MacOS X (cherry picked from commit 5e384da06e9d0b417338ed5779681dcb3df6e78d) --- configure.ac | 2 ++ src/Makefile.am | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/configure.ac b/configure.ac index dbdf337..63e98d2 100644 --- a/configure.ac +++ b/configure.ac @@ -24,11 +24,13 @@ dnl check the operating system case "${target_os}" in darwin*) CFLAGS="${CFLAGS} -no-cpp-precomp" + have_darwin="yes" ;; *mingw32* | *cygwin* | *wince* | *mingwce*) have_win32="yes" ;; esac +AM_CONDITIONAL(HAVE_DARWIN, test "${have_darwin}" = "yes") AM_CONDITIONAL(HAVE_WIN32, test "${have_win32}" = "yes") dnl --enable-debug diff --git a/src/Makefile.am b/src/Makefile.am index 2252f28..00465f6 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -16,8 +16,12 @@ libdvbpsi_la_LDFLAGS = -version-info 7:0:0 if HAVE_WIN32 libdvbpsi_la_LDFLAGS += -no-undefined else +if HAVE_DARWIN +libdvbpsi_la_LDFLAGS += -no-undefined +else libdvbpsi_la_LDFLAGS += -Wl,--no-undefined endif +endif pkginclude_HEADERS = dvbpsi.h psi.h descriptor.h demux.h \ tables/pat.h tables/pmt.h tables/sdt.h tables/eit.h \ -- GitLab