summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorBjörn Esser <besser82@fedoraproject.org>2018-11-13 15:31:12 +0100
committerBjörn Esser <besser82@fedoraproject.org>2018-11-14 18:56:53 +0100
commit91e267c1e2599374d7f86897ae8b670d72d8474a (patch)
tree80d74be796dcad1b509184c8d02d9d62e35b5cbc /Makefile.am
parent9e9835dcb73a7576565893035e80fdc1ca795789 (diff)
downloadlibxcrypt-91e267c1e2599374d7f86897ae8b670d72d8474a.tar.gz
libxcrypt-91e267c1e2599374d7f86897ae8b670d72d8474a.tar.bz2
libxcrypt-91e267c1e2599374d7f86897ae8b670d72d8474a.zip
Install <xcrypt.h> and a symlink from libxcrypt.so to libcrypt.so.
This is needed as some configure scripts may look for symbols available in libxcrypt.so. For static libraries a corresponding symlink for the archive file will be installed. The installation of those compatibility files can be disabled by passing the '--disable-xcrypt-compat-files' flag to the configure script.
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am50
1 files changed, 47 insertions, 3 deletions
diff --git a/Makefile.am b/Makefile.am
index 34973e4..84894db 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -25,7 +25,6 @@ notrans_dist_man3_MANS = \
crypt_gensalt_rn.3
notrans_dist_man5_MANS = crypt.5
-include_HEADERS = xcrypt.h
nodist_include_HEADERS = crypt.h
nodist_noinst_HEADERS = crypt-hashes.h crypt-symbol-vers.h
noinst_HEADERS = \
@@ -36,6 +35,13 @@ noinst_HEADERS = \
alg-yescrypt-sysendian.h byteorder.h crypt-obsolete.h \
crypt-port.h test-des-cases.h
+if ENABLE_XCRYPT_COMPAT_FILES
+include_HEADERS = xcrypt.h
+else
+noinst_HEADERS += xcrypt.h
+endif
+
+
noinst_PROGRAMS = gen-des-tables
lib_LTLIBRARIES = libcrypt.la
@@ -52,6 +58,7 @@ libcrypt_la_SOURCES = \
EXTRA_DIST += alg-yescrypt-platform.c
pkgconfig_DATA = libxcrypt.pc
+
# Install libcrypt.pc symlink to libxcrypt.pc file.
phony_targets = \
install-data-hook-pkgconfig uninstall-hook-pkgconfig
@@ -129,6 +136,40 @@ crypt-hashes.h: hashes.lst gen-hashes.awk Makefile
$(srcdir)/hashes.lst > crypt-hashes.h.T
$(AM_V_at)mv -f crypt-hashes.h.T crypt-hashes.h
+install_exec_hook_targets =
+
+if ENABLE_XCRYPT_COMPAT_FILES
+if ENABLE_STATIC
+# Install libxcrypt.a symlink to libcrypt.a file.
+phony_targets += \
+ install-exec-hook-xcrypt-static uninstall-hook-xcrypt-static
+install_exec_hook_targets += \
+ install-exec-hook-xcrypt-static
+uninstall_hook_targets += \
+ uninstall-hook-xcrypt-static
+install-exec-hook-xcrypt-static:
+ cd $(DESTDIR)$(libdir) && \
+ $(LN_S) libcrypt.a libxcrypt.a
+uninstall-hook-xcrypt-static:
+ -rm -f $(DESTDIR)$(libdir)/libxcrypt.a
+endif
+
+if ENABLE_SHARED
+# Install libxcrypt.so symlink to libcrypt.so file.
+phony_targets += \
+ install-exec-hook-xcrypt-shared uninstall-hook-xcrypt-shared
+install_exec_hook_targets += \
+ install-exec-hook-xcrypt-shared
+uninstall_hook_targets += \
+ uninstall-hook-xcrypt-shared
+install-exec-hook-xcrypt-shared:
+ cd $(DESTDIR)$(libdir) && \
+ $(LN_S) libcrypt.so libxcrypt.so
+uninstall-hook-xcrypt-shared:
+ -rm -f $(DESTDIR)$(libdir)/libxcrypt.so
+endif
+endif
+
if ENABLE_COMPAT_SUSE
# When we are being binary compatible, also install symbolic links to
# mimic SUSE's libowcrypt; any program that uses -lowcrypt in its
@@ -146,7 +187,8 @@ if ENABLE_OBSOLETE_API
if ENABLE_STATIC
phony_targets += \
install-exec-hook-libstatic uninstall-hook-libstatic
-install-exec-hook: install-exec-hook-libstatic
+install_exec_hook_targets += \
+ install-exec-hook-libstatic
uninstall_hook_targets += \
uninstall-hook-libstatic
install-exec-hook-libstatic:
@@ -158,7 +200,8 @@ endif
if ENABLE_SHARED
phony_targets += \
install-exec-hook-libshared uninstall-hook-libshared
-install-exec-hook: install-exec-hook-libshared
+install_exec_hook_targets += \
+ install-exec-hook-libshared
uninstall_hook_targets += \
uninstall-hook-libshared
install-exec-hook-libshared:
@@ -268,4 +311,5 @@ include $(builddir)/Makefile.deps
# Add additional targets
.PHONY: $(phony_targets)
+install-exec-hook: $(install_exec_hook_targets)
uninstall-hook: $(uninstall_hook_targets)