343
by Osmo Antero
Configure.ac was missing? Update it with correct version# 1.4 |
1 |
# ================= initialization =================== #
|
2193
by Osmo Antero
Version 3.3.1. Codevise same as Version 3.3.0. Incl. minor changes on comments/text. |
2 |
AC_INIT([Audio Recorder], [3.3.1], [https://bugs.launchpad.net/~audio-recorder], [audio-recorder]) |
416
by Osmo Antero
Version 1.5 (1.5-3) of Audio-Recorder. Please see the ChangeLog for list of changes. |
3 |
AM_INIT_AUTOMAKE
|
343
by Osmo Antero
Configure.ac was missing? Update it with correct version# 1.4 |
4 |
|
5 |
AC_USE_SYSTEM_EXTENSIONS
|
|
6 |
AC_CONFIG_SRCDIR([src/main.c]) |
|
7 |
#AC_CONFIG_HEADERS([src/config.h])
|
|
8 |
AM_MAINTAINER_MODE
|
|
9 |
||
10 |
# ============== basic compiler settings ============= #
|
|
11 |
AC_PROG_CC
|
|
12 |
AC_HEADER_STDC
|
|
13 |
||
14 |
# *************************
|
|
15 |
# Checks for programs.
|
|
16 |
# *************************
|
|
17 |
AC_PROG_CXX
|
|
18 |
AC_PROG_CC
|
|
19 |
AC_PROG_INSTALL
|
|
20 |
AC_PROG_MAKE_SET
|
|
21 |
||
22 |
# ---- compile with -Wall -----
|
|
442
by Osmo Antero
Automatic installation of missing Gstreamer plugins. |
23 |
# CFLAGS="$CFLAGS -Wall -Wextra"
|
343
by Osmo Antero
Configure.ac was missing? Update it with correct version# 1.4 |
24 |
CFLAGS="$CFLAGS -Wall" |
25 |
||
26 |
# ---- lib math (-lm) -----
|
|
27 |
# LDFLAGS="$LDFLAGS -lm"
|
|
28 |
# Edit: See the MATH_LIB variable below.
|
|
29 |
||
30 |
# ========== export compiler / linker options ======== #
|
|
31 |
AC_SUBST(CFLAGS) |
|
32 |
AC_SUBST(CPPFLAGS) |
|
33 |
AC_SUBST(LDFLAGS) |
|
34 |
AC_SUBST(LIBS) |
|
35 |
||
36 |
# Math library -lm is required by Fedora during linking. Ubuntu can do with or without it.
|
|
37 |
# But Ubuntu fails to link if -lm is in the beginning of linking list, therefore we add -lm at the end.
|
|
38 |
# See src/Makefile.am
|
|
39 |
MATH_LIB=-lm |
|
40 |
AC_SUBST(MATH_LIB) |
|
41 |
||
42 |
# ============== look for dependencies =============== #
|
|
43 |
# check for headers needed for standard interfaces
|
|
44 |
AC_CHECK_HEADERS( |
|
45 |
stdlib.h \ |
|
46 |
string.h \ |
|
47 |
stdio.h \ |
|
48 |
unistd.h |
|
49 |
)
|
|
50 |
||
51 |
GLIB_REQUIRED=2.14.0 |
|
52 |
GTK_REQUIRED=3.0.0 |
|
53 |
GTHREAD_REQUIRED=2.0.0 |
|
440
by Osmo Antero
Pre-version 1.6. Removing deprecated functions so it compiles well on GTK 3.14. |
54 |
# Notice: requires gstreamer 1.4
|
55 |
GSTREAMER_REQUIRED=1.4 |
|
343
by Osmo Antero
Configure.ac was missing? Update it with correct version# 1.4 |
56 |
APPINDICATOR_REQUIRED=0.3 |
57 |
||
58 |
PKG_CHECK_MODULES(GLIB, glib-2.0 >= $GLIB_REQUIRED) |
|
59 |
AC_SUBST(GLIB_CFLAGS) |
|
60 |
AC_SUBST(GLIB_LIBS) |
|
61 |
||
62 |
PKG_CHECK_MODULES(GIO, gio-2.0 >= $GLIB_REQUIRED) |
|
63 |
AC_SUBST(GIO_CFLAGS) |
|
64 |
AC_SUBST(GIO_LIBS) |
|
65 |
||
66 |
PKG_CHECK_MODULES(GTK, gtk+-3.0 >= $GTK_REQUIRED) |
|
67 |
AC_SUBST(GTK_CFLAGS) |
|
68 |
AC_SUBST(GTK_LIBS) |
|
69 |
||
70 |
PKG_CHECK_MODULES(GSTREAMER, gstreamer-1.0 >= $GSTREAMER_REQUIRED) |
|
71 |
AC_SUBST(GSTREAMER_CFLAGS) |
|
72 |
AC_SUBST(GSTREAMER_LIBS) |
|
73 |
||
442
by Osmo Antero
Automatic installation of missing Gstreamer plugins. |
74 |
# Automatic installation of gstreamer plugins
|
75 |
PKG_CHECK_MODULES(GSTREAMER_PBUTILS, gstreamer-pbutils-1.0 >= $GSTREAMER_REQUIRED) |
|
76 |
AC_SUBST(GSTREAMER_PBUTILS_CFLAGS) |
|
77 |
AC_SUBST(GSTREAMER_PBUTILS_LIBS) |
|
412
by Osmo Antero
Code cleanups. |
78 |
|
343
by Osmo Antero
Configure.ac was missing? Update it with correct version# 1.4 |
79 |
PKG_CHECK_MODULES(GTHREAD, gthread-2.0 >= $GTHREAD_REQUIRED) |
80 |
AC_SUBST(GTHREAD_CFLAGS) |
|
81 |
AC_SUBST(GTHREAD_LIBS) |
|
82 |
||
83 |
PKG_CHECK_MODULES(DBUS, dbus-1 >= 0.8) |
|
84 |
AC_SUBST(DBUS_CFLAGS) |
|
85 |
AC_SUBST(DBUS_LIBS) |
|
86 |
||
87 |
# Support AppIndicator?
|
|
88 |
# Ref: https://launchpad.net/indicator-application |
|
89 |
||
440
by Osmo Antero
Pre-version 1.6. Removing deprecated functions so it compiles well on GTK 3.14. |
90 |
PKG_CHECK_MODULES(APP_INDICATOR, appindicator3-0.1 >= $APPINDICATOR_REQUIRED) |
91 |
AC_SUBST(APP_INDICATOR_CFLAGS) |
|
92 |
AC_SUBST(APP_INDICATOR_LIBS) |
|
343
by Osmo Antero
Configure.ac was missing? Update it with correct version# 1.4 |
93 |
|
94 |
# *************************
|
|
95 |
# Checks for library functions.
|
|
96 |
# *************************
|
|
97 |
AC_FUNC_STAT
|
|
98 |
AC_FUNC_VPRINTF
|
|
99 |
AC_CHECK_FUNCS([exp pow]) |
|
100 |
||
101 |
# *************************
|
|
102 |
# Auto-set ALL_LINGUAS variable. See audio-recorder/po/*.po files.
|
|
103 |
# *************************
|
|
104 |
ALL_LINGUAS=`(cd "$srcdir/po" > /dev/null && ls *.po) | cut -d. -f1 | xargs` |
|
105 |
||
106 |
GETTEXT_PACKAGE=audio-recorder |
|
107 |
||
108 |
AC_SUBST(GETTEXT_PACKAGE) |
|
109 |
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package.]) |
|
110 |
||
111 |
# For po/Makefile
|
|
112 |
# Ref: https://bugs.launchpad.net/ubuntu/+source/gettext/+bug/122343 |
|
113 |
top_builddir=`pwd` |
|
114 |
AC_SUBST(top_builddir) |
|
115 |
||
116 |
IT_PROG_INTLTOOL
|
|
117 |
||
118 |
# Support for GSetting schemas
|
|
119 |
GLIB_GSETTINGS
|
|
120 |
||
121 |
# Change default from /usr/local to /usr
|
|
122 |
AC_PREFIX_DEFAULT(/usr) |
|
123 |
||
124 |
AC_CONFIG_FILES([ |
|
125 |
Makefile
|
|
126 |
src/Makefile |
|
127 |
pixmaps/Makefile |
|
128 |
icons/Makefile |
|
129 |
icons/hicolor/Makefile |
|
130 |
icons/hicolor/scalable/Makefile |
|
131 |
icons/hicolor/scalable/apps/Makefile |
|
132 |
icons/hicolor/scalable/status/Makefile |
|
133 |
data/Makefile |
|
134 |
po/Makefile.in |
|
135 |
po/Makefile]) |
|
136 |
||
137 |
AC_OUTPUT
|
|
138 |
||
139 |
||
140 |