]> git.pld-linux.org Git - projects/rc-scripts.git/blame - configure.ac
PLD Linux
[projects/rc-scripts.git] / configure.ac
CommitLineData
9ccfa537 1dnl $Id$
7e04fe0e 2
fe53727a 3AC_INIT(["rc-scripts"], [0.4.4.3], [pld-rc-scripts@lists.pld-linux.org], [rc-scripts])
bea191b3 4AM_INIT_AUTOMAKE
2c883f5e 5
05a11ced 6ALL_LINGUAS="pl de"
763b88c2
AM
7
8echo -n "Finding shell scripts"
9SHSCRIPTS=""
69c859e9 10for shfile in $(find ${srcdir}/rc.d ${srcdir}/sysconfig ! -path "*/\.*/*" ! -name "*~" -type f); do
763b88c2 11 echo -n "."
2450b5fc 12 if (LC_ALL=C file ${shfile} | grep -q 'shell script'); then
763b88c2
AM
13 SHSCRIPTS="${SHSCRIPTS} ${shfile}"
14 fi
15done
16echo "done"
7e04fe0e 17
18dnl Checks for programs.
19AC_PROG_CC
20AC_ISC_POSIX
21AC_PROG_INSTALL
22AC_PROG_LN_S
23AC_PROG_MAKE_SET
24
25pppdir='${sysconfdir}/ppp'
7e04fe0e 26sysconfigdir='${sysconfdir}/sysconfig'
8dbd5412 27updir='${sysconfigdir}/interfaces/up.d'
28downdir='${sysconfigdir}/interfaces/down.d'
16742ce6 29networkscriptsdir='${sysconfigdir}/network-scripts'
7e04fe0e 30rcdir='${sysconfdir}/rc.d'
c393d0f5 31initdir='${sysconfdir}/init'
e340dffe 32firmwaredir='${exec_prefix}/lib/firmware'
7e04fe0e 33docdir="${prefix}/doc/$PACKAGE-$VERSION"
5d3bb684 34
dcd32750 35dnl i18n support
5d3bb684
AF
36AC_PATH_PROGS(MSGMERGE, msgmerge)
37AC_PATH_PROGS(GMSGFMT, gmsgfmt msgfmt)
38
dcd32750
AF
39CATALOGS=
40POTFILES=
41for lang in $ALL_LINGUAS; do
42 CATALOGS="$CATALOGS $lang.gmo"
43 POTFILES="$POTFILES $lang.po"
44done
7e04fe0e 45
dcd32750 46POTSRC=
2c883f5e 47for src in $SHSCRIPTS; do
dcd32750
AF
48 POTSRC="$POTSRC \$(top_srcdir)/$src"
49done
50AC_ARG_WITH(localedir,
51 [ --with-localedir=PATH specify where the locale stuff should go ])
52
53if test "x$LOCALEDIR" = "x"; then
54 if test "x$with_localedir" != "x"; then
55 LOCALEDIR=$with_localedir
56 else
57 LOCALEDIR='$(prefix)/share/locale'
58 fi
59fi
60
61localedir=$LOCALEDIR
62gnulocaledir=$LOCALEDIR
63
64if test "`eval echo $sysconfdir`" = "NONE/etc"; then
65 defaultdir="/usr/local/etc"
66else
67 defaultdir="`eval echo $sysconfdir`"
68fi
69
b8b29800
AM
70AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
71GLIBDIR=none
057b40ee
JR
72AC_MSG_CHECKING([glib2])
73GLIB_LIBS="-Wl,-static `$PKG_CONFIG --libs --static glib-2.0` -Wl,-Bdynamic"
74GLIB_CFLAGS="`$PKG_CONFIG --cflags-only-I glib-2.0`"
75if test "x$GLIB_LIBS" = "x"; then
76 AC_MSG_ERROR(no)
ff1ffbdb 77fi
057b40ee 78AC_MSG_RESULT(yes)
b8b29800 79
911954df
ER
80DPKG_C_GCC_ATTRIBUTE([,,],supported,[int x],[,,],ATTRIB,[Define if function attributes a la GCC 2.5 and higher are available.],
81 DPKG_C_GCC_ATTRIBUTE(noreturn,noreturn,[int x],noreturn,NORETURN,[Define if nonreturning functions a la GCC 2.5 and higher are available.])
82 DPKG_C_GCC_ATTRIBUTE(const,const,[int x],const,CONST,[Define if constant functions a la GCC 2.5 and higher are available.])
83 DPKG_C_GCC_ATTRIBUTE(unused,unused,[int x],unused,UNUSED,[Define if unused variables la GCC 2.5 and higher are available.])
84 DPKG_C_GCC_ATTRIBUTE(format...,format,[char *y, ...],[format(printf,1,2)],PRINTFFORMAT,[Define if printf-format argument lists a la GCC are available.]))
85
86AC_CHECK_TYPE(ptrdiff_t,int)
69bdc5ba 87AC_CHECK_HEADERS([stddef.h sys/capability.h])
911954df 88
dcd32750
AF
89dnl Output
90AC_SUBST(BASHSCRIPTS)
91AC_SUBST(CATALOGS)
92AC_SUBST(POTFILES)
93AC_SUBST(POTSRC)
94AC_SUBST(localedir)
95AC_SUBST(gnulocaledir)
96
7e04fe0e 97AC_SUBST(pppdir)
98AC_SUBST(networkscriptsdir)
99AC_SUBST(sysconfigdir)
8dbd5412 100AC_SUBST(updir)
101AC_SUBST(downdir)
7e04fe0e 102AC_SUBST(rcdir)
c393d0f5 103AC_SUBST(initdir)
7e04fe0e 104AC_SUBST(docdir)
e8ff2d72 105AC_SUBST(firmwaredir)
057b40ee
JR
106AC_SUBST(GLIB_LIBS)
107AC_SUBST(GLIB_CFLAGS)
7e04fe0e 108
911954df
ER
109AH_BOTTOM([
110#ifdef HAVE_STDDEF_H
111#include <stddef.h>
112#endif
113
114/* Use the definitions: */
115
116/* The maximum length of a #! interpreter displayed by dpkg-deb. */
117#ifdef PATH_MAX
118#define INTERPRETER_MAX PATH_MAX
119#else
120#define INTERPRETER_MAX 1024
121#endif
122
123/* GNU C attributes. */
124#ifndef FUNCATTR
125#ifdef HAVE_GNUC25_ATTRIB
126#define FUNCATTR(x) __attribute__(x)
127#else
128#define FUNCATTR(x)
129#endif
130#endif
131
132/* GNU C printf formats, or null. */
133#ifndef ATTRPRINTF
134#ifdef HAVE_GNUC25_PRINTFFORMAT
135#define ATTRPRINTF(si,tc) format(printf,si,tc)
136#else
137#define ATTRPRINTF(si,tc)
138#endif
139#endif
140#ifndef PRINTFFORMAT
141#define PRINTFFORMAT(si,tc) FUNCATTR((ATTRPRINTF(si,tc)))
142#endif
143
144/* GNU C nonreturning functions, or null. */
145#ifndef ATTRNORETURN
146#ifdef HAVE_GNUC25_NORETURN
147#define ATTRNORETURN noreturn
148#else /* ! HAVE_GNUC25_NORETURN */
149#define ATTRNORETURN
150#endif /* HAVE_GNUC25_NORETURN */
151#endif /* ATTRNORETURN */
152
153#ifndef NONRETURNING
154#define NONRETURNING FUNCATTR((ATTRNORETURN))
155#endif /* NONRETURNING */
156
157/* Combination of both the above. */
158#ifndef NONRETURNPRINTFFORMAT
159#define NONRETURNPRINTFFORMAT(si,tc) FUNCATTR((ATTRPRINTF(si,tc),ATTRNORETURN))
160#endif
161
162/* GNU C constant functions, or null. */
163#ifndef ATTRCONST
164#ifdef HAVE_GNUC25_CONST
165#define ATTRCONST const
166#else
167#define ATTRCONST
168#endif
169#endif
170#ifndef CONSTANT
171#define CONSTANT FUNCATTR((ATTRCONST))
172#endif
173
174/* GNU C unused functions, or null. */
175#ifndef ATTRUNUSED
176#ifdef HAVE_GNUC25_UNUSED
177#define ATTRUNUSED
178#else
179#define ATTRUNUSED
180#endif
181#endif
182#ifndef UNUSED
183#define UNUSED FUNCATTR((ATTRUNUSED))
184#endif
185])
186
80ed1aa7 187AM_CONFIG_HEADER(src/config.h)
911954df
ER
188AC_CONFIG_FILES([Makefile \
189 src/Makefile \
190 doc/Makefile \
191 man/Makefile \
34bc0141
ER
192 man/de/Makefile \
193 man/es/Makefile \
194 man/fr/Makefile \
195 man/ja/Makefile \
196 man/ru/Makefile \
197 man/sv/Makefile \
8dbd5412 198 ppp/Makefile \
763b88c2 199 isapnp/Makefile \
7e04fe0e 200 sysconfig/Makefile \
15371203 201 sysconfig/cpusets/Makefile \
763b88c2 202 sysconfig/hwprofiles/Makefile \
7e04fe0e 203 sysconfig/network-scripts/Makefile \
ca263bb1
AF
204 sysconfig/interfaces/Makefile \
205 sysconfig/interfaces/data/Makefile \
8dbd5412 206 sysconfig/interfaces/up.d/Makefile \
207 sysconfig/interfaces/up.d/all/Makefile \
208 sysconfig/interfaces/up.d/ip/Makefile \
209 sysconfig/interfaces/up.d/ipx/Makefile \
210 sysconfig/interfaces/up.d/ppp/Makefile \
211 sysconfig/interfaces/up.d/tnl/Makefile \
212 sysconfig/interfaces/down.d/Makefile \
213 sysconfig/interfaces/down.d/all/Makefile \
214 sysconfig/interfaces/down.d/ip/Makefile \
215 sysconfig/interfaces/down.d/ipx/Makefile \
216 sysconfig/interfaces/down.d/ppp/Makefile \
217 sysconfig/interfaces/down.d/tnl/Makefile \
36ddc8d8 218 rc.d/Makefile rc.d/init.d/Makefile \
dcd32750 219 po/Makefile \
c393d0f5 220 init/Makefile \
660dddce 221 ])
763b88c2 222AC_OUTPUT
This page took 0.102647 seconds and 4 git commands to generate.