diff --git a/MacOSX/build-package.in b/MacOSX/build-package.in index f3c4008c..9c00b5a8 100755 --- a/MacOSX/build-package.in +++ b/MacOSX/build-package.in @@ -46,10 +46,10 @@ rm -rf target make install DESTDIR=${BUILDPATH}/target # remove garbage -rm -f target/Library/OpenSC/lib/*.la +rm -f target/$PREFIX/lib/*.la # generate .bundle (required by Adobe Acrobat) -./MacOSX/libtool-bundle target/Library/OpenSC/lib/opensc-pkcs11.so target/Library/OpenSC/lib +./MacOSX/libtool-bundle target/$PREFIX/lib/opensc-pkcs11.so target/$PREFIX/lib # Check out OpenSC.tokend, if not already fetched. if ! test -e OpenSC.tokend; then @@ -79,7 +79,7 @@ pkgbuild --nopayload --identifier org.opensc-project.mac.uninstall --scripts Mac rm -f OpenSC-@PACKAGE_VERSION@.dmg TIMESTAMP=$(date +%Y.%m.%d) i=0 -while ! hdiutil create -srcfolder Uninstall_OpenSC.pkg -srcfolder OpenSC-@PACKAGE_VERSION@.pkg -volname "OpenSC @PACKAGE_VERSION@ for Mac OS X 10.9+ (${TIMESTAMP})" OpenSC-@PACKAGE_VERSION@.dmg +while ! hdiutil create -srcfolder Uninstall_OpenSC.pkg -srcfolder OpenSC-@PACKAGE_VERSION@.pkg -volname "OpenSC @PACKAGE_VERSION@ for Mac OS X 10.10+ (${TIMESTAMP})" OpenSC-@PACKAGE_VERSION@.dmg do i=$[$i+1] if [ $i -gt 2 ] diff --git a/MacOSX/scripts/postinstall b/MacOSX/scripts/postinstall index 77ecc3fc..2ae745c0 100755 --- a/MacOSX/scripts/postinstall +++ b/MacOSX/scripts/postinstall @@ -1,8 +1,8 @@ #!/bin/bash -if !([ -e "/usr/lib/opensc-pkcs11.so" ]) +if !([ -e "/usr/local/lib/opensc-pkcs11.so" ]) then - ln -s /Library/OpenSC/lib/opensc-pkcs11.so /usr/lib/opensc-pkcs11.so + ln -s /Library/OpenSC/lib/opensc-pkcs11.so /usr/local/lib/opensc-pkcs11.so fi if [ -e "/Library/OpenSC/etc/opensc.conf.md5" ] then diff --git a/configure.ac b/configure.ac index 37b330f0..4f8dea18 100644 --- a/configure.ac +++ b/configure.ac @@ -494,6 +494,10 @@ case "${enable_openssl}" in have_openssl="no" ;; detect) + saved_CFLAGS="${CFLAGS}" + CFLAGS="${CFLAGS} ${OPENSSL_CFLAGS}" + AC_CHECK_HEADERS([openssl/crypto.h],,[have_openssl="no"]) + CFLAGS="${saved_CFLAGS}" if test "${have_openssl}" = "yes"; then enable_openssl="yes" else @@ -602,7 +606,7 @@ fi if test "${with_pkcs11_provider}" = "detect"; then case "${host}" in *-*-darwin*) - DEFAULT_PKCS11_PROVIDER="opensc-pkcs11.dylib" + DEFAULT_PKCS11_PROVIDER="opensc-pkcs11.so" ;; *-mingw*|*-winnt*|*-cygwin*) DEFAULT_PKCS11_PROVIDER="opensc-pkcs11.dll"