]> andersk Git - openssh.git/blobdiff - configure.ac
- (dtucker) Bug #1160: use pkg-config for opensc config if it's available.
[openssh.git] / configure.ac
index a0c50e30021637023cbb124f260a4f6aa17d57d1..2de30f338b212b5d72eaadf5f6d04a91ea757c30 100644 (file)
@@ -3295,11 +3295,18 @@ AC_ARG_WITH(opensc,
        [  --with-opensc[[=PFX]]     Enable smartcard support using OpenSC (optionally in PATH)],
        [
            if test "x$withval" != "xno" ; then
-               if test "x$withval" != "xyes" ; then
-                       OPENSC_CONFIG=$withval/bin/opensc-config
+               AC_PATH_PROG(PKGCONFIG, pkg-config, no)
+               AC_MSG_CHECKING(how to get opensc config)
+               if test "x$withval" != "xyes" -a "x$PKGCONFIG" = "xno"; then
+                       OPENSC_CONFIG="$withval/bin/opensc-config"
+               elif test -f "$withval/src/libopensc/libopensc.pc"; then
+                       OPENSC_CONFIG="$PKGCONFIG $withval/src/libopensc/libopensc.pc"
+               elif test "x$PKGCONFIG" != "xno"; then
+                       OPENSC_CONFIG="$PKGCONFIG libopensc"
                else
-                       AC_PATH_PROG(OPENSC_CONFIG, opensc-config, no)
+                       AC_PATH_PROG(OPENSC_CONFIG, opensc-config, no)
                fi
+               AC_MSG_RESULT($OPENSC_CONFIG)
                if test "$OPENSC_CONFIG" != "no"; then
                        LIBOPENSC_CFLAGS=`$OPENSC_CONFIG --cflags`
                        LIBOPENSC_LIBS=`$OPENSC_CONFIG --libs`
This page took 0.032208 seconds and 4 git commands to generate.