]> andersk Git - openssh.git/blobdiff - configure.ac
- djm@cvs.openbsd.org 2009/11/20 00:54:01
[openssh.git] / configure.ac
index a2566a2b9fe1977a87d41256f72a2ae6f9275b97..71b313c5943872262234e623cb31f84dbfec538d 100644 (file)
@@ -589,6 +589,7 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
                if it doesn't return EOPNOTSUPP.])
        AC_DEFINE(_PATH_BTMP, "/var/log/btmp", [log for bad login attempts])
        AC_DEFINE(USE_BTMP)
+       AC_DEFINE(LINUX_OOM_ADJUST, 1, [Adjust Linux out-of-memory killer])
        inet6_default_4in6=yes
        case `uname -r` in
        1.*|2.0.*)
@@ -672,7 +673,7 @@ mips-sony-bsd|mips-sony-newsos4)
                after setsid()])
        AC_DEFINE(PASSWD_NEEDS_USERNAME, 1, [must supply username to passwd
                in case the name is longer than 8 chars])
-       AC_DEFINE(BROKEN_TCGETATTR_ICANON, tcgetattr with ICANON may hang)
+       AC_DEFINE(BROKEN_TCGETATTR_ICANON, 1, [tcgetattr with ICANON may hang])
        external_path_file=/etc/default/login
        # hardwire lastlog location (can't detect it on some versions)
        conf_lastlog_location="/var/adm/lastlog"
@@ -3295,11 +3296,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`
@@ -3324,12 +3332,30 @@ AC_SEARCH_LIBS(getrrsetbyname, resolv,
                AC_SEARCH_LIBS(res_query, resolv)
                AC_SEARCH_LIBS(dn_expand, resolv)
                AC_MSG_CHECKING(if res_query will link)
-               AC_TRY_LINK_FUNC(res_query, AC_MSG_RESULT(yes),
+               AC_LINK_IFELSE([
+#include "confdefs.h"
+#include <sys/types.h>
+#include <netinet/in.h>
+#include <arpa/nameser.h>
+#include <netdb.h>
+#include <resolv.h>
+int main()
+{
+       res_query (0, 0, 0, 0, 0);
+       return 0;
+}
+                  ],
+                   AC_MSG_RESULT(yes),
                   [AC_MSG_RESULT(no)
                    saved_LIBS="$LIBS"
                    LIBS="$LIBS -lresolv"
                    AC_MSG_CHECKING(for res_query in -lresolv)
                    AC_LINK_IFELSE([
+#include "confdefs.h"
+#include <sys/types.h>
+#include <netinet/in.h>
+#include <arpa/nameser.h>
+#include <netdb.h>
 #include <resolv.h>
 int main()
 {
@@ -3337,8 +3363,7 @@ int main()
        return 0;
 }
                        ],
-                       [LIBS="$LIBS -lresolv"
-                        AC_MSG_RESULT(yes)],
+                       [AC_MSG_RESULT(yes)],
                        [LIBS="$saved_LIBS"
                         AC_MSG_RESULT(no)])
                    ])
@@ -3404,10 +3429,10 @@ AC_ARG_WITH(kerberos5,
                AC_DEFINE(KRB5, 1, [Define if you want Kerberos 5 support])
                KRB5_MSG="yes"
 
-               AC_MSG_CHECKING(for krb5-config)
-               if test -x  $KRB5ROOT/bin/krb5-config ; then
-                       KRB5CONF=$KRB5ROOT/bin/krb5-config
-                       AC_MSG_RESULT($KRB5CONF)
+               AC_PATH_PROG([KRB5CONF],[krb5-config],
+                            [$KRB5ROOT/bin/krb5-config],
+                            [$KRB5ROOT/bin:$PATH])
+               if test -x $KRB5CONF ; then
 
                        AC_MSG_CHECKING(for gssapi support)
                        if $KRB5CONF | grep gssapi >/dev/null ; then
@@ -3433,7 +3458,6 @@ AC_ARG_WITH(kerberos5,
                                         AC_MSG_RESULT(no)
                        )
                else
-                       AC_MSG_RESULT(no)
                        CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include"
                        LDFLAGS="$LDFLAGS -L${KRB5ROOT}/lib"
                        AC_MSG_CHECKING(whether we are using Heimdal)
This page took 0.039535 seconds and 4 git commands to generate.