-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfigure.ac
executable file
·121 lines (100 loc) · 3.09 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
119
120
121
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.5)
AC_INIT(frameInspector, 1.32, Michael_Uman@sdesigns.com)
AM_INIT_AUTOMAKE()
AC_CONFIG_SRCDIR([src/viewApp.cpp])
AM_CONFIG_HEADER([config.h])
# Checks for programs.
AC_PROG_CXX
AC_PROG_CC
PKG_PROG_PKG_CONFIG
AM_OPTIONS_WXCONFIG()
AM_PATH_WXCONFIG(3.0.0, wxWin=1, wxWin=0, std)
if test "$wxWin" != 1; then
AC_MSG_ERROR([
wxWindows version >= 2.7.0 must be installed on the system
but wx-config script could not be found.
])
fi
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([stdlib.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_C_CONST
AC_C_INLINE
AC_TYPE_SIZE_T
AC_CHECK_LIB([gcrypt], [gcry_md_open],
[opt_gcrypt_installed=1],
[opt_gcrypt_installed=0])
if test "$opt_gcrypt_installed" = "0"; then
AC_MSG_ERROR([Please install libgcrypt11-dev])
else
AC_DEFINE([HAVE_LIBGCRYPT], [1], [Define to '1' if libgcrypt is available])
LIBS+=-lgcrypt
fi
# Check for FAM header
#AC_CHECK_HEADER([fam.h], opt_enable_fam=yes, opt_enable_fam=no)
#AC_ARG_ENABLE([fam],
# [AS_HELP_STRING([--enable-fam],[Enable File Alteration monitor])],
# [opt_enable_fam=$enableval],
# [opt_enable_fam=no])
AC_ARG_ENABLE([optimize],
[AS_HELP_STRING([--enable-optimize],[Enable optimizations])],
[opt_optimize=$enableval],
[opt_optimize=no])
AC_ARG_ENABLE([debug],
[AS_HELP_STRING( [--enable-debug],[Enable debug messages])],
[opt_debug_build=$enableval],
[opt_debug_build=no])
AC_ARG_ENABLE([libswscale],
[AS_HELP_STRING( [--enable-libswscale],[Enable ffmpeg libswscale library])],
[opt_libswscale=$enableval],
[opt_libswscale=no])
AC_ARG_ENABLE([libmjpegtools],
[AS_HELP_STRING( [--enable-libmjpegtools], [Enable yuv4mpeg support])],
[opt_libmjpegtools=$enableval],
[opt_libmkpegtools=no])
AS_IF([test "$opt_libswscale" = yes],
[
PKG_CHECK_MODULES([LIBSWSCALE], [libswscale],
[
AC_DEFINE([HAVE_LIBSWSCALE], [1], [Define to '1' if libswscale is available])
AM_CONDITIONAL([INCLUDE_LIBSWSCALE], [true])
])
],[
AM_CONDITIONAL([INCLUDE_LIBSWSCALE], [false])
])
AS_IF([test "$opt_libmjpegtools" = yes],
[
PKG_CHECK_MODULES([LIBMJPEGTOOLS], [mjpegtools],
[
AC_DEFINE([HAVE_LIBMJPEGTOOLS], [1], [Define to '1' if mjpegtools is available])
AM_CONDITIONAL([INCLUDE_LIBMJPEGTOOLS], [true])
])
],[
AM_CONDITIONAL([INCLUDE_LIBMJPEGTOOLS], [false])
])
if test "$opt_debug_build" = yes; then
DEBUGFLAGS="-D_ENABLE_DEBUG -g3 -O0"
AM_CONDITIONAL([DEBUG], [true])
else
DEBUGFLAGS="-DNDEBUG -g -O2"
AM_CONDITIONAL([DEBUG], [false])
fi
# if test "$opt_enable_fam" = yes; then
# AC_DEFINE([HAVE_FAM], [1], [Define to '1' if FAM is available])
# AM_CONDITIONAL(INCLUDE_FAM, true)
# LIBS="-lfam"
#else
# AM_CONDITIONAL(INCLUDE_FAM, false)
#fi
if test "$opt_optimize" = yes; then
OPTIMIZE="-march=pentium4 -msse2 -mfpmath=sse"
fi
CXXFLAGS="$OPTIMIZE $DEBUGFLAGS $WX_CXXFLAGS $LIBSWSCALE_CFLAGS -std=c++11"
LIBS="$WX_LIBS $LIBS $LIBSWSCALE_LIBS -lX11"
AC_CONFIG_FILES([Makefile
src/Makefile])
AC_OUTPUT