3 AC_INIT(["rc-scripts"], [0.4.3.8], [pld-rc-scripts@lists.pld-linux.org], [rc-scripts])
8 echo -n "Finding shell scripts"
10 for shfile in $(find ${srcdir}/rc.d ${srcdir}/sysconfig ! -path "*/\.*/*" ! -name "*~" -type f); do
12 if (LC_ALL=C file ${shfile} | grep -q 'shell script'); then
13 SHSCRIPTS="${SHSCRIPTS} ${shfile}"
18 dnl Checks for programs.
25 pppdir='${sysconfdir}/ppp'
26 sysconfigdir='${sysconfdir}/sysconfig'
27 updir='${sysconfigdir}/interfaces/up.d'
28 downdir='${sysconfigdir}/interfaces/down.d'
29 networkscriptsdir='${sysconfigdir}/network-scripts'
30 rcdir='${sysconfdir}/rc.d'
31 initdir='${sysconfdir}/init'
32 firmwaredir='${exec_prefix}/lib/firmware'
33 docdir="${prefix}/doc/$PACKAGE-$VERSION"
36 AC_PATH_PROGS(MSGMERGE, msgmerge)
37 AC_PATH_PROGS(GMSGFMT, gmsgfmt msgfmt)
41 for lang in $ALL_LINGUAS; do
42 CATALOGS="$CATALOGS $lang.gmo"
43 POTFILES="$POTFILES $lang.po"
47 for src in $SHSCRIPTS; do
48 POTSRC="$POTSRC \$(top_srcdir)/$src"
50 AC_ARG_WITH(localedir,
51 [ --with-localedir=PATH specify where the locale stuff should go ])
53 if test "x$LOCALEDIR" = "x"; then
54 if test "x$with_localedir" != "x"; then
55 LOCALEDIR=$with_localedir
57 LOCALEDIR='$(prefix)/share/locale'
62 gnulocaledir=$LOCALEDIR
64 if test "`eval echo $sysconfdir`" = "NONE/etc"; then
65 defaultdir="/usr/local/etc"
67 defaultdir="`eval echo $sysconfdir`"
70 AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
72 AC_MSG_CHECKING([glib2 dir])
73 GLIBDIR="`$PKG_CONFIG --variable=libdir glib-2.0`"
74 GLIBNAME="libglib-2.0.a"
75 GCFLAGS="`$PKG_CONFIG --cflags-only-I glib-2.0`"
76 if test "x$GLIBDIR" = "x"; then
78 AC_MSG_CHECKING([glib dir])
79 GLIBDIR="`$PKG_CONFIG --variable=libdir glib`"
81 GCFLAGS="`$PKG_CONFIG --cflags-only-I glib`"
83 if test "x$GLIBDIR" = "x"; then
86 AC_MSG_RESULT([$GLIBDIR])
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.]))
94 AC_CHECK_TYPE(ptrdiff_t,int)
95 AC_CHECK_HEADERS([stddef.h sys/capability.h])
103 AC_SUBST(gnulocaledir)
106 AC_SUBST(networkscriptsdir)
107 AC_SUBST(sysconfigdir)
113 AC_SUBST(firmwaredir)
123 /* Use the definitions: */
125 /* The maximum length of a #! interpreter displayed by dpkg-deb. */
127 #define INTERPRETER_MAX PATH_MAX
129 #define INTERPRETER_MAX 1024
132 /* GNU C attributes. */
134 #ifdef HAVE_GNUC25_ATTRIB
135 #define FUNCATTR(x) __attribute__(x)
141 /* GNU C printf formats, or null. */
143 #ifdef HAVE_GNUC25_PRINTFFORMAT
144 #define ATTRPRINTF(si,tc) format(printf,si,tc)
146 #define ATTRPRINTF(si,tc)
150 #define PRINTFFORMAT(si,tc) FUNCATTR((ATTRPRINTF(si,tc)))
153 /* GNU C nonreturning functions, or null. */
155 #ifdef HAVE_GNUC25_NORETURN
156 #define ATTRNORETURN noreturn
157 #else /* ! HAVE_GNUC25_NORETURN */
159 #endif /* HAVE_GNUC25_NORETURN */
160 #endif /* ATTRNORETURN */
163 #define NONRETURNING FUNCATTR((ATTRNORETURN))
164 #endif /* NONRETURNING */
166 /* Combination of both the above. */
167 #ifndef NONRETURNPRINTFFORMAT
168 #define NONRETURNPRINTFFORMAT(si,tc) FUNCATTR((ATTRPRINTF(si,tc),ATTRNORETURN))
171 /* GNU C constant functions, or null. */
173 #ifdef HAVE_GNUC25_CONST
174 #define ATTRCONST const
180 #define CONSTANT FUNCATTR((ATTRCONST))
183 /* GNU C unused functions, or null. */
185 #ifdef HAVE_GNUC25_UNUSED
192 #define UNUSED FUNCATTR((ATTRUNUSED))
196 AM_CONFIG_HEADER(src/config.h)
197 AC_CONFIG_FILES([Makefile \
210 sysconfig/cpusets/Makefile \
211 sysconfig/hwprofiles/Makefile \
212 sysconfig/network-scripts/Makefile \
213 sysconfig/interfaces/Makefile \
214 sysconfig/interfaces/data/Makefile \
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 \
227 rc.d/Makefile rc.d/init.d/Makefile \