3 AC_INIT(["rc-scripts"], [0.4.1.2], [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 (LANG=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 docdir="${prefix}/doc/$PACKAGE-$VERSION"
34 AC_PATH_PROGS(MSGMERGE, msgmerge)
35 AC_PATH_PROGS(GMSGFMT, gmsgfmt msgfmt)
39 for lang in $ALL_LINGUAS; do
40 CATALOGS="$CATALOGS $lang.gmo"
41 POTFILES="$POTFILES $lang.po"
45 for src in $SHSCRIPTS; do
46 POTSRC="$POTSRC \$(top_srcdir)/$src"
48 AC_ARG_WITH(localedir,
49 [ --with-localedir=PATH specify where the locale stuff should go ])
51 if test "x$LOCALEDIR" = "x"; then
52 if test "x$with_localedir" != "x"; then
53 LOCALEDIR=$with_localedir
55 LOCALEDIR='$(prefix)/share/locale'
60 gnulocaledir=$LOCALEDIR
62 if test "`eval echo $sysconfdir`" = "NONE/etc"; then
63 defaultdir="/usr/local/etc"
65 defaultdir="`eval echo $sysconfdir`"
68 AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
70 AC_MSG_CHECKING([glib2 dir])
71 GLIBDIR="`$PKG_CONFIG --variable=libdir glib-2.0`"
72 GLIBNAME="libglib-2.0.a"
73 GCFLAGS="`$PKG_CONFIG --cflags-only-I glib-2.0`"
74 if test "x$GLIBDIR" = "x"; then
76 AC_MSG_CHECKING([glib dir])
77 GLIBDIR="`$PKG_CONFIG --variable=libdir glib`"
79 GCFLAGS="`$PKG_CONFIG --cflags-only-I glib`"
81 if test "x$GLIBDIR" = "x"; then
84 AC_MSG_RESULT([$GLIBDIR])
86 DPKG_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.]))
92 AC_CHECK_TYPE(ptrdiff_t,int)
93 AC_CHECK_HEADERS([stddef.h])
101 AC_SUBST(gnulocaledir)
104 AC_SUBST(networkscriptsdir)
105 AC_SUBST(sysconfigdir)
119 /* Use the definitions: */
121 /* The maximum length of a #! interpreter displayed by dpkg-deb. */
123 #define INTERPRETER_MAX PATH_MAX
125 #define INTERPRETER_MAX 1024
128 /* GNU C attributes. */
130 #ifdef HAVE_GNUC25_ATTRIB
131 #define FUNCATTR(x) __attribute__(x)
137 /* GNU C printf formats, or null. */
139 #ifdef HAVE_GNUC25_PRINTFFORMAT
140 #define ATTRPRINTF(si,tc) format(printf,si,tc)
142 #define ATTRPRINTF(si,tc)
146 #define PRINTFFORMAT(si,tc) FUNCATTR((ATTRPRINTF(si,tc)))
149 /* GNU C nonreturning functions, or null. */
151 #ifdef HAVE_GNUC25_NORETURN
152 #define ATTRNORETURN noreturn
153 #else /* ! HAVE_GNUC25_NORETURN */
155 #endif /* HAVE_GNUC25_NORETURN */
156 #endif /* ATTRNORETURN */
159 #define NONRETURNING FUNCATTR((ATTRNORETURN))
160 #endif /* NONRETURNING */
162 /* Combination of both the above. */
163 #ifndef NONRETURNPRINTFFORMAT
164 #define NONRETURNPRINTFFORMAT(si,tc) FUNCATTR((ATTRPRINTF(si,tc),ATTRNORETURN))
167 /* GNU C constant functions, or null. */
169 #ifdef HAVE_GNUC25_CONST
170 #define ATTRCONST const
176 #define CONSTANT FUNCATTR((ATTRCONST))
179 /* GNU C unused functions, or null. */
181 #ifdef HAVE_GNUC25_UNUSED
188 #define UNUSED FUNCATTR((ATTRUNUSED))
192 AM_CONFIG_HEADER(src/config.h)
193 AC_CONFIG_FILES([Makefile \
206 sysconfig/cpusets/Makefile \
207 sysconfig/hwprofiles/Makefile \
208 sysconfig/network-scripts/Makefile \
209 sysconfig/interfaces/Makefile \
210 sysconfig/interfaces/data/Makefile \
211 sysconfig/interfaces/up.d/Makefile \
212 sysconfig/interfaces/up.d/all/Makefile \
213 sysconfig/interfaces/up.d/ip/Makefile \
214 sysconfig/interfaces/up.d/ipx/Makefile \
215 sysconfig/interfaces/up.d/ppp/Makefile \
216 sysconfig/interfaces/up.d/tnl/Makefile \
217 sysconfig/interfaces/down.d/Makefile \
218 sysconfig/interfaces/down.d/all/Makefile \
219 sysconfig/interfaces/down.d/ip/Makefile \
220 sysconfig/interfaces/down.d/ipx/Makefile \
221 sysconfig/interfaces/down.d/ppp/Makefile \
222 sysconfig/interfaces/down.d/tnl/Makefile \
223 rc.d/Makefile rc.d/init.d/Makefile \