#MIN_CONFIG(3.2) CXXFLAGS="$CXXFLAGS $KDE_DEFAULT_CXXFLAGS" AM_INIT_AUTOMAKE(knetworkmanager, 0.8, kb9vqf@pearsoncomputing.net) AC_C_BIGENDIAN AC_CHECK_KDEMAXPATHLEN KNETWORKMANAGER_VERSION="0.8" AC_DEFINE_UNQUOTED(KNETWORKMANAGER_VERSION, $KNETWORKMANAGER_VERSION, [KNetworkManager Version]) AC_DEFINE_UNQUOTED(KNETWORKMANAGER_VERSION_STRING, "$KNETWORKMANAGER_VERSION", [KNetworkManager Version String]) # check for dbus, hal, libnm-util and libnl PKG_CHECK_MODULES(HAL, [hal], [], [ AC_MSG_RESULT([no]) AC_MSG_WARN([You need Hal, knetworkmanager will not be compiled]) DO_NOT_COMPILE="$DO_NOT_COMPILE knetworkmanager" MISSING_DEPS="$MISSING_DEPS hal" ]) PKG_CHECK_MODULES(LIBNMUTIL, [libnm-util >= 0.7], [], [ AC_MSG_RESULT([no]) AC_MSG_WARN([You need libnm-util >= 0.7, knetworkmanager will not be compiled]) DO_NOT_COMPILE="$DO_NOT_COMPILE knetworkmanager" MISSING_DEPS="$MISSING_DEPS libnm-util" ]) PKG_CHECK_MODULES(LIBNMGLIB, [libnm_glib >= 0.7], [], [ AC_MSG_RESULT([no]) AC_MSG_WARN([You need libnm-util, knetworkmanager will not be compiled]) DO_NOT_COMPILE="$DO_NOT_COMPILE knetworkmanager" MISSING_DEPS="$MISSING_DEPS libnm-glib" ]) PKG_CHECK_MODULES(LIBNL, [libnl-1], [], [ AC_MSG_RESULT([no]) AC_MSG_WARN([You need libnl, knetworkmanager will not be compiled]) DO_NOT_COMPILE="$DO_NOT_COMPILE knetworkmanager" MISSING_DEPS="$MISSING_DEPS libnl-1" ]) PKG_CHECK_MODULES(DBUS_TQT, [dbus-1-tqt >= 0.8.1], [], [ AC_MSG_RESULT([no]) AC_MSG_ERROR([TQT dbus bindings missing]) ]) AC_CHECK_PROG(DBUSXML2QT3, [dbusxml2qt3], [dbusxml2qt3], [no]) if test "$DBUSXML2QT3" = no ; then AC_MSG_WARN([You need dbusxml2qt3, knetworkmanager will not be compiled]) DO_NOT_COMPILE="$DO_NOT_COMPILE knetworkmanager" MISSING_DEPS="$MISSING_DEPS dbusxml2qt3" fi PACKAGE_CFLAGS="$HAL_CFLAGS $LIBNL_CFLAGS $DBUS_TQT_CFLAGS $LIBNMGLIB_CFLAGS" PACKAGE_LIBS="$HAL_LIBS $LIBNL_LIBS $DBUS_TQT_LIBS" AC_ARG_WITH(dbus-sys, AC_HELP_STRING([--with-dbus-sys=DIR], [D-BUS system.d directory])) 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", [D-BUS system.d directory]) AC_SUBST(PACKAGE_CFLAGS) AC_SUBST(PACKAGE_LIBS) AC_SUBST(LIB_DL) AC_ARG_WITH(distro, AC_HELP_STRING([--with-distro=DISTRO], [Specify the Linux distribution to target: suse, gentoo, fedora])) if test "x$with_distro" = "x"; then AC_CHECK_FILE(/etc/SuSE-release,with_distro="suse") AC_CHECK_FILE(/etc/gentoo-release,with_distro="gentoo") AC_CHECK_FILE(/etc/redhat-release,with_distro="fedora") if test "x$with_distro" = "x"; then with_distro=`lsb_release -is` fi fi with_distro=`echo ${with_distro} | tr '[[:upper:]]' '[[:lower:]]' ` # Compile dialup support AC_ARG_WITH(dialup, AC_HELP_STRING([--with-dialup], [Build KNetworkManager with Dialup support (default)])) if test "x$with_dialup" != "xno"; then if test "x$with_distro" = "x"; then echo "Linux distribution autodetection failed, you must specify the distribution to target using --with-distro=DISTRO" else case $with_distro in suse) AC_DEFINE_UNQUOTED(KNETWORKMANAGER_DIALUP_CONFIG, "tdesu --nonewdcop /sbin/yast2 modem", [Command to launch dial up configuration tool]) ;; gentoo) AC_DEFINE_UNQUOTED(KNETWORKMANAGER_DIALUP_CONFIG, "tdesu --nonewdcop ${KDEDIR}/bin/kppp", [Command to launch dial up configuration tool]) ;; fedora) AC_DEFINE_UNQUOTED(KNETWORKMANAGER_DIALUP_CONFIG, "tdesu --nonewdcop /usr/bin/kppp", [Command to launch dial up configuration tool]) ;; *) echo "Your distribution (${with_distro}) is not yet supported (e.g. you will not be able to launch a tool to configure dial-up connections.)" ;; esac fi fi # openvpn support AC_ARG_WITH(openvpn, AC_HELP_STRING([--with-openvpn], [Build KNetworkManager with openvpn plugin])) if test "x$with_openvpn" = "x"; then AC_CHECK_FILE(/etc/NetworkManager/VPN/nm-openvpn-service.name,with_openvpn="yes" ) fi AM_CONDITIONAL(WITH_OPENVPN, test x"$with_openvpn" = "xyes") # vpnc support AC_ARG_WITH(vpnc, AC_HELP_STRING([--with-vpnc], [Build KNetworkManager with vpnc plugin])) if test "x$with_vpnc" = "x"; then AC_CHECK_FILE(/etc/NetworkManager/VPN/nm-vpnc-service.name,with_vpnc="yes" ) fi AM_CONDITIONAL(WITH_VPNC, test x"$with_vpnc" = "xyes") # pptp support AC_ARG_WITH(pptp, AC_HELP_STRING([--with-pptp], [Build KNetworkManager with pptp plugin])) if test "x$with_pptp" = "x"; then AC_CHECK_FILE(/etc/NetworkManager/VPN/nm-pptp-service.name,with_pptp="yes" ) fi AM_CONDITIONAL(WITH_PPTP, test x"$with_pptp" = "xyes") # strongswan support AC_ARG_WITH(strongswan, AC_HELP_STRING([--with-strongswan], [Build KNetworkManager with strongswan plugin])) if test "x$with_strongswan" = "x"; then AC_CHECK_FILE(/etc/NetworkManager/VPN/nm-strongswan-service.name,with_strongswan="yes" ) fi AM_CONDITIONAL(WITH_STRONGSWAN, test x"$with_strongswan" = "xyes") # set include path for knetworkmanager-plugin.h and knetworkmanager-vpnplugin.h when vpn plugins are built together with knetworkmanager KNETWORKMANAGER_CFLAGS="-I\$(top_srcdir)/knetworkmanager-0.8/src" AC_SUBST(KNETWORKMANAGER_CFLAGS)