chiark / gitweb /
localectl: support systems without locale-archive
[elogind.git] / configure.ac
index 535b71f6628ae1be55394014dfe986b58f0d9cc5..b9499dc69165ecb4cfce79601994239a4f2a6b9b 100644 (file)
@@ -107,7 +107,7 @@ AS_IF([test "x$with_python" != "xno"], [
 AM_CONDITIONAL([HAVE_PYTHON], [test "x$have_python" = "xyes"])
 AS_IF([test "x$PYTHON_BINARY" = "x"],
       [AS_IF([test "x$have_python" = "xyes"],
-             [PYTHON_BINARY="$PYTHON"],
+             [PYTHON_BINARY="`which "$PYTHON"`"],
              [PYTHON_BINARY=/usr/bin/python])])
 AC_ARG_VAR(PYTHON_BINARY, [Python binary used to launch installed scripts])
 
@@ -652,6 +652,25 @@ AC_DEFINE_UNQUOTED(KBD_SETFONT, ["$KBD_SETFONT"], [Path of setfont])
 AC_SUBST(KBD_LOADKEYS)
 AC_SUBST(KBD_SETFONT)
 
+# ------------------------------------------------------------------------------
+have_myhostname=no
+AC_ARG_ENABLE(myhostname, AS_HELP_STRING([--disable-nss-myhostname], [disable nss-myhostname support]))
+if test "x$enable_myhostname" != "xno"; then
+        AC_HEADER_STDC
+        AC_CHECK_HEADERS([arpa/inet.h fcntl.h inttypes.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h sys/time.h unistd.h nss.h sys/ioctl.h])
+
+        AC_C_CONST
+        AC_TYPE_SIZE_T
+        AC_HEADER_TIME
+
+        AC_FUNC_MALLOC
+        AC_FUNC_SELECT_ARGTYPES
+        AC_CHECK_FUNCS([gethostbyaddr gethostbyname gettimeofday inet_ntoa memset select socket strcspn strdup strerror strncasecmp strcasecmp strspn])
+
+        have_myhostname=yes
+fi
+AM_CONDITIONAL(HAVE_MYHOSTNAME, [test "$have_myhostname" = "yes"])
+
 # ------------------------------------------------------------------------------
 AC_ARG_WITH(firmware-path,
        AS_HELP_STRING([--with-firmware-path=DIR[[[:DIR[...]]]]],
@@ -835,6 +854,7 @@ AC_MSG_RESULT([
         coredump:                ${have_coredump}
         kmod:                    ${have_kmod}
         blkid:                   ${have_blkid}
+        nss-myhostname:          ${have_myhostname}
         gudev:                   ${enable_gudev}
         gintrospection:          ${enable_introspection}
         keymap:                  ${enable_keymap}