diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2017-03-01 16:57:34 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2017-04-28 13:32:51 +0000 |
commit | 2136e330bef96512d45b8a85b245b9ea95cf5106 (patch) | |
tree | 1067994fd72604ba14698ab1238dcff516a7e920 /configure.ac | |
parent | 1acc27c76f9721d9647d4bbeaac98eb6dd7b2f05 (diff) |
Generalize library names
On windows library names end with ".dll" and the prefix "lib" us usually
omitted. Take this into account and also drop the $(EXEEXT) workaround.
We don't need to use noinst_PROGRAMS as there is also noinst_DATA.
Change-Id: I7e4ba2432811d5ad85051ea0c9d5674eabf79b3c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index b9435477..b2e03bb5 100644 --- a/configure.ac +++ b/configure.ac @@ -63,6 +63,36 @@ AC_CONFIG_FILES([elfutils.spec:config/elfutils.spec.in]) AC_CANONICAL_HOST +case "$host_os" in + cygwin*|mingw*|msys*) + LIBEXT=".dll" + LIBPREFIX="" + eu_postfix_lib_version="no" + ;; + darwin) + LIBEXT=".dylib" + LIBPREFIX="lib" + eu_postfix_lib_version="no" + ;; + *) + LIBEXT=".so" + LIBPREFIX="lib" + eu_postfix_lib_version="yes" + ;; +esac + +AC_SUBST([LIBEXT]) +AC_DEFINE_UNQUOTED(LIBEXT, "$LIBEXT") +AH_TEMPLATE([LIBEXT], [Host system file name extension for dynamic libraries.]) +AC_SUBST([LIBPREFIX]) +AC_DEFINE_UNQUOTED(LIBPREFIX, "$LIBPREFIX") +AH_TEMPLATE([LIBPREFIX], [Host system file name prefix for dynamic libraries.]) +AM_CONDITIONAL(POSTFIX_LIB_VERSION, test "$eu_postfix_lib_version" = "yes") + +eu_LIBNAME(elf,1) +eu_LIBNAME(dw,1) +eu_LIBNAME(asm,1) + AC_ARG_ENABLE(deterministic-archives, [AS_HELP_STRING([--enable-deterministic-archives], [ar and ranlib default to -D behavior])], [ |