]> git.pld-linux.org Git - projects/rc-scripts.git/blobdiff - configure.ac
Check /dev/rtc or /dev/rtc0 existence.
[projects/rc-scripts.git] / configure.ac
index 2b3b6e229829c5d14c1e8260169f27050c41e0b4..f8b80f68342c8cf986da584652590115a4628b25 100644 (file)
@@ -1,15 +1,15 @@
 dnl $Id$
 
-AC_INIT(["rc-scripts"], [0.4.0.13], [pld-rc-scripts@pld-linux.org], [rc-scripts])
+AC_INIT(["rc-scripts"], [0.4.3.8], [pld-rc-scripts@lists.pld-linux.org], [rc-scripts])
 AM_INIT_AUTOMAKE
 
 ALL_LINGUAS="pl de"
 
 echo -n "Finding shell scripts"
 SHSCRIPTS=""
-for shfile in $(find ${srcdir}/rc.d ${srcdir}/sysconfig -type f); do
+for shfile in $(find ${srcdir}/rc.d ${srcdir}/sysconfig ! -path "*/\.*/*" ! -name "*~" -type f); do
     echo -n "."
-    if (LANG=C file ${shfile} | grep -q 'shell script'); then
+    if (LC_ALL=C file ${shfile} | grep -q 'shell script'); then
        SHSCRIPTS="${SHSCRIPTS} ${shfile}"
     fi
 done
@@ -28,6 +28,8 @@ updir='${sysconfigdir}/interfaces/up.d'
 downdir='${sysconfigdir}/interfaces/down.d'
 networkscriptsdir='${sysconfigdir}/network-scripts'
 rcdir='${sysconfdir}/rc.d'
+initdir='${sysconfdir}/init'
+firmwaredir='${exec_prefix}/lib/firmware'
 docdir="${prefix}/doc/$PACKAGE-$VERSION"
 
 dnl i18n support
@@ -83,6 +85,15 @@ if test "x$GLIBDIR" = "x"; then
 fi
 AC_MSG_RESULT([$GLIBDIR])
 
+DPKG_C_GCC_ATTRIBUTE([,,],supported,[int x],[,,],ATTRIB,[Define if function attributes a la GCC 2.5 and higher are available.],
+  DPKG_C_GCC_ATTRIBUTE(noreturn,noreturn,[int x],noreturn,NORETURN,[Define if nonreturning functions a la GCC 2.5 and higher are available.])
+  DPKG_C_GCC_ATTRIBUTE(const,const,[int x],const,CONST,[Define if constant functions a la GCC 2.5 and higher are available.])
+  DPKG_C_GCC_ATTRIBUTE(unused,unused,[int x],unused,UNUSED,[Define if unused variables la GCC 2.5 and higher are available.])
+  DPKG_C_GCC_ATTRIBUTE(format...,format,[char *y, ...],[format(printf,1,2)],PRINTFFORMAT,[Define if printf-format argument lists a la GCC are available.]))
+
+AC_CHECK_TYPE(ptrdiff_t,int)
+AC_CHECK_HEADERS([stddef.h sys/capability.h])
+
 dnl Output
 AC_SUBST(BASHSCRIPTS)
 AC_SUBST(CATALOGS)
@@ -97,15 +108,106 @@ AC_SUBST(sysconfigdir)
 AC_SUBST(updir)
 AC_SUBST(downdir)
 AC_SUBST(rcdir)
+AC_SUBST(initdir)
 AC_SUBST(docdir)
+AC_SUBST(firmwaredir)
 AC_SUBST(GLIBDIR)
 AC_SUBST(GLIBNAME)
 AC_SUBST(GCFLAGS)
 
-AC_CONFIG_FILES([Makefile src/Makefile doc/Makefile \
+AH_BOTTOM([
+#ifdef HAVE_STDDEF_H
+#include <stddef.h>
+#endif
+
+/* Use the definitions: */
+
+/* The maximum length of a #! interpreter displayed by dpkg-deb. */
+#ifdef PATH_MAX
+#define INTERPRETER_MAX PATH_MAX
+#else
+#define INTERPRETER_MAX 1024
+#endif
+
+/* GNU C attributes. */
+#ifndef FUNCATTR
+#ifdef HAVE_GNUC25_ATTRIB
+#define FUNCATTR(x) __attribute__(x)
+#else
+#define FUNCATTR(x)
+#endif
+#endif
+
+/* GNU C printf formats, or null. */
+#ifndef ATTRPRINTF
+#ifdef HAVE_GNUC25_PRINTFFORMAT
+#define ATTRPRINTF(si,tc) format(printf,si,tc)
+#else
+#define ATTRPRINTF(si,tc)
+#endif
+#endif
+#ifndef PRINTFFORMAT
+#define PRINTFFORMAT(si,tc) FUNCATTR((ATTRPRINTF(si,tc)))
+#endif
+
+/* GNU C nonreturning functions, or null. */
+#ifndef ATTRNORETURN
+#ifdef HAVE_GNUC25_NORETURN
+#define ATTRNORETURN noreturn
+#else /* ! HAVE_GNUC25_NORETURN */
+#define ATTRNORETURN
+#endif /* HAVE_GNUC25_NORETURN */
+#endif /* ATTRNORETURN */
+
+#ifndef NONRETURNING
+#define NONRETURNING FUNCATTR((ATTRNORETURN))
+#endif /* NONRETURNING */
+
+/* Combination of both the above. */
+#ifndef NONRETURNPRINTFFORMAT
+#define NONRETURNPRINTFFORMAT(si,tc) FUNCATTR((ATTRPRINTF(si,tc),ATTRNORETURN))
+#endif
+
+/* GNU C constant functions, or null. */
+#ifndef ATTRCONST
+#ifdef HAVE_GNUC25_CONST
+#define ATTRCONST const
+#else
+#define ATTRCONST
+#endif
+#endif
+#ifndef CONSTANT
+#define CONSTANT FUNCATTR((ATTRCONST))
+#endif
+
+/* GNU C unused functions, or null. */
+#ifndef ATTRUNUSED
+#ifdef HAVE_GNUC25_UNUSED
+#define ATTRUNUSED
+#else
+#define ATTRUNUSED
+#endif
+#endif
+#ifndef UNUSED
+#define UNUSED FUNCATTR((ATTRUNUSED))
+#endif
+])
+
+AM_CONFIG_HEADER(src/config.h)
+AC_CONFIG_FILES([Makefile \
+       src/Makefile \
+       doc/Makefile \
+       man/Makefile \
+       man/de/Makefile \
+       man/es/Makefile \
+       man/fr/Makefile \
+       man/ja/Makefile \
+       man/ru/Makefile \
+       man/sv/Makefile \
        ppp/Makefile \
        isapnp/Makefile \
        sysconfig/Makefile \
+       sysconfig/cpusets/Makefile \
        sysconfig/hwprofiles/Makefile \
        sysconfig/network-scripts/Makefile \
        sysconfig/interfaces/Makefile \
@@ -124,5 +226,6 @@ AC_CONFIG_FILES([Makefile src/Makefile doc/Makefile \
        sysconfig/interfaces/down.d/tnl/Makefile \
        rc.d/Makefile rc.d/init.d/Makefile \
        po/Makefile \
-       rc-scripts.spec])
+       init/Makefile \
+       ])
 AC_OUTPUT
This page took 0.028058 seconds and 4 git commands to generate.