]> granicus.if.org Git - sudo/commitdiff
Add -lskey or -lopie directly to SUDO_LIBS instead of having AC_CHECK_LIB()
authorTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 21 Mar 2003 20:10:22 +0000 (20:10 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 21 Mar 2003 20:10:22 +0000 (20:10 +0000)
add them to LIBS.  Fixes visudo linkage.

configure.in

index 07ba34acc7a0a0db25d2c63afb98e7c37e14c553..309e947bf8fd88b0dc65a46422263f7434140e64 100644 (file)
@@ -1881,9 +1881,10 @@ if test -n "$with_skey"; then
     if test "$found" = "no"; then
        AC_MSG_WARN([Unable to locate skey.h, you will have to edit the Makefile and add -I/path/to/skey/includes to CPPFLAGS])
     fi
-    AC_CHECK_LIB(skey, main, , [AC_MSG_WARN([Unable to locate libskey.a, you will have to edit the Makefile and add -L/path/to/skey/lib to SUDO_LDFLAGS])])
+    AC_CHECK_LIB(skey, main, [found=yes], [AC_MSG_WARN([Unable to locate libskey.a, you will have to edit the Makefile and add -L/path/to/skey/lib to SUDO_LDFLAGS])])
     AC_CHECK_LIB(skey, skeyaccess, AC_DEFINE(HAVE_SKEYACCESS, 1, [Define if your S/Key library has skeyaccess().]))
     LDFLAGS="$O_LDFLAGS"
+    SUDO_LIBS="${SUDO_LIBS} -lskey"
 fi
 
 dnl
@@ -1913,8 +1914,9 @@ if test -n "$with_opie"; then
     if test "$found" = "no"; then
        AC_MSG_WARN([Unable to locate opie.h, you will have to edit the Makefile and add -I/path/to/opie/includes to CPPFLAGS])
     fi
-    AC_CHECK_LIB(opie, main, , [AC_MSG_WARN([Unable to locate libopie.a, you will have to edit the Makefile and add -L/path/to/opie/lib to SUDO_LDFLAGS])])
+    AC_CHECK_LIB(opie, main, [found=yes], [AC_MSG_WARN([Unable to locate libopie.a, you will have to edit the Makefile and add -L/path/to/opie/lib to SUDO_LDFLAGS])])
     LDFLAGS="$O_LDFLAGS"
+    SUDO_LIBS="${SUDO_LIBS} -lopie"
 fi
 
 dnl