NetworkManager/configure.in
Jonathan Blandford b034d4d1ab minor fixes for distros
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@67 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-08-25 22:09:11 +00:00

115 lines
3 KiB
Text

AC_PREREQ(2.52)
AC_INIT(NetworkManager, 0.1)
AM_INIT_AUTOMAKE([subdir-objects])
AC_PROG_CC
AM_PROG_CC_C_O
AC_ARG_WITH(distro,
[
--with-distro: Specify the Linux distribution to target with distro-specific
parts of NetworkManager
--with-distro=redhat
--with-distro=gentoo
--with-distro=debian
--with-distro=mandrake
],,)
TARGET_DISTRO=
SYSTEM_BACKEND_FILE=
if test "z$with_distro" = "z"; then
AC_CHECK_FILE(/etc/mandrake-release,with_distro="mandrake")
AC_CHECK_FILE(/etc/redhat-release,with_distro="redhat")
AC_CHECK_FILE(/etc/fedora-release,with_distro="redhat")
AC_CHECK_FILE(/etc/gentoo-release,with_distro="gentoo")
AC_CHECK_FILE(/etc/debian_version,with_distro="debian")
fi
if test "z$with_distro" = "z"; then
echo "Linux distribution autodetection failed, you must specify the distribution to target using --with-distro=<distro>"
exit 1
else
with_distro=`echo ${with_distro} | tr '[[:upper:]]' '[[:lower:]]' `
case $with_distro in
redhat)
TARGET_DISTRO=RedHat
SYSTEM_BACKEND_FILE=NetworkManagerRedHat.o
;;
gentoo)
TARGET_DISTRO=Gentoo
SYSTEM_BACKEND_FILE=NetworkManagerGentoo.o
;;
*)
echo "Your distribution(${with_distro}) is not yet supported! (patches welcome)"
exit 1
;;
esac
fi
AC_SUBST(TARGET_DISTRO)
AC_SUBST(SYSTEM_BACKEND_FILE)
AC_CHECK_HEADER(iwlib.h, [],
[AC_MSG_ERROR(iwlib.h not found. Install wireless-tools.)], [])
AC_CHECK_LIB(iw, iw_scan, [ IWLIB=-liw ],
[AC_MSG_ERROR(wireless-tools 27.pre23 not installed or not functional)], [])
AC_SUBST(IWLIB)
PKG_CHECK_MODULES(NM, dbus-glib-1 >= 0.20 hal >= 0.2.91 gthread-2.0)
AC_SUBST(NM_CFLAGS)
AC_SUBST(NM_LIBS)
PKG_CHECK_MODULES(GTK, gtk+-2.0)
AC_SUBST(GTK_CFLAGS)
AC_SUBST(GTK_LIBS)
PKG_CHECK_MODULES(GDK_PIXBUF, gdk-pixbuf-2.0)
AC_SUBST(GDK_PIXBUF_CFLAGS)
AC_SUBST(GDK_PIXBUF_LIBS)
PKG_CHECK_MODULES(GLADE, libglade-2.0)
AC_SUBST(GLADE_CFLAGS)
AC_SUBST(GLADE_LIBS)
PKG_CHECK_MODULES(GCONF, gconf-2.0)
AC_SUBST(GCONF_CFLAGS)
AC_SUBST(GCONF_LIBS)
PKG_CHECK_MODULES(OPENSSL, openssl)
AC_SUBST(OPENSSL_CFLAGS)
AC_SUBST(0PENSSL_LIBS)
PKG_CHECK_MODULES(PANEL_APPLET, libpanelapplet-2.0)
AC_SUBST(PANEL_APPLET_CFLAGS)
AC_SUBST(PANEL_APPLET_LIBS)
PKG_CHECK_MODULES(LIBGNOMEUI, libgnomeui-2.0)
AC_SUBST(LIBGNOMEUI_CFLAFS)
AC_SUBST(LIBGNOMEUI_LIBS)
# taken from hal
AC_ARG_WITH(dbus-sys, [ --with-dbus-sys=<dir> where D-BUS system.d directory is])
if ! test -z "$with_dbus_sys" ; then
DBUS_SYS_DIR="$with_dbus_sys"
else
DBUS_SYS_DIR="${sysconfdir}/dbus-1/system.d"
fi
AC_SUBST(DBUS_SYS_DIR)
AC_DEFINE_UNQUOTED(DBUS_SYSTEMD_DIR, "$DBUS_SYS_DIR", [Where system.d dir for DBUS is])
AC_OUTPUT([
Makefile
src/Makefile
dispatcher-daemon/Makefile
info-daemon/Makefile
panel-applet/Makefile
test/Makefile
initscript/Makefile
initscript/RedHat/Makefile
initscript/Gentoo/Makefile
])
echo
echo Distribution targeting: ${TARGET_DISTRO}
echo 'if this is not correct, please specifiy your distro with --with-distro=<distro>'