-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathconfigure.ac
119 lines (91 loc) · 3.01 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
## Process this file with autoconf to create configure. -*- autoconf -*-
AC_PREREQ([2.71])
AC_INIT([grig],[0.9.1~git],[groundstation-developer@lists.sourceforge.net],[grig],[http://groundstation.sourceforge.net/grig])
AM_INIT_AUTOMAKE([-Wall subdir-objects])
AC_CONFIG_HEADERS(config.h)
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AM_MAINTAINER_MODE
AC_CONFIG_MACRO_DIR([m4])
dnl check for programs
AC_PROG_CC
AC_SEARCH_LIBS([strerror],[cposix])
AC_CHECK_INCLUDES_DEFAULT
AC_PROG_EGREP
LT_INIT
LT_PREREQ([2.2.6b])
LT_INIT([win32-dll])
AC_CHECK_HEADERS([sys/time.h getopt.h])
if test "${ac_cv_c_compiler_gnu}" = "yes"; then
CFLAGS="${CFLAGS} -Wall"
fi
pkg_modules="gtk+-2.0 >= 2.24.0 gthread-2.0 >= 2.14.0"
PKG_CHECK_MODULES(PACKAGE, [$pkg_modules])
AC_SUBST(PACKAGE_CFLAGS)
AC_SUBST(PACKAGE_LIBS)
ALL_LINGUAS=""
dnl The gettext domain of the library
GETTEXT_PACKAGE=${PACKAGE}
AM_GNU_GETTEXT([external])
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[The gettext domain])
AC_SUBST(GETTEXT_PACKAGE)
AM_GNU_GETTEXT_VERSION([0.20])
AM_XGETTEXT_OPTION([--from-code=UTF-8])
# Check intltool
#IT_PROG_INTLTOOL([0.33], [no-xml])
AC_CHECK_LIB([m], [sincos])
dnl Check hamlib
hamlib_modules="hamlib >= 4.2"
PKG_CHECK_MODULES(HAMLIB, [$hamlib_modules], [
CFLAGS="$CFLAGS $HAMLIB_CFLAGS";
LIBS="$LIBS $HAMLIB_LIBS";
dnl AC_DEFINE(WANT_HAMLIB, 1)
], [
AC_MSG_ERROR([Hamradio control libraries 4.2 or later not found...])
])
dnl various developer/developer options
dnl disable HW interaction; useful to access RIG caps without
dnl having rig; default=no
AC_ARG_ENABLE(hardware, [ --disable-hardware disable hardware IO],
[if test "$enableval" = no ; then disable_hadware=yes; else disable_hadware=no; fi],disable_hadware=no)
if test "$disable_hadware" = yes ; then
AC_DEFINE(DISABLE_HW, 1, [Define if hardware is disabled.])
fi
dnl compiler flags to enable generating coverage report
dnl using gcov
AC_ARG_ENABLE(coverage, [ --enable-coverage enable coverage reports],enable_coverage="$enableval",enable_coverage=no)
if test "$enable_coverage" = yes ; then
CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage";
AC_DEFINE(DISABLE_HW, 1, [Define if hardware is disabled.])
fi
dnl store library versions
HAMLIB_V=`pkg-config --modversion hamlib`
GLIB_V=`pkg-config --modversion glib-2.0`
GTHR_V=`pkg-config --modversion gthread-2.0`
GDK_V=`pkg-config --modversion gdk-2.0`
GTK_V=`pkg-config --modversion gtk+-2.0`
AC_DEFINE_UNQUOTED([HAMLIB_VERSION],[`pkg-config --modversion hamlib`],["Hamlib version"])
AC_SUBST(CFLAGS)
AC_SUBST(LDFLAGS)
AC_CONFIG_FILES([
Makefile
doc/Makefile
doc/man/grig.1
doc/man/Makefile
grig.spec
src/Makefile
pixmaps/Makefile
po/Makefile.in
])
AC_OUTPUT
echo
echo SUMMARY:
echo
echo grig version....... : $VERSION
echo Hamlib version..... : $HAMLIB_V
echo Glib version....... : $GLIB_V
echo Gthread version.... : $GTHR_V
echo Gdk version........ : $GDK_V
echo Gtk+ version....... : $GTK_V
echo Disable hardware... : $disable_hadware
echo Enable coverage.... : $enable_coverage
echo