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