Version bump for 0.8.1
[aweather] / configure.ac
1 # Init and options
2 AC_INIT([aweather], [0.8.1], [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.8.1)
18
19 # Check for gpsd support
20 AC_ARG_ENABLE([gps],
21         AS_HELP_STRING([--enable-gps], [Build with gpsd support]))
22 AS_IF([test "$enable_gps" = "yes"],
23         [PKG_CHECK_MODULES(GPSD, libgps >= 3.0)])
24 AM_CONDITIONAL([HAVE_GPSD], test "x$enable_gps" = "xyes")
25
26 # Define odd RSL install location
27 AC_CHECK_LIB(rsl, RSL_wsr88d_to_radar, RSL_LIBS="-lrsl")
28 AM_CONDITIONAL(HAVE_RSL, test "$RSL_LIBS" != "")
29 AC_SUBST(RSL_LIBS)
30
31 # Test for windowing system
32 case "${host}" in
33         *mingw32*) SYS="WIN" ;;
34         *cygwin*)  SYS="WIN" ;;
35         *apple*)   SYS="MAC" ;;
36         *)         SYS="X11" ;;
37 esac
38 AM_CONDITIONAL([SYS_WIN], test "$SYS" = "WIN")
39 AM_CONDITIONAL([SYS_MAC], test "$SYS" = "MAC")
40 AM_CONDITIONAL([SYS_X11], test "$SYS" = "X11")
41
42 # Check for Mac OX
43 if test "$SYS" = "MAC"; then
44         PKG_CHECK_MODULES(MAC, gtk-mac-integration)
45 fi
46
47 # Check for relative build
48 AC_ARG_ENABLE(relative, [AS_HELP_STRING([--enable-relative],
49         [enable runtime search paths @<:@default=no@:>@])],
50         [DOTS=".."; ac_default_prefix="/"])
51 AC_SUBST([DOTS])
52
53 # Output
54 AC_CONFIG_FILES([
55         Makefile
56         src/Makefile
57         src/resource.rc
58         src/plugins/Makefile
59         data/Makefile
60         data/main.ui
61         docs/Makefile
62 ])
63 AC_OUTPUT
64
65 # Print status messages
66 if test "$RSL_LIBS" = ""; then
67         echo " ** Warning, RSL not found, radar plugin disabled"
68 fi