summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorKarel Zak2011-10-27 15:13:40 +0200
committerKarel Zak2011-11-03 12:32:50 +0100
commit8d35bdc917b6dd0f2411cd1ea6ee33dac77265f6 (patch)
tree231288a79e4e18330d730a0bb71c7658242d70d6 /configure.ac
parentchsh: remove non-PAM code (diff)
downloadkernel-qcow2-util-linux-8d35bdc917b6dd0f2411cd1ea6ee33dac77265f6.tar.gz
kernel-qcow2-util-linux-8d35bdc917b6dd0f2411cd1ea6ee33dac77265f6.tar.xz
kernel-qcow2-util-linux-8d35bdc917b6dd0f2411cd1ea6ee33dac77265f6.zip
build-sys: cleanup HAVE_LIBCRYPT
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac68
1 files changed, 33 insertions, 35 deletions
diff --git a/configure.ac b/configure.ac
index 48b53dbcb..facc9e41f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -429,6 +429,39 @@ AC_CHECK_DECLS([CPU_ALLOC], [], [], [[
#include <sched.h>
]])
+# on Solaris, you can't mix and match standards, since we use c99
+# aparently at this stage, XOPEN_SOURCE will conflict. As workaround,
+# check for crypt.h and use that without XOPEN_SOURCE.
+AC_CHECK_HEADERS([crypt.h])
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+#ifdef HAVE_CRYPT_H
+#include <crypt.h>
+#else
+#define _XOPEN_SOURCE
+#include <unistd.h>
+#endif
+]], [[
+char *c = crypt("abc","pw");
+]])],[],[
+ LIBS="$LIBS -lcrypt"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ #ifdef HAVE_CRYPT_H
+ #include <crypt.h>
+ #else
+ #define _XOPEN_SOURCE
+ #include <unistd.h>
+ #endif
+ ]], [[
+ char *c = crypt("abc","pw");
+ ]])],[
+ AC_DEFINE(HAVE_LIBCRYPT, 1, [Do we need -lcrypt?])
+ have_libcrypt=yes
+ ],[
+ AC_MSG_ERROR([crypt() is not available])
+ ])
+])
+AM_CONDITIONAL(HAVE_LIBCRYPT, test "x$have_libcrypt" = xyes)
+
AC_ARG_ENABLE([most-builds],
AS_HELP_STRING([--enable-most-builds], [build everthing other than experimental code]),
@@ -637,41 +670,6 @@ else
AM_CONDITIONAL(HAVE_UTEMPTER, false)
fi
-# on Solaris, you can't mix and match standards, since we use c99
-# aparently at this stage, XOPEN_SOURCE will conflict. As workaround,
-# check for crypt.h and use that without XOPEN_SOURCE.
-AC_CHECK_HEADERS([crypt.h])
-AC_LINK_IFELSE([AC_LANG_PROGRAM([[
-#ifdef HAVE_CRYPT_H
-#include <crypt.h>
-#else
-#define _XOPEN_SOURCE
-#include <unistd.h>
-#endif
-]], [[
-char *c = crypt("abc","pw");
-]])],[],[
- LIBS="$LIBS -lcrypt"
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
- #ifdef HAVE_CRYPT_H
- #include <crypt.h>
- #else
- #define _XOPEN_SOURCE
- #include <unistd.h>
- #endif
- ]], [[
- char *c = crypt("abc","pw");
- ]])],[
- AC_DEFINE(NEED_LIBCRYPT, 1, [Do we need -lcrypt?])
- need_libcrypt=yes
- ],[
- AC_MSG_ERROR([crypt() is not available])
- ])
-])
-
-AM_CONDITIONAL(NEED_LIBCRYPT, test "x$need_libcrypt" = xyes)
-
-
UL_CHECK_SYSCALL([pivot_root])
UL_CHECK_SYSCALL([sched_getaffinity])
UL_CHECK_SYSCALL([ioprio_set],