about to rpm-ify it

master
Marc Wäckerlin 8 years ago
parent 85c9164da6
commit 4d8a5d0b7d
  1. 2
      COPYING
  2. 2
      INSTALL
  3. 51
      ax_init_standard_project.m4
  4. 8
      configure.ac

@ -1 +1 @@
/usr/share/automake-1.13/COPYING
/usr/share/automake-1.14/COPYING

@ -1 +1 @@
/usr/share/automake-1.13/INSTALL
/usr/share/automake-1.14/INSTALL

@ -733,7 +733,6 @@ EOF
AC_DEFUN([AX_PKG_REQUIRE], [
PKG_PROG_PKG_CONFIG
optional_flags="$5"
$6
$1_found=no
secondpar="m4_default([$2], [$1])"
PKG_CHECK_MODULES([$1], [m4_default([$2], [$1])], [
@ -813,8 +812,6 @@ AC_DEFUN([AX_PKG_REQUIRE], [
AC_MSG_ERROR([Feature $1 not found please install module $secondpar])
fi
fi
AX_DEB_BUILD_DEPEND([${DEV_DEB_DIST_PKG:-${DEV_DIST_PKG:-${$1_found}}-dev}])
AX_RPM_BUILD_DEPEND([${DEV_RPM_DIST_PKG:-${DEV-DIST_PKG:-${$1_found}}-devel}])
[$1]_CPPFLAGS="${$1_CFLAGS}"
[$1]_CXXFLAGS="${$1_CFLAGS}"
AC_SUBST([$1]_CPPFLAGS)
@ -827,6 +824,33 @@ AC_DEFUN([AX_PKG_REQUIRE], [
else
AC_MSG_NOTICE([To enable $1, add $1_CPPFLAGS, $1_CXXFLAGS and $1_LIBS])
fi
DEV_DEB_DIST_PKG=
DEV_RPM_DIST_PKG=
DEV_DIST_PKG=
pkg=m4_default([$2], [$1])
$6
dep_pkg=${DEV_DEB_DIST_PKG:-${DEV_DIST_PKG:-${pkg}}-dev}
rpm_pkg=${DEV_RPM_DIST_PKG:-${DEV_DIST_PKG:-${pkg}}-devel}
if test -n "$4"; then
for f in $pkg $4; do
if test -n "$(apt-cache policy -q ${f}-dev 2> /dev/null)"; then
deb_pkg=${f}-dev
break
fi
done
for f in $pkg $4; do
if (test -x /usr/bin/zypper && zypper search -x "${f}-devel" 1>&2 > /dev/n ull) || \
(test -x /usr/bin/dnf && dnf list -q "${f}-devel" 1>&2 > /dev/null) || \
(test -x /usr/bin/yum && yum list -q "${f}-devel" 1>&2 > /dev/null) || \
(test -x /usr/sbin/urpmq && urpmq "${f}-devel" 1>&2 > /dev/null); then
rpm_pkg=${f}-devel
break
fi
done
fi
AX_DEB_BUILD_DEPEND([$deb_pkg])
AX_RPM_BUILD_DEPEND([$rpm_pkg])
])
# check if a specific package exists
@ -848,7 +872,6 @@ AC_DEFUN([AX_PKG_REQUIRE], [
# sets all flags, so that the module can be used everywhere
AC_DEFUN([AX_PKG_CHECK], [
optional_flags="$3"
$4
PKG_PROG_PKG_CONFIG
PKG_CHECK_MODULES([$1], [m4_default([$2], [$1])], [
HAVE_$1=1
@ -872,13 +895,29 @@ AC_DEFUN([AX_PKG_CHECK], [
], [
HAVE_$1=0
])
AX_DEB_BUILD_DEPEND([${DEV_DEB_DIST_PKG:-${DEV_DIST_PKG:-m4_default([$2], [$1])}-dev}])
AX_RPM_BUILD_DEPEND([${DEV_RPM_DIST_PKG:-${DEV-DIST_PKG:-m4_default([$2], [$1])}-devel}])
AM_CONDITIONAL(HAVE_$1, test $HAVE_[$1] -eq 1)
AC_SUBST(HAVE_$1)
AC_SUBST(CPPFLAGS)
AC_SUBST(CXXFLAGS)
AC_SUBST(PKG_REQUIREMENTS)
DEV_DEB_DIST_PKG=
DEV_RPM_DIST_PKG=
DEV_DIST_PKG=
pkg=m4_default([$2], [$1])
$4
dep_pkg=${DEV_DEB_DIST_PKG:-${DEV_DIST_PKG:-${pkg}}-dev}
rpm_pkg=${DEV_RPM_DIST_PKG:-${DEV_DIST_PKG:-${pkg}}-devel}
if test -n "$(apt-cache policy -q ${deb_pkg} 2> /dev/null)"; then
AX_DEB_BUILD_DEPEND([$deb_pkg])
fi
if (test -x /usr/bin/zypper && zypper search -x "$rpm_pkg" 1>&2 > /dev/n ull) || \
(test -x /usr/bin/dnf && dnf list -q "$rpm_pkg" 1>&2 > /dev/null) || \
(test -x /usr/bin/yum && yum list -q "$rpm_pkg" 1>&2 > /dev/null) || \
(test -x /usr/sbin/urpmq && urpmq "$rpm_pkg" 1>&2 > /dev/null); then
AX_RPM_BUILD_DEPEND([$rpm_pkg])
fi
)
])
# make sure, a specific header exists

@ -51,10 +51,10 @@ CPPFLAGS="${CPPFLAGS} -DQT_NO_KEYWORDS"
# libraries used
if test -z "$MINGW"; then
AX_PKG_REQUIRE([pcsc], [libpcsclite], [pcsclite.h], [], [], [DEV_DIST_PKG=libpcsclite;DEV_RPM_DIST_PKG=pcsc-lite-devel])
AX_PKG_REQUIRE([pkcs11], [p11-kit-1], [pkcs11.h], [p11-kit libpkcs11-helper-1 libp11], [], [DEV_DIST_PKG=pkcs11-helper;DEV_DEB_DIST_PKG=libpkcs11-helper1-dev])
AX_PKG_REQUIRE([ssl], [libssl], [openssl/crypto.h], [openssl], [], [DEV_RPM_DIST_PKG=libopenssl-devel])
AX_PKG_REQUIRE([crypto], [libcrypto], [openssl/crypto.h], [openssl], [], [DEV_DIST_PKG=libssl;DEV_RPM_DIST_PKG=libopenssl-devel])
AX_PKG_REQUIRE([pcsc], [libpcsclite], [pcsclite.h], [libpcsclite pcsc-lite])
AX_PKG_REQUIRE([pkcs11], [p11-kit-1], [pkcs11.h], [p11-kit libpkcs11-helper-1 libp11 libpkcs11-helper1])
AX_PKG_REQUIRE([ssl], [libssl], [openssl/crypto.h], [openssl libopenssl])
AX_PKG_REQUIRE([crypto], [libcrypto], [openssl/crypto.h], [libssl openssl libopenssl])
else
LDFLAGS+=" -lwinscard -lssl -lcrypto"
fi

Loading…
Cancel
Save