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