forked from alessio/camorama
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
81 lines (64 loc) · 2.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
C_PREREQ(2.53)
AC_INIT(camorama,0.21.2, https://github.com/alessio/camorama)
AC_CONFIG_SRCDIR(src/main.c)
AM_INIT_AUTOMAKE([foreign])
AM_CONFIG_HEADER(config.h)
AC_DEFINE(PACKAGE, AC_PACKAGE_NAME, [package name])
AC_DEFINE(VERSION, AC_PACKAGE_VERSION, [package version])
AM_GNU_GETTEXT([external])
m4_ifdef(AM_GNU_GETTEXT_REQUIRE_VERSION,[AM_GNU_GETTEXT_REQUIRE_VERSION([0.19.8])],[AM_GNU_GETTEXT_VERSION([0.19.8])])
# This is needed for gtk2+ to work with gettext
DATADIRNAME=share
AC_SUBST(DATADIRNAME)
AC_MSG_CHECKING(prefix)
if test "x${prefix}" = "xNONE"; then
PACKAGE_PREFIX="${ac_default_prefix}"
else
PACKAGE_PREFIX="${prefix}"
fi
AC_MSG_RESULT($PACKAGE_PREFIX)
AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${PACKAGE_PREFIX}/${DATADIRNAME}", "the data dir")
AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "${PACKAGE_PREFIX}/${DATADIRNAME}/locale", "the locale dir")
AC_ISC_POSIX
AC_PROG_CC
AM_PROG_CC_STDC
AC_HEADER_STDC
AC_HEADER_MAJOR
AC_CHECK_HEADERS([fcntl.h stdlib.h string.h sys/ioctl.h unistd.h linux/videodev.h png.h glade/glade.h])
# Check for V4L2
AC_CHECK_LIB(v4l2, v4l2_open, LIBV4L="yes",,)
if test "$LIBV4L" != "yes"; then
echo "Oops: libv4l library not found."
exit 1
fi
# Don't assume that gcc warnings are errors
AX_IS_RELEASE(always)
AX_COMPILER_FLAGS([WARN_CFLAGS],[WARN_LDFLAGS])
AC_ARG_ENABLE(gtk4, [AC_HELP_STRING([--enable-gtk4], [Compile against GTK 4.x])], [enable_gtk4=$enableval], [enable_gtk4="no"])
GLIB_GSETTINGS
pkg_modules="gdk-pixbuf-2.0"
if test "x$enable_gtk4" = xyes; then
pkg_modules="$pkg_modules gtk4 >= 4.0"
CAMORAMA_UI="camorama-gtk4.ui"
GTK_VER="4"
else
pkg_modules="$pkg_modules gtk+-3.0 >= 3.22 cairo"
CAMORAMA_UI="camorama-gtk3.ui"
GTK_VER="3"
fi
PKG_CHECK_MODULES(PACKAGE, [$pkg_modules])
AC_SUBST(PACKAGE_CFLAGS)
AC_SUBST(PACKAGE_LIBS)
AC_SUBST(CAMORAMA_UI)
AC_DEFINE(HAVE_GCONF,1,[Build with gconf support])
AC_OUTPUT([
Makefile
src/Makefile
data/Makefile
po/Makefile.in
])
cat <<EOF
compile time options summary
============================
Gtk version to use: $GTK_VER
EOF