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