Files
NetworkManager/configure.in
Dan Williams 0422784433 2008-04-05 Dan Williams <dcbw@redhat.com>
* Makefile.am
	  configure.in
	  marshallers/Makefile.am
	  marshallers/nm-marshal-main.c
	  marshallers/nm-marshal.list
		- Consolidate marshallers

	* libnm-glib/nm-marshal-main.c
	  libnm-glib/nm-marshal.list
	  src/marshallers/Makefile.am
	  src/marshallers/nm-marshal-main.c
	  src/marshallers/nm-marshal.list
		- Remove

	* libnm-glib/Makefile.am
	  src/Makefile.am
	  src/dhcp-manager/Makefile.am
	  src/ppp-manager/Makefile.am
	  src/supplicant-manager/Makefile.am
	  src/vpn-manager/Makefile.am
		- Use consolidated marshallers



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3533 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-05 16:28:24 +00:00

354 lines
10 KiB
Plaintext

AC_PREREQ(2.52)
AC_INIT(NetworkManager, 0.7.0, dcbw@redhat.com, NetworkManager)
AM_INIT_AUTOMAKE([subdir-objects])
AM_MAINTAINER_MODE
AC_CONFIG_HEADERS(config.h)
dnl
dnl Require programs
dnl
AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_INSTALL
AC_PROG_LIBTOOL
dnl ensure that when the Automake generated makefile calls aclocal,
dnl it honours the $ACLOCAL_FLAGS environment variable
ACLOCAL_AMFLAGS="\${ACLOCAL_FLAGS}"
if test -n "$ac_macro_dir"; then
ACLOCAL_AMFLAGS="-I $ac_macro_dir $ACLOCAL_AMFLAGS"
fi
AC_SUBST([ACLOCAL_AMFLAGS])
dnl maintainer mode stuff
if test $USE_MAINTAINER_MODE = yes; then
DISABLE_DEPRECATED="-DG_DISABLE_DEPRECATED -DGCONF_DISABLE_DEPRECATED"
else
DISABLE_DEPRECATED=""
fi
AC_SUBST(DISABLE_DEPRECATED)
dnl
dnl Required headers
dnl
AC_HEADER_STDC
AC_CHECK_HEADERS(fcntl.h paths.h sys/ioctl.h sys/time.h syslog.h unistd.h)
dnl
dnl Checks for typedefs, structures, and compiler characteristics.
dnl
AC_TYPE_MODE_T
AC_TYPE_PID_T
AC_HEADER_TIME
dnl
dnl Checks for library functions.
dnl
AC_PROG_GCC_TRADITIONAL
AC_FUNC_MEMCMP
AC_CHECK_FUNCS(select socket uname)
dnl
dnl translation support
dnl
GETTEXT_PACKAGE=NetworkManager
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package])
IT_PROG_INTLTOOL([0.35.0])
AM_GLIB_GNU_GETTEXT
dnl
dnl GNOME support
dnl
AC_ARG_WITH(docs, AC_HELP_STRING([--with-docs], [Build NetworkManager documentation]))
AM_CONDITIONAL(WITH_DOCS, test "x$with_docs" = "xyes")
case $with_docs in
yes) ;;
*)
with_docs=no
;;
esac
dnl
dnl Make sha1.c happy on big endian systems
dnl
AC_C_BIGENDIAN
AC_ARG_WITH(distro, AS_HELP_STRING([--with-distro=DISTRO], [Specify the Linux distribution to target: One of redhat, suse, gentoo, debian, arch, slackware, paldo or mandriva]))
if test "z$with_distro" = "z"; then
AC_CHECK_FILE(/etc/redhat-release,with_distro="redhat")
AC_CHECK_FILE(/etc/SuSE-release,with_distro="suse")
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")
AC_CHECK_FILE(/etc/arch-release,with_distro="arch")
AC_CHECK_FILE(/etc/slackware-version,with_distro="slackware")
AC_CHECK_FILE(/etc/frugalware-release,with_distro="frugalware")
AC_CHECK_FILE(/etc/mandriva-release,with_distro="mandriva")
if test "z$with_distro" = "z"; then
with_distro=`lsb_release -is`
fi
fi
with_distro=`echo ${with_distro} | tr '[[:upper:]]' '[[:lower:]]' `
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
case $with_distro in
redhat|suse|gentoo|debian|slackware|arch|paldo|frugalware|mandriva) ;;
*)
echo "Your distribution (${with_distro}) is not yet supported! (patches welcome)"
exit 1
;;
esac
fi
AM_CONDITIONAL(TARGET_REDHAT, test x"$with_distro" = xredhat)
AM_CONDITIONAL(TARGET_SUSE, test x"$with_distro" = xsuse)
AM_CONDITIONAL(TARGET_GENTOO, test x"$with_distro" = xgentoo)
AM_CONDITIONAL(TARGET_DEBIAN, test x"$with_distro" = xdebian)
AM_CONDITIONAL(TARGET_SLACKWARE, test x"$with_distro" = xslackware)
AM_CONDITIONAL(TARGET_ARCH, test x"$with_distro" = xarch)
AM_CONDITIONAL(TARGET_PALDO, test x"$with_distro" = xpaldo)
AM_CONDITIONAL(TARGET_FRUGALWARE, test x"$with_distro" = xfrugalware)
AM_CONDITIONAL(TARGET_MANDRIVA, test x"$with_distro" = xmandriva)
if test x"$with_distro" = xgentoo -o x"$with_distro" = xmandriva ; then
AC_ARG_WITH([mdns_provider],
AS_HELP_STRING([--with-mdns-provider=PROVIDER], [Specify the mDNS implementation: Avahi, Bonjour]),,
[with_mdns_provider=avahi])
with_mdns_provider=`echo ${with_mdns_provider} | tr '[[:upper:]]' '[[:lower:]]'`
case $with_mdns_provider in
avahi)
AC_DEFINE([MDNS_PROVIDER_AVAHI], [], [Use avahi for mDNS provider])
;;
bonjour)
AC_DEFINE([MDNS_PROVIDER_BONJOUR], [], [Use Bonjour mDNSResponderPosix for mDNS provider])
;;
*)
AC_MSG_ERROR([invalid mdns implementation specified ($with_mdns_provider)])
;;
esac
fi
AC_MSG_CHECKING([Linux Wireless Extensions >= 18])
AC_TRY_COMPILE([#ifndef __user
#define __user
#endif
#include <sys/types.h>
#include <linux/types.h>
#include <sys/socket.h>
#include <net/if.h>
#include <wireless.h>],
[#ifndef IWEVGENIE
#error "not found"
#endif],
[ac_have_iwevgenie=yes],
[ac_have_iwevgenie=no])
AC_MSG_RESULT($ac_have_iwevgenie)
if test "$ac_have_iwevgenie" = no; then
AC_MSG_ERROR(wireless-tools >= 28pre9 not installed or not functional)
fi
PKG_CHECK_MODULES(DBUS, dbus-glib-1 >= 0.72)
##### Find out the version of DBUS we're using
dbus_version=`pkg-config --modversion dbus-1`
DBUS_VERSION_MAJOR=`echo $dbus_version | awk -F. '{print $1}'`
DBUS_VERSION_MINOR=`echo $dbus_version | awk -F. '{print $2}'`
DBUS_VERSION_MICRO=`echo $dbus_version | awk -F. '{print $3}'`
if test "z$DBUS_VERSION_MAJOR" = "z"; then
DBUS_VERSION_MAJOR="0"
fi
if test "z$DBUS_VERSION_MINOR" = "z"; then
DBUS_VERSION_MINOR="0"
fi
if test "z$DBUS_VERSION_MICRO" = "z"; then
DBUS_VERSION_MICRO="0"
fi
if test "z$DBUS_VERSION_MAJOR" = "z0" -a "z$DBUS_VERSION_MINOR" = "z0" -a "z$DBUS_VERSION_MICRO" = "z0"; then
echo "Error: Couldn't determine the version of your DBUS package."
echo " This is probably an error in this script, please report it"
echo " along with the following information:"
echo " Base DBUS version ='$dbus_version'"
echo " DBUS_VERSION_MAJOR='$DBUS_VERSION_MAJOR'"
echo " DBUS_VERSION_MINOR='$DBUS_VERSION_MINOR'"
echo " DBUS_VERSION_MICRO='$DBUS_VERSION_MICRO'"
exit 1
else
echo "Your dbus version is $DBUS_VERSION_MAJOR,$DBUS_VERSION_MINOR,$DBUS_VERSION_MICRO."
DBUS_CFLAGS="$DBUS_CFLAGS -DDBUS_VERSION_MAJOR=$DBUS_VERSION_MAJOR"
DBUS_CFLAGS="$DBUS_CFLAGS -DDBUS_VERSION_MINOR=$DBUS_VERSION_MINOR"
DBUS_CFLAGS="$DBUS_CFLAGS -DDBUS_VERSION_MICRO=$DBUS_VERSION_MICRO"
fi
AC_SUBST(DBUS_CFLAGS)
AC_SUBST(DBUS_LIBS)
PKG_CHECK_MODULES(GTHREAD, gthread-2.0)
AC_SUBST(GTHREAD_CFLAGS)
AC_SUBST(GTHREAD_LIBS)
PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.10)
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS)
PKG_CHECK_MODULES(GMODULE, gmodule-2.0)
AC_SUBST(GMODULE_CFLAGS)
AC_SUBST(GMODULE_LIBS)
PKG_CHECK_MODULES(GOBJECT, gobject-2.0)
AC_SUBST(GOBJECT_CFLAGS)
AC_SUBST(GOBJECT_LIBS)
# This is optional, at least for now.
PKG_CHECK_MODULES(GIO, gio-2.0,,true)
AC_SUBST(GIO_CFLAGS)
AC_SUBST(GIO_LIBS)
PKG_CHECK_MODULES(HAL, hal >= 0.5.0)
AC_SUBST(HAL_CFLAGS)
AC_SUBST(HAL_LIBS)
PKG_CHECK_MODULES(LIBNL, libnl-1 >= 1.0-pre8)
AC_SUBST(LIBNL_CFLAGS)
AC_SUBST(LIBNL_LIBS)
GLIB_GENMARSHAL=`pkg-config --variable=glib_genmarshal glib-2.0`
AC_SUBST(GLIB_GENMARSHAL)
AC_ARG_WITH(dbus-sys-dir, AS_HELP_STRING([--with-dbus-sys-dir=DIR], [where D-BUS system.d directory is]))
if test -n "$with_dbus_sys_dir" ; then
DBUS_SYS_DIR="$with_dbus_sys_dir"
else
DBUS_SYS_DIR="${sysconfdir}/dbus-1/system.d"
fi
AC_SUBST(DBUS_SYS_DIR)
# ip binary path
AC_ARG_WITH(ip, AS_HELP_STRING([--with-ip=/path/to/ip], [path to ip]))
if test "x${with_ip}" = x; then
AC_PATH_PROG(IP_BINARY_PATH, ip, [], $PATH:/sbin:/usr/sbin)
if ! test -x "$IP_BINARY_PATH"; then
AC_MSG_ERROR(iproute2 was not installed. See http://linux-net.osdl.org/index.php/Iproute2)
fi
else
IP_BINARY_PATH="$with_ip"
fi
AC_DEFINE_UNQUOTED(IP_BINARY_PATH, "$IP_BINARY_PATH", [Define to path of ip binary])
AC_SUBST(IP_BINARY_PATH)
# PPPD
AC_CHECK_HEADERS(pppd/pppd.h,,
AC_MSG_ERROR(couldn't find pppd.h. pppd-devel package is required.))
AC_ARG_WITH([pppd-plugin-dir], AS_HELP_STRING([--with-pppd-plugin-dir=DIR], [path to the pppd plugins directory]))
if test -n "$with_pppd_plugin_dir" ; then
PPPD_PLUGIN_DIR="$with_pppd_plugin_dir"
else
PPPD_PLUGIN_DIR="${libdir}/pppd/2.4.4"
fi
AC_SUBST(PPPD_PLUGIN_DIR)
AC_ARG_ENABLE(more-warnings,
AS_HELP_STRING([--enable-more-warnings], [Maximum compiler warnings]), set_more_warnings="$enableval",set_more_warnings=yes)
AC_MSG_CHECKING(for more warnings, including -Werror)
if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
AC_MSG_RESULT(yes)
CFLAGS="-Wall -Werror -std=gnu89 $CFLAGS"
for option in -Wshadow -Wmissing-declarations -Wmissing-prototypes \
-Wdeclaration-after-statement -Wstrict-prototypes \
-Wfloat-equal -Wno-unused-parameter -Wno-sign-compare; do
SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $option"
AC_MSG_CHECKING([whether gcc understands $option])
AC_TRY_COMPILE([], [],
has_option=yes,
has_option=no,)
if test $has_option = no; then
CFLAGS="$SAVE_CFLAGS"
fi
AC_MSG_RESULT($has_option)
unset has_option
unset SAVE_CFLAGS
done
unset option
else
AC_MSG_RESULT(no)
fi
AC_CONFIG_FILES([
Makefile
include/Makefile
src/Makefile
marshallers/Makefile
src/named-manager/Makefile
src/vpn-manager/Makefile
src/dhcp-manager/Makefile
src/supplicant-manager/Makefile
src/ppp-manager/Makefile
src/backends/Makefile
libnm-util/libnm-util.pc
libnm-util/Makefile
libnm-glib/libnm_glib.pc
libnm-glib/Makefile
callouts/Makefile
dispatcher-daemon/Makefile
tools/Makefile
system-settings/Makefile
system-settings/src/Makefile
system-settings/plugins/Makefile
system-settings/plugins/ifcfg-fedora/Makefile
system-settings/plugins/ifcfg-suse/Makefile
test/Makefile
test/test-common/Makefile
initscript/Makefile
initscript/RedHat/Makefile
initscript/RedHat/NetworkManager
initscript/RedHat/NetworkManagerDispatcher
initscript/Gentoo/Makefile
initscript/Gentoo/NetworkManager
initscript/Gentoo/NetworkManagerDispatcher
initscript/Debian/Makefile
initscript/Slackware/Makefile
initscript/Slackware/rc.networkmanager
initscript/Slackware/rc.networkmanager-dispatcher
initscript/SUSE/Makefile
initscript/SUSE/networkmanager
initscript/SUSE/networkmanager-dispatcher
initscript/Arch/Makefile
initscript/Arch/networkmanager
initscript/Arch/networkmanager-dispatcher
initscript/paldo/Makefile
initscript/paldo/NetworkManager
initscript/paldo/NetworkManagerDispatcher
initscript/Mandriva/Makefile
initscript/Mandriva/networkmanager
initscript/Mandriva/networkmanagerdispatcher
introspection/Makefile
man/Makefile
man/NetworkManager.8
man/NetworkManagerDispatcher.8
man/nm-tool.1
po/Makefile.in
NetworkManager.pc
])
AC_OUTPUT
echo
echo Distribution targeting: ${with_distro}
echo 'if this is not correct, please specifiy your distro with --with-distro=DISTRO'
echo
echo Building documentation: ${with_docs}
echo