mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-01 23:30:13 +01:00
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@337 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
245 lines
6.9 KiB
Text
245 lines
6.9 KiB
Text
AC_PREREQ(2.52)
|
|
|
|
AC_INIT(NetworkManager, 0.3.2, dcbw@redhat.com, NetworkManager)
|
|
AM_INIT_AUTOMAKE([subdir-objects])
|
|
|
|
AM_CONFIG_HEADER(config.h)
|
|
|
|
dnl
|
|
dnl Require programs
|
|
dnl
|
|
AC_PROG_CC
|
|
AM_PROG_CC_C_O
|
|
AC_PROG_INSTALL
|
|
AC_PROG_LIBTOOL
|
|
|
|
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)
|
|
|
|
GETTEXT_PACKAGE=NetworkManager
|
|
AC_SUBST(GETTEXT_PACKAGE)
|
|
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package])
|
|
ALL_LINGUAS="bs cs da de en_CA es gu nb nl no pa pt_BR sk sq sv wa zh_CN"
|
|
AM_GLIB_GNU_GETTEXT
|
|
|
|
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
|
|
--with-distro=slackware
|
|
],,)
|
|
|
|
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")
|
|
AC_CHECK_FILE(/etc/slackware-version,with_distro="slackware")
|
|
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|gentoo|debian|slackware) ;;
|
|
*)
|
|
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_GENTOO, test x"$with_distro" = xgentoo)
|
|
AM_CONDITIONAL(TARGET_DEBIAN, test x"$with_distro" = xdebian)
|
|
AM_CONDITIONAL(TARGET_MANDRAKE, test x"$with_distro" = xmandrake)
|
|
AM_CONDITIONAL(TARGET_SLACKWARE, test x"$with_distro" = xslackware)
|
|
|
|
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(GNOME_KEYRING, gnome-keyring-1)
|
|
AC_SUBST(GNOME_KEYRING_CFLAGS)
|
|
AC_SUBST(GNOME_KEYRING_LIBS)
|
|
|
|
AC_ARG_WITH(gcrypt, [--with-gcrypt Use gcrypt library], ac_gcrypt=$withval, ac_gcrypt=auto)
|
|
if test x"$ac_gcrypt" != xno; then
|
|
AC_PATH_PROG(LIBGCRYPT_CONFIG, libgcrypt-config, no)
|
|
else
|
|
LIBGCRYPT_CONFIG=no
|
|
fi
|
|
if test x"$LIBGCRYPT_CONFIG" = xno; then
|
|
if test x"$ac_gcrypt" = xyes; then
|
|
AC_MSG_ERROR([gcrypt explicitly requested but not found on system])
|
|
fi
|
|
ac_gcrypt=no
|
|
else
|
|
if test x"$ac_gcrypt" != xno; then
|
|
AC_DEFINE(HAVE_GCRYPT, 1, [Define if you have libgcrypt])
|
|
LIBGCRYPT_CFLAGS=`$LIBGCRYPT_CONFIG --cflags`
|
|
LIBGCRYPT_LIBS=`$LIBGCRYPT_CONFIG --libs`
|
|
AC_SUBST(LIBGCRYPT_CFLAGS)
|
|
AC_SUBST(LIBGCRYPT_LIBS)
|
|
fi
|
|
fi
|
|
AM_CONDITIONAL(WITH_GCRYPT, test x"$ac_gcrypt" != xno)
|
|
|
|
#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_ARG_ENABLE(notification-icon, [ --enable-notification-icon builds the wireless applet as a notification icon], enable_notification_icon=$enableval, enable_notification_icon=yes)
|
|
|
|
AM_CONDITIONAL(BUILD_NOTIFICATION_ICON, test x$enable_notification_icon = xyes)
|
|
if test x$enable_notification_icon == xyes ; then
|
|
AC_DEFINE_UNQUOTED(BUILD_NOTIFICATION_ICON, "$BUILD_NOTIFICATION_ICON", [Should we build the notification icon instead of the applet])
|
|
notification_icon_dir="panel-applet"
|
|
AC_SUBST(notification_icon_dir)
|
|
fi
|
|
|
|
#### find the actual value for $prefix that we'll end up with
|
|
## (I know this is broken and should be done in the Makefile, but
|
|
## that's a major pain and almost nobody actually seems to care)
|
|
REAL_PREFIX=
|
|
if test "x$prefix" = "xNONE"; then
|
|
REAL_PREFIX=$ac_default_prefix
|
|
else
|
|
REAL_PREFIX=$prefix
|
|
fi
|
|
|
|
## temporarily change prefix and exec_prefix
|
|
old_prefix=$prefix
|
|
prefix=$REAL_PREFIX
|
|
|
|
if test "x$exec_prefix" = xNONE ; then
|
|
REAL_EXEC_PREFIX=$REAL_PREFIX
|
|
else
|
|
REAL_EXEC_PREFIX=$exec_prefix
|
|
fi
|
|
old_exec_prefix=$exec_prefix
|
|
exec_prefix=$REAL_EXEC_PREFIX
|
|
|
|
BINDIR_TMP="$bindir"
|
|
EXPANDED_BINDIR=`eval echo $BINDIR_TMP`
|
|
AC_SUBST(EXPANDED_BINDIR)
|
|
AC_DEFINE_UNQUOTED(EXPANDED_BINDIR, "$EXPANDED_BINDIR", [Where the executables are installed])
|
|
|
|
## put prefix and exec_prefix back
|
|
prefix=$old_prefix
|
|
exec_prefix=$old_exec_prefix
|
|
|
|
AC_ARG_ENABLE(more-warnings,
|
|
[ --enable-more-warnings Maximum compiler warnings],
|
|
set_more_warnings="$enableval",[
|
|
if test -d "$srcdir/{arch}" || test -d "$srcdir/CVS"; then
|
|
set_more_warnings=yes
|
|
else
|
|
set_more_warnings=no
|
|
fi
|
|
])
|
|
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 -Wno-unused -Wno-strict-aliasing -Wno-sign-compare -Wdeclaration-after-statement; 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_OUTPUT([
|
|
Makefile
|
|
src/Makefile
|
|
dispatcher-daemon/Makefile
|
|
info-daemon/Makefile
|
|
panel-applet/Makefile
|
|
panel-applet/icons/Makefile
|
|
dhcpcd/Makefile
|
|
test/Makefile
|
|
initscript/Makefile
|
|
initscript/RedHat/Makefile
|
|
initscript/Gentoo/Makefile
|
|
initscript/Debian/Makefile
|
|
initscript/Slackware/Makefile
|
|
po/Makefile.in
|
|
NetworkManager.pc
|
|
])
|
|
|
|
echo
|
|
echo Distribution targeting: ${with_distro}
|
|
echo 'if this is not correct, please specifiy your distro with --with-distro=<distro>'
|