]> git.pld-linux.org Git - projects/rc-scripts.git/blame - configure.ac
Use --cflags-only-I from glib or glib-2.0 configuration when building ppp-watch.
[projects/rc-scripts.git] / configure.ac
CommitLineData
9ccfa537 1dnl $Id$
7e04fe0e 2
5bc22e08 3AC_INIT(["rc-scripts"], [0.4.0.8], [pld-rc-scripts@pld-linux.org], [rc-scripts])
bea191b3 4AM_INIT_AUTOMAKE
2c883f5e 5
05a11ced 6ALL_LINGUAS="pl de"
763b88c2
AM
7
8echo -n "Finding shell scripts"
9SHSCRIPTS=""
27c70f0e 10for shfile in $(find ${srcdir}/rc.d ${srcdir}/sysconfig -type f); do
763b88c2 11 echo -n "."
bea191b3 12 if (LANG=C file ${shfile} | grep -q 'shell script'); then
763b88c2
AM
13 SHSCRIPTS="${SHSCRIPTS} ${shfile}"
14 fi
15done
16echo "done"
7e04fe0e 17
18dnl Checks for programs.
19AC_PROG_CC
20AC_ISC_POSIX
21AC_PROG_INSTALL
22AC_PROG_LN_S
23AC_PROG_MAKE_SET
24
25pppdir='${sysconfdir}/ppp'
7e04fe0e 26sysconfigdir='${sysconfdir}/sysconfig'
8dbd5412 27updir='${sysconfigdir}/interfaces/up.d'
28downdir='${sysconfigdir}/interfaces/down.d'
16742ce6 29networkscriptsdir='${sysconfigdir}/network-scripts'
7e04fe0e 30rcdir='${sysconfdir}/rc.d'
31docdir="${prefix}/doc/$PACKAGE-$VERSION"
5d3bb684 32
dcd32750 33dnl i18n support
5d3bb684
AF
34AC_PATH_PROGS(MSGMERGE, msgmerge)
35AC_PATH_PROGS(GMSGFMT, gmsgfmt msgfmt)
36
dcd32750
AF
37CATALOGS=
38POTFILES=
39for lang in $ALL_LINGUAS; do
40 CATALOGS="$CATALOGS $lang.gmo"
41 POTFILES="$POTFILES $lang.po"
42done
7e04fe0e 43
dcd32750 44POTSRC=
2c883f5e 45for src in $SHSCRIPTS; do
dcd32750
AF
46 POTSRC="$POTSRC \$(top_srcdir)/$src"
47done
48AC_ARG_WITH(localedir,
49 [ --with-localedir=PATH specify where the locale stuff should go ])
50
51if test "x$LOCALEDIR" = "x"; then
52 if test "x$with_localedir" != "x"; then
53 LOCALEDIR=$with_localedir
54 else
55 LOCALEDIR='$(prefix)/share/locale'
56 fi
57fi
58
59localedir=$LOCALEDIR
60gnulocaledir=$LOCALEDIR
61
62if test "`eval echo $sysconfdir`" = "NONE/etc"; then
63 defaultdir="/usr/local/etc"
64else
65 defaultdir="`eval echo $sysconfdir`"
66fi
67
b8b29800
AM
68AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
69GLIBDIR=none
ff1ffbdb
AM
70AC_MSG_CHECKING([glib2 dir])
71GLIBDIR="`$PKG_CONFIG --variable=libdir glib-2.0`"
72GLIBNAME="libglib-2.0.a"
602f3ad9 73GCFLAGS="`$PKG_CONFIG --cflags-only-I glib-2.0`"
ff1ffbdb
AM
74if test "x$GLIBDIR" = "x"; then
75 AC_MSG_RESULT([none])
76 AC_MSG_CHECKING([glib dir])
77 GLIBDIR="`$PKG_CONFIG --variable=libdir glib`"
78 GLIBNAME="libglib.a"
602f3ad9 79 GCFLAGS="`$PKG_CONFIG --cflags-only-I glib`"
ff1ffbdb
AM
80fi
81if test "x$GLIBDIR" = "x"; then
82 GLIBDIR=/usr/lib
83fi
b8b29800
AM
84AC_MSG_RESULT([$GLIBDIR])
85
dcd32750
AF
86dnl Output
87AC_SUBST(BASHSCRIPTS)
88AC_SUBST(CATALOGS)
89AC_SUBST(POTFILES)
90AC_SUBST(POTSRC)
91AC_SUBST(localedir)
92AC_SUBST(gnulocaledir)
93
7e04fe0e 94AC_SUBST(pppdir)
95AC_SUBST(networkscriptsdir)
96AC_SUBST(sysconfigdir)
8dbd5412 97AC_SUBST(updir)
98AC_SUBST(downdir)
7e04fe0e 99AC_SUBST(rcdir)
100AC_SUBST(docdir)
b8b29800 101AC_SUBST(GLIBDIR)
ff1ffbdb 102AC_SUBST(GLIBNAME)
602f3ad9 103AC_SUBST(GCFLAGS)
7e04fe0e 104
763b88c2 105AC_CONFIG_FILES([Makefile src/Makefile doc/Makefile \
8dbd5412 106 ppp/Makefile \
763b88c2 107 isapnp/Makefile \
7e04fe0e 108 sysconfig/Makefile \
763b88c2 109 sysconfig/hwprofiles/Makefile \
7e04fe0e 110 sysconfig/network-scripts/Makefile \
ca263bb1
AF
111 sysconfig/interfaces/Makefile \
112 sysconfig/interfaces/data/Makefile \
8dbd5412 113 sysconfig/interfaces/up.d/Makefile \
114 sysconfig/interfaces/up.d/all/Makefile \
115 sysconfig/interfaces/up.d/ip/Makefile \
116 sysconfig/interfaces/up.d/ipx/Makefile \
117 sysconfig/interfaces/up.d/ppp/Makefile \
118 sysconfig/interfaces/up.d/tnl/Makefile \
119 sysconfig/interfaces/down.d/Makefile \
120 sysconfig/interfaces/down.d/all/Makefile \
121 sysconfig/interfaces/down.d/ip/Makefile \
122 sysconfig/interfaces/down.d/ipx/Makefile \
123 sysconfig/interfaces/down.d/ppp/Makefile \
124 sysconfig/interfaces/down.d/tnl/Makefile \
36ddc8d8 125 rc.d/Makefile rc.d/init.d/Makefile \
dcd32750 126 po/Makefile \
763b88c2
AM
127 rc-scripts.spec])
128AC_OUTPUT
This page took 0.525208 seconds and 4 git commands to generate.