]>
Commit | Line | Data |
---|---|---|
9ccfa537 | 1 | dnl $Id$ |
7e04fe0e | 2 | |
ce0902a1 | 3 | AC_INIT(["rc-scripts"], [0.4.3.8], [pld-rc-scripts@lists.pld-linux.org], [rc-scripts]) |
bea191b3 | 4 | AM_INIT_AUTOMAKE |
2c883f5e | 5 | |
05a11ced | 6 | ALL_LINGUAS="pl de" |
763b88c2 AM |
7 | |
8 | echo -n "Finding shell scripts" | |
9 | SHSCRIPTS="" | |
69c859e9 | 10 | for 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 | |
15 | done | |
16 | echo "done" | |
7e04fe0e | 17 | |
18 | dnl Checks for programs. | |
19 | AC_PROG_CC | |
20 | AC_ISC_POSIX | |
21 | AC_PROG_INSTALL | |
22 | AC_PROG_LN_S | |
23 | AC_PROG_MAKE_SET | |
24 | ||
25 | pppdir='${sysconfdir}/ppp' | |
7e04fe0e | 26 | sysconfigdir='${sysconfdir}/sysconfig' |
8dbd5412 | 27 | updir='${sysconfigdir}/interfaces/up.d' |
28 | downdir='${sysconfigdir}/interfaces/down.d' | |
16742ce6 | 29 | networkscriptsdir='${sysconfigdir}/network-scripts' |
7e04fe0e | 30 | rcdir='${sysconfdir}/rc.d' |
c393d0f5 | 31 | initdir='${sysconfdir}/init' |
e340dffe | 32 | firmwaredir='${exec_prefix}/lib/firmware' |
7e04fe0e | 33 | docdir="${prefix}/doc/$PACKAGE-$VERSION" |
5d3bb684 | 34 | |
dcd32750 | 35 | dnl i18n support |
5d3bb684 AF |
36 | AC_PATH_PROGS(MSGMERGE, msgmerge) |
37 | AC_PATH_PROGS(GMSGFMT, gmsgfmt msgfmt) | |
38 | ||
dcd32750 AF |
39 | CATALOGS= |
40 | POTFILES= | |
41 | for lang in $ALL_LINGUAS; do | |
42 | CATALOGS="$CATALOGS $lang.gmo" | |
43 | POTFILES="$POTFILES $lang.po" | |
44 | done | |
7e04fe0e | 45 | |
dcd32750 | 46 | POTSRC= |
2c883f5e | 47 | for src in $SHSCRIPTS; do |
dcd32750 AF |
48 | POTSRC="$POTSRC \$(top_srcdir)/$src" |
49 | done | |
50 | AC_ARG_WITH(localedir, | |
51 | [ --with-localedir=PATH specify where the locale stuff should go ]) | |
52 | ||
53 | if 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 | |
59 | fi | |
60 | ||
61 | localedir=$LOCALEDIR | |
62 | gnulocaledir=$LOCALEDIR | |
63 | ||
64 | if test "`eval echo $sysconfdir`" = "NONE/etc"; then | |
65 | defaultdir="/usr/local/etc" | |
66 | else | |
67 | defaultdir="`eval echo $sysconfdir`" | |
68 | fi | |
69 | ||
b8b29800 AM |
70 | AC_PATH_PROG(PKG_CONFIG, pkg-config, no) |
71 | GLIBDIR=none | |
ff1ffbdb AM |
72 | AC_MSG_CHECKING([glib2 dir]) |
73 | GLIBDIR="`$PKG_CONFIG --variable=libdir glib-2.0`" | |
74 | GLIBNAME="libglib-2.0.a" | |
602f3ad9 | 75 | GCFLAGS="`$PKG_CONFIG --cflags-only-I glib-2.0`" |
ff1ffbdb AM |
76 | if test "x$GLIBDIR" = "x"; then |
77 | AC_MSG_RESULT([none]) | |
78 | AC_MSG_CHECKING([glib dir]) | |
79 | GLIBDIR="`$PKG_CONFIG --variable=libdir glib`" | |
80 | GLIBNAME="libglib.a" | |
602f3ad9 | 81 | GCFLAGS="`$PKG_CONFIG --cflags-only-I glib`" |
ff1ffbdb AM |
82 | fi |
83 | if test "x$GLIBDIR" = "x"; then | |
84 | GLIBDIR=/usr/lib | |
85 | fi | |
b8b29800 AM |
86 | AC_MSG_RESULT([$GLIBDIR]) |
87 | ||
911954df ER |
88 | DPKG_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 | ||
94 | AC_CHECK_TYPE(ptrdiff_t,int) | |
69bdc5ba | 95 | AC_CHECK_HEADERS([stddef.h sys/capability.h]) |
911954df | 96 | |
dcd32750 AF |
97 | dnl Output |
98 | AC_SUBST(BASHSCRIPTS) | |
99 | AC_SUBST(CATALOGS) | |
100 | AC_SUBST(POTFILES) | |
101 | AC_SUBST(POTSRC) | |
102 | AC_SUBST(localedir) | |
103 | AC_SUBST(gnulocaledir) | |
104 | ||
7e04fe0e | 105 | AC_SUBST(pppdir) |
106 | AC_SUBST(networkscriptsdir) | |
107 | AC_SUBST(sysconfigdir) | |
8dbd5412 | 108 | AC_SUBST(updir) |
109 | AC_SUBST(downdir) | |
7e04fe0e | 110 | AC_SUBST(rcdir) |
c393d0f5 | 111 | AC_SUBST(initdir) |
7e04fe0e | 112 | AC_SUBST(docdir) |
e8ff2d72 | 113 | AC_SUBST(firmwaredir) |
b8b29800 | 114 | AC_SUBST(GLIBDIR) |
ff1ffbdb | 115 | AC_SUBST(GLIBNAME) |
602f3ad9 | 116 | AC_SUBST(GCFLAGS) |
7e04fe0e | 117 | |
911954df ER |
118 | AH_BOTTOM([ |
119 | #ifdef HAVE_STDDEF_H | |
120 | #include <stddef.h> | |
121 | #endif | |
122 | ||
123 | /* Use the definitions: */ | |
124 | ||
125 | /* The maximum length of a #! interpreter displayed by dpkg-deb. */ | |
126 | #ifdef PATH_MAX | |
127 | #define INTERPRETER_MAX PATH_MAX | |
128 | #else | |
129 | #define INTERPRETER_MAX 1024 | |
130 | #endif | |
131 | ||
132 | /* GNU C attributes. */ | |
133 | #ifndef FUNCATTR | |
134 | #ifdef HAVE_GNUC25_ATTRIB | |
135 | #define FUNCATTR(x) __attribute__(x) | |
136 | #else | |
137 | #define FUNCATTR(x) | |
138 | #endif | |
139 | #endif | |
140 | ||
141 | /* GNU C printf formats, or null. */ | |
142 | #ifndef ATTRPRINTF | |
143 | #ifdef HAVE_GNUC25_PRINTFFORMAT | |
144 | #define ATTRPRINTF(si,tc) format(printf,si,tc) | |
145 | #else | |
146 | #define ATTRPRINTF(si,tc) | |
147 | #endif | |
148 | #endif | |
149 | #ifndef PRINTFFORMAT | |
150 | #define PRINTFFORMAT(si,tc) FUNCATTR((ATTRPRINTF(si,tc))) | |
151 | #endif | |
152 | ||
153 | /* GNU C nonreturning functions, or null. */ | |
154 | #ifndef ATTRNORETURN | |
155 | #ifdef HAVE_GNUC25_NORETURN | |
156 | #define ATTRNORETURN noreturn | |
157 | #else /* ! HAVE_GNUC25_NORETURN */ | |
158 | #define ATTRNORETURN | |
159 | #endif /* HAVE_GNUC25_NORETURN */ | |
160 | #endif /* ATTRNORETURN */ | |
161 | ||
162 | #ifndef NONRETURNING | |
163 | #define NONRETURNING FUNCATTR((ATTRNORETURN)) | |
164 | #endif /* NONRETURNING */ | |
165 | ||
166 | /* Combination of both the above. */ | |
167 | #ifndef NONRETURNPRINTFFORMAT | |
168 | #define NONRETURNPRINTFFORMAT(si,tc) FUNCATTR((ATTRPRINTF(si,tc),ATTRNORETURN)) | |
169 | #endif | |
170 | ||
171 | /* GNU C constant functions, or null. */ | |
172 | #ifndef ATTRCONST | |
173 | #ifdef HAVE_GNUC25_CONST | |
174 | #define ATTRCONST const | |
175 | #else | |
176 | #define ATTRCONST | |
177 | #endif | |
178 | #endif | |
179 | #ifndef CONSTANT | |
180 | #define CONSTANT FUNCATTR((ATTRCONST)) | |
181 | #endif | |
182 | ||
183 | /* GNU C unused functions, or null. */ | |
184 | #ifndef ATTRUNUSED | |
185 | #ifdef HAVE_GNUC25_UNUSED | |
186 | #define ATTRUNUSED | |
187 | #else | |
188 | #define ATTRUNUSED | |
189 | #endif | |
190 | #endif | |
191 | #ifndef UNUSED | |
192 | #define UNUSED FUNCATTR((ATTRUNUSED)) | |
193 | #endif | |
194 | ]) | |
195 | ||
80ed1aa7 | 196 | AM_CONFIG_HEADER(src/config.h) |
911954df ER |
197 | AC_CONFIG_FILES([Makefile \ |
198 | src/Makefile \ | |
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 \ |
7e04fe0e | 212 | sysconfig/network-scripts/Makefile \ |
ca263bb1 AF |
213 | sysconfig/interfaces/Makefile \ |
214 | sysconfig/interfaces/data/Makefile \ | |
8dbd5412 | 215 | sysconfig/interfaces/up.d/Makefile \ |
216 | sysconfig/interfaces/up.d/all/Makefile \ | |
217 | sysconfig/interfaces/up.d/ip/Makefile \ | |
218 | sysconfig/interfaces/up.d/ipx/Makefile \ | |
219 | sysconfig/interfaces/up.d/ppp/Makefile \ | |
220 | sysconfig/interfaces/up.d/tnl/Makefile \ | |
221 | sysconfig/interfaces/down.d/Makefile \ | |
222 | sysconfig/interfaces/down.d/all/Makefile \ | |
223 | sysconfig/interfaces/down.d/ip/Makefile \ | |
224 | sysconfig/interfaces/down.d/ipx/Makefile \ | |
225 | sysconfig/interfaces/down.d/ppp/Makefile \ | |
226 | sysconfig/interfaces/down.d/tnl/Makefile \ | |
36ddc8d8 | 227 | rc.d/Makefile rc.d/init.d/Makefile \ |
dcd32750 | 228 | po/Makefile \ |
c393d0f5 | 229 | init/Makefile \ |
660dddce | 230 | ]) |
763b88c2 | 231 | AC_OUTPUT |