]> Pileus Git - aweather/blob - configure.ac
OSX port
[aweather] / configure.ac
1 # Init and options
2 AC_INIT([aweather], [0.6.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.6)
18
19 # Define odd RSL install location
20 AC_CHECK_LIB(rsl, RSL_wsr88d_to_radar, RSL_LIBS="-lrsl")
21 AM_CONDITIONAL(HAVE_RSL, test "$RSL_LIBS" != "")
22 AC_SUBST(RSL_LIBS)
23
24 # Test for windowing system
25 case "${host}" in
26         *mingw32*) SYS="WIN" ;;
27         *cygwin*)  SYS="WIN" ;;
28         *apple*)   SYS="MAC" ;;
29         *)         SYS="X11" ;;
30 esac
31 AC_SUBST([SYS])
32 if test "$SYS" = "WIN"; then
33         ac_default_prefix="/"
34 fi
35 AM_CONDITIONAL([SYS_WIN], test "$SYS" = "WIN")
36 AM_CONDITIONAL([SYS_MAC], test "$SYS" = "MAC")
37 AM_CONDITIONAL([SYS_X11], test "$SYS" = "X11")
38
39 # Output 
40 AC_CONFIG_FILES([
41         Makefile
42         src/Makefile
43         src/resource.rc
44         src/plugins/Makefile
45         data/Makefile
46         data/main.ui
47         docs/Makefile
48 ])
49 AC_OUTPUT
50
51 # Print status messages
52 if test "$RSL_LIBS" = ""; then
53         echo " ** Warning, RSL not found, radar plugin disabled"
54 fi