]> git.pld-linux.org Git - projects/rc-scripts.git/blobdiff - configure.ac
set DHCP_HOSTNAME only basename, domain part is filled by dhcp server
[projects/rc-scripts.git] / configure.ac
index b9f2bb82d804c735cd581c0bb14ab462e8ad7335..780e4f273c7d4d110daca7d8006ef840cbc44dd9 100644 (file)
@@ -1,15 +1,15 @@
 dnl $Id$
 
-AC_INIT(["rc-scripts"], [0.4.0.17], [pld-rc-scripts@pld-linux.org], [rc-scripts])
+AC_INIT([rc-scripts], [0.4.7], [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 ! -path "*/\.*/*" ! -name "*~" -type f); do
+for shfile in $(find ${srcdir}/rc.d ${srcdir}/sysconfig ${srcdir}/lib ! -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
@@ -26,14 +26,20 @@ pppdir='${sysconfdir}/ppp'
 sysconfigdir='${sysconfdir}/sysconfig'
 updir='${sysconfigdir}/interfaces/up.d'
 downdir='${sysconfigdir}/interfaces/down.d'
-networkscriptsdir='${sysconfigdir}/network-scripts'
+networkscriptsdir='${exec_prefix}/lib/${PACKAGE}'
 rcdir='${sysconfdir}/rc.d'
-docdir="${prefix}/doc/$PACKAGE-$VERSION"
+initdir='${sysconfdir}/init'
+firmwaredir='${exec_prefix}/lib/firmware'
+docdir="${prefix}/doc/${PACKAGE}-${VERSION}"
 
 dnl i18n support
 AC_PATH_PROGS(MSGMERGE, msgmerge)
 AC_PATH_PROGS(GMSGFMT, gmsgfmt msgfmt)
 
+if test -z "$MSGMERGE" || test -z "$GMSGFMT"; then
+       AC_MSG_ERROR(install gettext-devel to be able to regenerate translations)
+fi
+
 CATALOGS=
 POTFILES=
 for lang in $ALL_LINGUAS; do
@@ -66,22 +72,18 @@ else
 fi
 
 AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
-GLIBDIR=none
-AC_MSG_CHECKING([glib2 dir])
-GLIBDIR="`$PKG_CONFIG --variable=libdir glib-2.0`"
-GLIBNAME="libglib-2.0.a"
-GCFLAGS="`$PKG_CONFIG --cflags-only-I glib-2.0`"
-if test "x$GLIBDIR" = "x"; then
-    AC_MSG_RESULT([none])
-    AC_MSG_CHECKING([glib dir])
-    GLIBDIR="`$PKG_CONFIG --variable=libdir glib`"
-    GLIBNAME="libglib.a"
-    GCFLAGS="`$PKG_CONFIG --cflags-only-I glib`"
+if test "$PKG_CONFIG" = no; then
+       AC_MSG_ERROR(You need to install pkgconfig package)
 fi
-if test "x$GLIBDIR" = "x"; then
-    GLIBDIR=/usr/lib
+
+GLIBDIR=none
+AC_MSG_CHECKING([glib2])
+GLIB_LIBS="-Wl,-static `$PKG_CONFIG --libs --static glib-2.0` -Wl,-Bdynamic"
+GLIB_CFLAGS="`$PKG_CONFIG --cflags-only-I glib-2.0`"
+if test "x$GLIB_LIBS" = "x"; then
+       AC_MSG_ERROR(no)
 fi
-AC_MSG_RESULT([$GLIBDIR])
+AC_MSG_RESULT(yes)
 
 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.])
@@ -90,7 +92,7 @@ DPKG_C_GCC_ATTRIBUTE([,,],supported,[int x],[,,],ATTRIB,[Define if function attr
   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])
+AC_CHECK_HEADERS([stddef.h sys/capability.h getopt.h])
 
 dnl Output
 AC_SUBST(BASHSCRIPTS)
@@ -99,17 +101,18 @@ AC_SUBST(POTFILES)
 AC_SUBST(POTSRC)
 AC_SUBST(localedir)
 AC_SUBST(gnulocaledir)
-                       
+
 AC_SUBST(pppdir)
 AC_SUBST(networkscriptsdir)
 AC_SUBST(sysconfigdir)
 AC_SUBST(updir)
 AC_SUBST(downdir)
 AC_SUBST(rcdir)
+AC_SUBST(initdir)
 AC_SUBST(docdir)
-AC_SUBST(GLIBDIR)
-AC_SUBST(GLIBNAME)
-AC_SUBST(GCFLAGS)
+AC_SUBST(firmwaredir)
+AC_SUBST(GLIB_LIBS)
+AC_SUBST(GLIB_CFLAGS)
 
 AH_BOTTOM([
 #ifdef HAVE_STDDEF_H
@@ -189,16 +192,23 @@ AH_BOTTOM([
 #endif
 ])
 
-AM_CONFIG_HEADER(src/config.h)
+AC_CONFIG_HEADERS(src/config.h)
 AC_CONFIG_FILES([Makefile \
        src/Makefile \
+       lib/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 \
        sysconfig/interfaces/data/Makefile \
        sysconfig/interfaces/up.d/Makefile \
@@ -215,5 +225,6 @@ AC_CONFIG_FILES([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.132372 seconds and 4 git commands to generate.