]>
Commit | Line | Data |
---|---|---|
7e04fe0e | 1 | |
eab54caf | 2 | AC_INIT([rc-scripts], [0.4.16], [pld-devel-en@lists.pld-linux.org], [rc-scripts]) |
180afce2 ER |
3 | |
4 | dnl Do not require AUTHORS, ChangeLog, NEWS, and README to exist | |
5 | AM_INIT_AUTOMAKE([foreign]) | |
2c883f5e | 6 | |
05a11ced | 7 | ALL_LINGUAS="pl de" |
763b88c2 AM |
8 | |
9 | echo -n "Finding shell scripts" | |
10 | SHSCRIPTS="" | |
f67ce454 | 11 | for shfile in $(find ${srcdir}/rc.d ${srcdir}/sysconfig ${srcdir}/lib ! -path "*/\.*/*" ! -name "*~" -type f); do |
763b88c2 | 12 | echo -n "." |
2450b5fc | 13 | if (LC_ALL=C file ${shfile} | grep -q 'shell script'); then |
763b88c2 AM |
14 | SHSCRIPTS="${SHSCRIPTS} ${shfile}" |
15 | fi | |
16 | done | |
17 | echo "done" | |
7e04fe0e | 18 | |
19 | dnl Checks for programs. | |
20 | AC_PROG_CC | |
21 | AC_ISC_POSIX | |
22 | AC_PROG_INSTALL | |
23 | AC_PROG_LN_S | |
24 | AC_PROG_MAKE_SET | |
25 | ||
26 | pppdir='${sysconfdir}/ppp' | |
7e04fe0e | 27 | sysconfigdir='${sysconfdir}/sysconfig' |
8dbd5412 | 28 | updir='${sysconfigdir}/interfaces/up.d' |
29 | downdir='${sysconfigdir}/interfaces/down.d' | |
f67ce454 | 30 | networkscriptsdir='${exec_prefix}/lib/${PACKAGE}' |
7e04fe0e | 31 | rcdir='${sysconfdir}/rc.d' |
c393d0f5 | 32 | initdir='${sysconfdir}/init' |
e340dffe | 33 | firmwaredir='${exec_prefix}/lib/firmware' |
f67ce454 | 34 | docdir="${prefix}/doc/${PACKAGE}-${VERSION}" |
5d3bb684 | 35 | |
dcd32750 | 36 | dnl i18n support |
5d3bb684 AF |
37 | AC_PATH_PROGS(MSGMERGE, msgmerge) |
38 | AC_PATH_PROGS(GMSGFMT, gmsgfmt msgfmt) | |
39 | ||
d0936237 ER |
40 | if test -z "$MSGMERGE" || test -z "$GMSGFMT"; then |
41 | AC_MSG_ERROR(install gettext-devel to be able to regenerate translations) | |
42 | fi | |
43 | ||
dcd32750 AF |
44 | CATALOGS= |
45 | POTFILES= | |
46 | for lang in $ALL_LINGUAS; do | |
47 | CATALOGS="$CATALOGS $lang.gmo" | |
48 | POTFILES="$POTFILES $lang.po" | |
49 | done | |
7e04fe0e | 50 | |
dcd32750 | 51 | POTSRC= |
2c883f5e | 52 | for src in $SHSCRIPTS; do |
dcd32750 AF |
53 | POTSRC="$POTSRC \$(top_srcdir)/$src" |
54 | done | |
55 | AC_ARG_WITH(localedir, | |
56 | [ --with-localedir=PATH specify where the locale stuff should go ]) | |
57 | ||
58 | if test "x$LOCALEDIR" = "x"; then | |
59 | if test "x$with_localedir" != "x"; then | |
60 | LOCALEDIR=$with_localedir | |
61 | else | |
62 | LOCALEDIR='$(prefix)/share/locale' | |
63 | fi | |
64 | fi | |
65 | ||
66 | localedir=$LOCALEDIR | |
67 | gnulocaledir=$LOCALEDIR | |
68 | ||
69 | if test "`eval echo $sysconfdir`" = "NONE/etc"; then | |
70 | defaultdir="/usr/local/etc" | |
71 | else | |
72 | defaultdir="`eval echo $sysconfdir`" | |
73 | fi | |
74 | ||
b8b29800 | 75 | AC_PATH_PROG(PKG_CONFIG, pkg-config, no) |
d0936237 ER |
76 | if test "$PKG_CONFIG" = no; then |
77 | AC_MSG_ERROR(You need to install pkgconfig package) | |
78 | fi | |
79 | ||
b8b29800 | 80 | GLIBDIR=none |
057b40ee JR |
81 | AC_MSG_CHECKING([glib2]) |
82 | GLIB_LIBS="-Wl,-static `$PKG_CONFIG --libs --static glib-2.0` -Wl,-Bdynamic" | |
83 | GLIB_CFLAGS="`$PKG_CONFIG --cflags-only-I glib-2.0`" | |
84 | if test "x$GLIB_LIBS" = "x"; then | |
85 | AC_MSG_ERROR(no) | |
ff1ffbdb | 86 | fi |
057b40ee | 87 | AC_MSG_RESULT(yes) |
b8b29800 | 88 | |
911954df ER |
89 | DPKG_C_GCC_ATTRIBUTE([,,],supported,[int x],[,,],ATTRIB,[Define if function attributes a la GCC 2.5 and higher are available.], |
90 | DPKG_C_GCC_ATTRIBUTE(noreturn,noreturn,[int x],noreturn,NORETURN,[Define if nonreturning functions a la GCC 2.5 and higher are available.]) | |
91 | DPKG_C_GCC_ATTRIBUTE(const,const,[int x],const,CONST,[Define if constant functions a la GCC 2.5 and higher are available.]) | |
92 | DPKG_C_GCC_ATTRIBUTE(unused,unused,[int x],unused,UNUSED,[Define if unused variables la GCC 2.5 and higher are available.]) | |
93 | DPKG_C_GCC_ATTRIBUTE(format...,format,[char *y, ...],[format(printf,1,2)],PRINTFFORMAT,[Define if printf-format argument lists a la GCC are available.])) | |
94 | ||
95 | AC_CHECK_TYPE(ptrdiff_t,int) | |
868bbbe0 | 96 | AC_CHECK_HEADERS([stddef.h sys/capability.h getopt.h]) |
911954df | 97 | |
dcd32750 AF |
98 | dnl Output |
99 | AC_SUBST(BASHSCRIPTS) | |
100 | AC_SUBST(CATALOGS) | |
101 | AC_SUBST(POTFILES) | |
102 | AC_SUBST(POTSRC) | |
103 | AC_SUBST(localedir) | |
104 | AC_SUBST(gnulocaledir) | |
d0936237 | 105 | |
7e04fe0e | 106 | AC_SUBST(pppdir) |
107 | AC_SUBST(networkscriptsdir) | |
108 | AC_SUBST(sysconfigdir) | |
8dbd5412 | 109 | AC_SUBST(updir) |
110 | AC_SUBST(downdir) | |
7e04fe0e | 111 | AC_SUBST(rcdir) |
c393d0f5 | 112 | AC_SUBST(initdir) |
7e04fe0e | 113 | AC_SUBST(docdir) |
e8ff2d72 | 114 | AC_SUBST(firmwaredir) |
057b40ee JR |
115 | AC_SUBST(GLIB_LIBS) |
116 | AC_SUBST(GLIB_CFLAGS) | |
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 | ||
42801b46 | 196 | AC_CONFIG_HEADERS(src/config.h) |
911954df ER |
197 | AC_CONFIG_FILES([Makefile \ |
198 | src/Makefile \ | |
f67ce454 | 199 | lib/Makefile \ |
911954df ER |
200 | doc/Makefile \ |
201 | man/Makefile \ | |
34bc0141 ER |
202 | man/de/Makefile \ |
203 | man/es/Makefile \ | |
204 | man/fr/Makefile \ | |
205 | man/ja/Makefile \ | |
206 | man/ru/Makefile \ | |
207 | man/sv/Makefile \ | |
8dbd5412 | 208 | ppp/Makefile \ |
763b88c2 | 209 | isapnp/Makefile \ |
7e04fe0e | 210 | sysconfig/Makefile \ |
15371203 | 211 | sysconfig/cpusets/Makefile \ |
763b88c2 | 212 | sysconfig/hwprofiles/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 \ |
660dddce | 229 | ]) |
763b88c2 | 230 | AC_OUTPUT |