Commit dbc29ef2 authored by Keith Preston's avatar Keith Preston

Bug #22416: Remove automagic deps and add switches to enable/disable

parent b05ae0d9
......@@ -55,35 +55,89 @@ AC_DEFINE_UNQUOTED(DBUS_SERVICES_DIR, "$DBUS_SERVICES_DIR", [Where services dir
CFLAGS="$CFLAGS -g -Wall -Werror -Wno-format"
# -----------------------------------------------------------
# gtk+
# -----------------------------------------------------------
AC_ARG_ENABLE(gtk,
AS_HELP_STRING([--enable-gtk=@<:@no/yes/auto@:>@],
[build with gtk support]), ,
enable_gtk=auto)
if test "x$enable_gtk" != "xno"; then
PKG_CHECK_MODULES(GTK,
[
gtk+-2.0
], have_gtk="yes", have_gtk="no")
if test "x$have_gtk" = "xyes"; then
AC_DEFINE(HAVE_GTK, 1, [Define if you have gtk+])
fi
else
have_gtk=no
fi
if test "x$enable_gtk" = "xyes" -a "x$have_gtk" != "xyes"; then
AC_MSG_ERROR([Couldn't find gtk dependencies.])
fi
PKG_CHECK_MODULES(GTK, [
gtk+-2.0
], HAVE_GTK=yes, HAVE_GTK=no)
AM_CONDITIONAL(HAVE_GTK, test "x$HAVE_GTK" = "xyes")
AM_CONDITIONAL(HAVE_GTK, test "x$have_gtk" = "xyes")
AC_SUBST(GTK_LIBS)
AC_SUBST(GTK_CFLAGS)
# -----------------------------------------------------------
# connectivity
# -----------------------------------------------------------
CONNECTIVITY="None"
PKG_CHECK_MODULES(CONIC, [
conic
], HAVE_CONIC=yes, HAVE_CONIC=no)
if test "x$HAVE_CONIC" = "xyes"; then
CONNECTIVITY="Maemo LibConIC"
CONNECTIVITY_LIBS=${CONIC_LIBS}
CONNECTIVITY_CFLAGS=${CONIC_CFLAGS}
AC_DEFINE(HAVE_CONIC, 1, [define if libconic is installed])
AC_ARG_ENABLE(conic,
AS_HELP_STRING([--enable-conic=@<:@no/yes/auto@:>@],
[build with conic support]), ,
enable_conic=auto)
if test "x$enable_conic" != "xno"; then
PKG_CHECK_MODULES(CONIC,
[
conic
], have_conic="yes", have_conic="no")
if test "x$have_conic" = "xyes"; then
CONNECTIVITY="Maemo LibConIC"
CONNECTIVITY_LIBS=${CONIC_LIBS}
CONNECTIVITY_CFLAGS=${CONIC_CFLAGS}
AC_DEFINE(HAVE_CONIC, 1, [define if libconic is installed])
fi
else
have_conic=no
fi
PKG_CHECK_MODULES(NETWORK_MANAGER, [
NetworkManager libnm_glib
], HAVE_NETWORK_MANAGER=yes, HAVE_NETWORK_MANAGER=no)
if test "x$HAVE_NETWORK_MANAGER" = "xyes"; then
CONNECTIVITY="Network Manager"
CONNECTIVITY_LIBS=${NETWORK_MANAGER_LIBS}
CONNECTIVITY_CFLAGS=${NETWORK_MANAGER_CFLAGS}
AC_DEFINE(HAVE_NETWORK_MANAGER, 1, [define if Network Manager is installed])
if test "x$enable_conic" = "xyes" -a "x$have_conic" != "xyes"; then
AC_MSG_ERROR([Couldn't find conic dependencies.])
fi
AC_ARG_ENABLE(networkmanager,
AS_HELP_STRING([--enable-networkmanager=@<:@no/yes/auto@:>@],
[build with NetworkManager support]), ,
enable_networkmanager=auto)
if test "x$enable_networkmanager" != "xno"; then
PKG_CHECK_MODULES(NETWORK_MANAGER,
[
NetworkManager libnm_glib
], have_networkmanager="yes", have_networkmanager="no")
if test "x$have_networkmanager" = "xyes"; then
CONNECTIVITY="Network Manager"
CONNECTIVITY_LIBS=${NETWORK_MANAGER_LIBS}
CONNECTIVITY_CFLAGS=${NETWORK_MANAGER_CFLAGS}
AC_DEFINE(HAVE_NETWORK_MANAGER, 1, [define if Network Manager is installed])
fi
else
have_networkmanager=no
fi
if test "x$enable_networkmanager" = "xyes" -a "x$have_networkmanager" != "xyes"; then
AC_MSG_ERROR([Couldn't find Network Manager dependencies.])
fi
AC_SUBST(CONNECTIVITY_LIBS)
......@@ -92,46 +146,108 @@ AC_SUBST(CONNECTIVITY_CFLAGS)
PROVIDER_SUBDIRS="example hostip geonames manual plazes localnet yahoo"
PKG_CHECK_MODULES(GSMLOC, [
gammu >= 1.12
], HAVE_GSMLOC=yes, HAVE_GSMLOC=no)
if test "x$HAVE_GSMLOC" = "xyes"; then
PROVIDER_SUBDIRS="$PROVIDER_SUBDIRS gsmloc"
else
NO_BUILD_PROVIDERS="$NO_BUILD_PROVIDERS gsmloc"
# -----------------------------------------------------------
# gsmloc / gypsy / gpsd / skyhook
# -----------------------------------------------------------
AC_ARG_ENABLE(gsmloc,
AS_HELP_STRING([--enable-gsmloc=@<:@no/yes/auto@:>@],
[build with gsmloc support]), ,
enable_gsmloc=auto)
if test "x$enable_gsmloc" != "xno"; then
PKG_CHECK_MODULES(GSMLOC,
[
gammu >= 1.12
], have_gsmloc="yes", have_gsmloc="no")
if test "x$have_gsmloc" = "xyes"; then
PROVIDER_SUBDIRS="$PROVIDER_SUBDIRS gsmloc"
else
NO_BUILD_PROVIDERS="$NO_BUILD_PROVIDERS gsmloc"
fi
else
have_gsmloc=no
fi
if test "x$enable_gsmloc" = "xyes" -a "x$have_gsmloc" != "xyes"; then
AC_MSG_ERROR([Couldn't find gsmloc dependencies.])
fi
AC_SUBST(GSMLOC_LIBS)
AC_SUBST(GSMLOC_CFLAGS)
PKG_CHECK_MODULES(GYPSY, [
gypsy
], HAVE_GYPSY=yes,HAVE_GYPSY=no)
if test "x$HAVE_GYPSY" = "xyes"; then
PROVIDER_SUBDIRS="$PROVIDER_SUBDIRS gypsy"
else
NO_BUILD_PROVIDERS="$NO_BUILD_PROVIDERS gypsy"
AC_ARG_ENABLE(gypsy,
AS_HELP_STRING([--enable-gypsy=@<:@no/yes/auto@:>@],
[build with gypsy support]), ,
enable_gypsy=auto)
if test "x$enable_gypsy" != "xno"; then
PKG_CHECK_MODULES(GYPSY,
[
gypsy
], have_gypsy="yes", have_gypsy="no")
if test "x$have_gypsy" = "xyes"; then
PROVIDER_SUBDIRS="$PROVIDER_SUBDIRS gypsy"
else
NO_BUILD_PROVIDERS="$NO_BUILD_PROVIDERS gypsy"
fi
else
have_gypsy=no
fi
if test "x$enable_gypsy" = "xyes" -a "x$have_gypsy" != "xyes"; then
AC_MSG_ERROR([Couldn't find gypsy dependencies.])
fi
AC_SUBST(GYPSY_LIBS)
AC_SUBST(GYPSY_CFLAGS)
AC_CHECK_LIB(gps, gps_open,[libgps=yes] )
if test "x$libgps" = xyes; then
PROVIDER_SUBDIRS="$PROVIDER_SUBDIRS gpsd"
GPSD_LIBS="-lgps"
else
NO_BUILD_PROVIDERS="$NO_BUILD_PROVIDERS gpsd"
AC_ARG_ENABLE(gpsd,
AS_HELP_STRING([--enable-gpsd=@<:@no/yes/auto@:>@],
[build with gpsd support]), ,
enable_gpsd=auto)
if test "x$enable_gpsd" != "xno"; then
AC_CHECK_LIB(gps, gps_open,[libgps=yes] )
if test "x$have_gpsd" = "xyes"; then
PROVIDER_SUBDIRS="$PROVIDER_SUBDIRS gpsd"
GPSD_LIBS="-lgps"
else
NO_BUILD_PROVIDERS="$NO_BUILD_PROVIDERS gpsd"
fi
else
have_gpsd=no
fi
if test "x$enable_gpsd" = "xyes" -a "x$have_gpsd" != "xyes"; then
AC_MSG_ERROR([Couldn't find gpsd dependencies.])
fi
AC_SUBST(GPSD_LIBS)
AC_SUBST(GPSD_CFLAGS)
PKG_CHECK_MODULES(SKYHOOK, [
AC_ARG_ENABLE(skyhook,
AS_HELP_STRING([--enable-skyhook=@<:@no/yes/auto@:>@],
[build with skyhook support]), ,
enable_skyhook=auto)
if test "x$enable_skyhook" != "xno"; then
PKG_CHECK_MODULES(SKYHOOK, [
libsoup-gnome-2.4
], HAVE_SKYHOOK=yes, HAVE_SKYHOOK=no)
if test "x$HAVE_SKYHOOK" = "xyes"; then
PROVIDER_SUBDIRS="$PROVIDER_SUBDIRS skyhook"
else
NO_BUILD_PROVIDERS="$NO_BUILD_PROVIDERS skyhook"
], have_skyhook=yes, have_skyhook=no)
if test "x$have_skyhook" = "xyes"; then
PROVIDER_SUBDIRS="$PROVIDER_SUBDIRS skyhook"
GPSD_LIBS="-lgps"
else
NO_BUILD_PROVIDERS="$NO_BUILD_PROVIDERS skyhook"
fi
else
have_skyhook=no
fi
if test "x$enable_skyhook" = "xyes" -a "x$have_skyhook" != "xyes"; then
AC_MSG_ERROR([Couldn't find gpsd dependencies.])
fi
AC_SUBST(SKYHOOK_LIBS)
AC_SUBST(SKYHOOK_CFLAGS)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment