diff options
author | Steve Dickson <steved@redhat.com> | 2015-08-28 09:26:27 -0400 |
---|---|---|
committer | Steve Dickson <steved@redhat.com> | 2015-08-28 09:26:27 -0400 |
commit | e9b9af7a07e8008f82b0c89ec2125414c2194dc8 (patch) | |
tree | 49b8622d08917fb8ef1a8a18703623472915ca75 | |
parent | b2c9430f46c4ac848957fb8adaac176a3f6ac03f (diff) | |
download | ti-rpc-e9b9af7a07e8008f82b0c89ec2125414c2194dc8.tar.gz |
Make no-undefined linker flag depending on OSlibtirpc-0-3-3-rc3
Not all linker understand the --no-undefined option. On Linux,
it is always supported, so start only enabling this option here.
Other OS needs to be added, if needed.
Signed-off-by: Thorsten Kukuk <kukuk@thkukuk.de>
Signed-off-by: Steve Dickson <steved@redhat.com>
-rw-r--r-- | configure.ac | 15 | ||||
-rw-r--r-- | src/Makefile.am | 2 |
2 files changed, 16 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 06f2fca..4d18efa 100644 --- a/configure.ac +++ b/configure.ac @@ -66,6 +66,21 @@ AC_ARG_ENABLE(symvers, [],[enable_symvers=yes]) AM_CONDITIONAL(SYMVERS, test "x$enable_symvers" = xyes) +AC_CANONICAL_BUILD +# Check for which host we are on and setup a few things +# specifically based on the host +case $build_os in + linux*) + # Do something specific for linux + LDFLAG_NOUNDEFINED="-Wl,--no-undefined" + AC_SUBST(LDFLAG_NOUNDEFINED) + ;; + *) + #Default Case + ;; +esac + + AC_CONFIG_HEADERS([config.h]) AC_PROG_LIBTOOL AC_HEADER_DIRENT diff --git a/src/Makefile.am b/src/Makefile.am index 0fb827b..d94a8e9 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -12,7 +12,7 @@ AM_CPPFLAGS = -I$(top_srcdir)/tirpc -include config.h -DPORTMAP -DINET6 \ lib_LTLIBRARIES = libtirpc.la -libtirpc_la_LDFLAGS = -Wl,-no-undefined -lpthread +libtirpc_la_LDFLAGS = @LDFLAG_NOUNDEFINED@ -lpthread libtirpc_la_LDFLAGS += -version-info @LT_VERSION_INFO@ libtirpc_la_SOURCES = auth_none.c auth_unix.c authunix_prot.c bindresvport.c clnt_bcast.c \ |