diff options
| -rw-r--r-- | apps/Makefile.am | 26 | ||||
| -rw-r--r-- | configure.ac | 7 | ||||
| -rw-r--r-- | crypto/Makefile.am | 6 |
3 files changed, 27 insertions, 12 deletions
diff --git a/apps/Makefile.am b/apps/Makefile.am index d756e10..0547876 100644 --- a/apps/Makefile.am +++ b/apps/Makefile.am | |||
| @@ -90,18 +90,28 @@ EXTRA_DIST += openssl.cnf | |||
| 90 | EXTRA_DIST += x509v3.cnf | 90 | EXTRA_DIST += x509v3.cnf |
| 91 | 91 | ||
| 92 | install-exec-hook: | 92 | install-exec-hook: |
| 93 | @mkdir -p "$(DESTDIR)/$(OPENSSLDIR)" | 93 | @if [ "@OPENSSLDIR@x" != "x" ]; then \ |
| 94 | @for i in cert.pem openssl.cnf x509v3.cnf; do \ | 94 | OPENSSLDIR="$(DESTDIR)/@OPENSSLDIR@"; \ |
| 95 | if [ ! -f "$(DESTDIR)/$(OPENSSLDIR)/$i" ]; then \ | 95 | else \ |
| 96 | $(INSTALL) -m 644 "$(srcdir)/$$i" "$(DESTDIR)/$(OPENSSLDIR)/$$i"; \ | 96 | OPENSSLDIR="$(DESTDIR)/$(sysconfdir)/ssl"; \ |
| 97 | fi; \ | ||
| 98 | mkdir -p "$$OPENSSLDIR/certs"; \ | ||
| 99 | for i in cert.pem openssl.cnf x509v3.cnf; do \ | ||
| 100 | if [ ! -f "$$OPENSSLDIR/$i" ]; then \ | ||
| 101 | $(INSTALL) -m 644 "$(srcdir)/$$i" "$$OPENSSLDIR/$$i"; \ | ||
| 97 | else \ | 102 | else \ |
| 98 | echo " $(DESTDIR)/$(OPENSSLDIR)/$$i already exists, install will not overwrite"; \ | 103 | echo " $$OPENSSLDIR/$$i already exists, install will not overwrite"; \ |
| 99 | fi \ | 104 | fi \ |
| 100 | done | 105 | done |
| 101 | 106 | ||
| 102 | uninstall-local: | 107 | uninstall-local: |
| 103 | @for i in cert.pem openssl.cnf x509v3.cnf; do \ | 108 | @if [ "@OPENSSLDIR@x" != "x" ]; then \ |
| 104 | if cmp -s "$(DESTDIR)/$(OPENSSLDIR)/$$i" "$(srcdir)/$$i"; then \ | 109 | OPENSSLDIR="$(DESTDIR)/@OPENSSLDIR@"; \ |
| 105 | rm -f "$(DESTDIR)/$(OPENSSLDIR)/$$i"; \ | 110 | else \ |
| 111 | OPENSSLDIR="$(DESTDIR)/$(sysconfdir)/ssl"; \ | ||
| 112 | fi; \ | ||
| 113 | for i in cert.pem openssl.cnf x509v3.cnf; do \ | ||
| 114 | if cmp -s "$$OPENSSLDIR/$$i" "$(srcdir)/$$i"; then \ | ||
| 115 | rm -f "$$OPENSSLDIR/$$i"; \ | ||
| 106 | fi \ | 116 | fi \ |
| 107 | done | 117 | done |
diff --git a/configure.ac b/configure.ac index 4f6fb38..43ef0cd 100644 --- a/configure.ac +++ b/configure.ac | |||
| @@ -57,11 +57,10 @@ AC_CHECK_HEADERS([err.h]) | |||
| 57 | AC_ARG_WITH([openssldir], | 57 | AC_ARG_WITH([openssldir], |
| 58 | AS_HELP_STRING([--with-openssldir], | 58 | AS_HELP_STRING([--with-openssldir], |
| 59 | [Set the default openssl directory]), | 59 | [Set the default openssl directory]), |
| 60 | OPENSSLDIR="$withval", | 60 | OPENSSLDIR="$withval" |
| 61 | OPENSSLDIR="$sysconfdir/ssl" | 61 | AC_SUBST(OPENSSLDIR) |
| 62 | ) | 62 | ) |
| 63 | AC_SUBST(OPENSSLDIR) | 63 | AM_CONDITIONAL([OPENSSLDIR_DEFINED], [test x$with_openssldir != x]) |
| 64 | AC_DEFINE_UNQUOTED(OPENSSLDIR, "$OPENSSLDIR") | ||
| 65 | 64 | ||
| 66 | AC_ARG_ENABLE([extratests], | 65 | AC_ARG_ENABLE([extratests], |
| 67 | AS_HELP_STRING([--enable-extratests], [Enable extra tests that may be unreliable on some platforms])) | 66 | AS_HELP_STRING([--enable-extratests], [Enable extra tests that may be unreliable on some platforms])) |
diff --git a/crypto/Makefile.am b/crypto/Makefile.am index 4fba77b..f8c7108 100644 --- a/crypto/Makefile.am +++ b/crypto/Makefile.am | |||
| @@ -20,6 +20,12 @@ libcrypto_la_CPPFLAGS += -DOPENSSL_NO_ASM | |||
| 20 | endif | 20 | endif |
| 21 | endif | 21 | endif |
| 22 | 22 | ||
| 23 | if OPENSSLDIR_DEFINED | ||
| 24 | libcrypto_la_CPPFLAGS += -DOPENSSLDIR=\"@OPENSSLDIR@\" | ||
| 25 | else | ||
| 26 | libcrypto_la_CPPFLAGS += -DOPENSSLDIR=\"$(sysconfdir)/ssl\" | ||
| 27 | endif | ||
| 28 | |||
| 23 | noinst_LTLIBRARIES = libcompat.la libcompatnoopt.la | 29 | noinst_LTLIBRARIES = libcompat.la libcompatnoopt.la |
| 24 | 30 | ||
| 25 | # compatibility functions that need to be built without optimizations | 31 | # compatibility functions that need to be built without optimizations |
