-
Notifications
You must be signed in to change notification settings - Fork 4
/
configure.ac
78 lines (58 loc) · 1.64 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
AC_PREREQ([2.68])
AC_INIT(alt, 0.9, [email protected], , http://firejail.wordpress.com)
AC_CONFIG_SRCDIR([src/alt/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"
],
[
QMAKE=`which 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/alt && CXXFLAGS="$CXXFLAGS $HAVE_FATAL_WARNINGS" $QMAKE && cd ../..
cd src/diff && CXXFLAGS="$CXXFLAGS $HAVE_FATAL_WARNINGS" $QMAKE && cd ../..
AC_OUTPUT(Makefile src/spell/Makefile)
cp confdefs.h alt_config.h
echo "#define PREFIX \"$prefix\"" >> alt_config.h
echo
echo "Required run time packages: ctags, make, astyle, hunspell"
echo "Install prefix: $prefix"
echo "CXXFLAGS: $CXXFLAGS $HAVE_FATAL_WARNINGS"