-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathconfigure.ac
74 lines (60 loc) · 1.77 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
AC_PREREQ([2.68])
AC_INIT(firetools, 0.9.73, netblue30@yahoo.com, , http://firejail.wordpress.com)
AC_CONFIG_SRCDIR([src/firetools/main.cpp])
#AC_CONFIG_HEADERS([config.h])
AC_PROG_CC
AC_PROG_CXX
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_RANLIB
# checking pthread library
AC_CHECK_LIB([pthread], [main], [], AC_MSG_ERROR([*** POSIX thread support not installed - please install first ***]))
AC_CHECK_HEADER(pthread.h,,AC_MSG_ERROR([*** POSIX thread support not installed - please install first ***]))
HAVE_FATAL_WARNINGS=""
AC_ARG_ENABLE([fatal_warnings],
AS_HELP_STRING([--enable-fatal-warnings], [-W -Wall -Werror]))
AS_IF([test "x$enable_fatal_warnings" = "xyes"], [
HAVE_FATAL_WARNINGS="-W -Wall -Werror"
AC_SUBST(HAVE_FATAL_WARNINGS)
])
QMAKE=""
AC_ARG_WITH(
qmake,
AS_HELP_STRING(
[--with-qmake=PATH],
[Path to qmake executable]
),
[
qmake="$withval"
QMAKE="$qmake"
],
[
AC_PATH_TOOL([QMAKE],[qmake])
]
)
echo "trying $QMAKE"
#if test -f /usr/lib64/qt4/bin/qmake; then
# QMAKE=/usr/lib64/qt4/bin/qmake
#fi
if test -z "$QMAKE"
then
AC_MSG_ERROR([qmake and/or Qt are missing, please install them.])
fi
if test -f "$QMAKE"
then
echo "found $QMAKE"
else
AC_MSG_ERROR([qmake and/or Qt are missing, please install them.])
fi
$QMAKE -v
cd src/firetools && CXXFLAGS="$CXXFLAGS $HAVE_FATAL_WARNINGS" $QMAKE && cd ../..
cd src/firejail-ui && CXXFLAGS="$CXXFLAGS $HAVE_FATAL_WARNINGS" $QMAKE && cd ../..
cd src/fstats && CXXFLAGS="$CXXFLAGS $HAVE_FATAL_WARNINGS" $QMAKE && cd ../..
cd src/fmgr && CXXFLAGS="$CXXFLAGS $HAVE_FATAL_WARNINGS" $QMAKE && cd ../..
cp confdefs.h firetools_config.h
AC_OUTPUT(Makefile)
echo
echo "Required run time packages:"
echo " firejail"
echo " libqt5svg5 (Qt5 SVG icon library) if the program was compiled for Qt5."
echo