diff options
author | Adrian Thurston <thurston@colm.net> | 2018-12-13 15:43:35 +0200 |
---|---|---|
committer | Adrian Thurston <thurston@colm.net> | 2018-12-13 15:43:35 +0200 |
commit | fc1d61f4cab2260e90fcd468078eaa0d2046f372 (patch) | |
tree | e29f4f3321f86f7bdc479fb8bec84c50d7a7f31c | |
parent | 17991269d612fa8b1eb8ec6c43d072d813457a56 (diff) | |
download | ragel-fc1d61f4cab2260e90fcd468078eaa0d2046f372.tar.gz |
use -Wl,--no-undefined only on linux
refs #253
-rw-r--r-- | configure.ac | 3 | ||||
-rw-r--r-- | src/Makefile.am | 6 |
2 files changed, 8 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index abcdb699..cf06b9bd 100644 --- a/configure.ac +++ b/configure.ac @@ -84,6 +84,9 @@ AC_CHECK_PROG([ASCIIDOC], [asciidoc], [asciidoc]) AC_CHECK_PROG([PYGMENTIZE], [pygmentize], [pygmentize]) AM_CONDITIONAL([BUILD_MANUAL], [test "x$ASCIIDOC" != x && test "x$PYGMENTIZE" != x]) +AC_CANONICAL_HOST() +AM_CONDITIONAL([LINKER_NO_UNDEFINED], [test "x$host_os" = "xlinux-gnu"]) + dnl write output files AC_OUTPUT([ Makefile diff --git a/src/Makefile.am b/src/Makefile.am index 12497176..a9b48a70 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -42,7 +42,11 @@ lib_LTLIBRARIES = libcolm.la noinst_LIBRARIES = libprog.a libcolm_la_SOURCES = $(RUNTIME_SRC) -libcolm_la_LDFLAGS = -release ${PACKAGE_VERSION} +libcolm_la_LDFLAGS = -release ${PACKAGE_VERSION} -no-undefined + +if LINKER_NO_UNDEFINED +libcolm_la_LDFLAGS += -Wl,--no-undefined +endif common_CFLAGS = \ -Wall \ |