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