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