Version bump for 0.7
[aweather] / configure.ac
1 # Init and options
2 AC_INIT([aweather], [0.7], [andy753421@gmail.com])
3 AM_INIT_AUTOMAKE([-Wall -Werror -Wno-portability foreign])
4 AC_CONFIG_HEADERS([config.h])
5 AC_CONFIG_MACRO_DIR([m4])
6 #AM_SILENT_RULES([yes])
7
8 # Check for required programs
9 AC_PROG_CC
10 LT_PROG_RC
11 AC_PROG_LIBTOOL
12 DOLT
13 PKG_PROG_PKG_CONFIG
14
15 # Check for required packages
16 PKG_CHECK_MODULES(GLIB,  glib-2.0)
17 PKG_CHECK_MODULES(GRITS, grits >= 0.6)
18
19 # Check for gpsd support
20 AC_ARG_ENABLE([gps], AS_HELP_STRING([--enable-gps], [Build with gpsd support]),
21    [PKG_CHECK_MODULES(GPSD, libgps >= 3.0)
22    AC_DEFINE([HAVE_GPSD], [], [Have GPSD support])
23    AC_SUBST(HAVE_GPSD, [TRUE])]
24 )
25 AM_CONDITIONAL([HAVE_GPSD], test "$HAVE_GPSD" = "TRUE")
26
27 # Define odd RSL install location
28 AC_CHECK_LIB(rsl, RSL_wsr88d_to_radar, RSL_LIBS="-lrsl")
29 AM_CONDITIONAL(HAVE_RSL, test "$RSL_LIBS" != "")
30 AC_SUBST(RSL_LIBS)
31
32 # Test for windowing system
33 case "${host}" in
34         *mingw32*) SYS="WIN" ;;
35         *cygwin*)  SYS="WIN" ;;
36         *apple*)   SYS="MAC" ;;
37         *)         SYS="X11" ;;
38 esac
39 AM_CONDITIONAL([SYS_WIN], test "$SYS" = "WIN")
40 AM_CONDITIONAL([SYS_MAC], test "$SYS" = "MAC")
41 AM_CONDITIONAL([SYS_X11], test "$SYS" = "X11")
42
43 # Check for Mac OX
44 if test "$SYS" = "MAC"; then
45         PKG_CHECK_MODULES(MAC, gtk-mac-integration)
46 fi
47
48 # Check for relative build
49 AC_ARG_ENABLE(relative, [AS_HELP_STRING([--enable-relative],
50         [enable runtime search paths @<:@default=no@:>@])],
51         [DOTS=".."; ac_default_prefix="/"])
52 AC_SUBST([DOTS])
53
54 # Output
55 AC_CONFIG_FILES([
56         Makefile
57         src/Makefile
58         src/resource.rc
59         src/plugins/Makefile
60         data/Makefile
61         data/main.ui
62         docs/Makefile
63 ])
64 AC_OUTPUT
65
66 # Print status messages
67 if test "$RSL_LIBS" = ""; then
68         echo " ** Warning, RSL not found, radar plugin disabled"
69 fi