forked from yast/yast-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.in.in
89 lines (76 loc) · 2.39 KB
/
configure.in.in
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
## core configure.in.in
## initialize
@YAST2-INIT-COMMON@
AC_SYS_LARGEFILE
@YAST2-INIT-PROGRAM@
yastdocdir=\${datadir}/doc/yastdoc/html
AC_SUBST(yastdocdir)
## special stuff
# libycp needs flex and bison
AM_PROG_LEX
if test -z "$LEX"; then
AC_MSG_ERROR([Install the package flex.])
fi
AC_CHECK_PROGS(YACC, 'bison -y -d -v' byacc, false)
if test "$YACC" = false; then
AC_MSG_ERROR([bison not installed])
fi
# liby2:Y2SerialComponent needs termios.h in glibc-devel
# (not term.h in ncurses-devel)
Y2UTIL_CFLAGS='-I$(top_srcdir)/liby2util-r/src/include'
Y2UTIL_LIBS='$(top_builddir)/liby2util-r/src/liby2util.la'
AC_SUBST(Y2UTIL_CFLAGS)
AC_SUBST(Y2UTIL_LIBS)
# for historic reasons this value is called SUSEVERSION
SUSEVERSION=`echo $VERSION | cut -d . -f 1,2`
AC_SUBST(SUSEVERSION)
AGENT_INCLUDES='dnl
-I$(top_srcdir)/libycp/src/include dnl
-I$(top_srcdir)/liby2/src/include dnl
-I$(top_srcdir)/libscr/src/include dnl
${Y2UTIL_CFLAGS}'
AC_SUBST(AGENT_INCLUDES)
# override AGENT_LIBADD which is AC_SUBSTed in YAST2-CHECKS-PROGRAM
AGENT_LIBADD='dnl
$(top_builddir)/libscr/src/libscr.la dnl
$(top_builddir)/libycp/src/libycp.la dnl
$(top_builddir)/libycp/src/libycpvalues.la dnl
$(top_builddir)/liby2/src/liby2.la dnl
${Y2UTIL_LIBS}'
## <ext/hash_map> produces ugly warnings in gcc 4.3, but its replacement,
## <unordered_map>, is in C++0x which is not stablilized yet.
## More importantly, this thing is in a public header so we need to propagate
## the findings to yast2-core users
AC_PROG_CXX
AC_MSG_CHECKING([for version of C++ standard])
GCCVER=`$CXX -v 2>&1 | tail -n1`
case "$GCCVER" in
[ gcc\ version\ 4.[3456789]*)]dnl **** quoting
dnl we need a HAVE_* flag for a public header, yuck
dnl AC_DEFINE([HAVE_CXX0X], 1, [Define to 1 if the c++ compiler knows <unordered_map> and the like])
dnl Y2CORE_CFLAGS="-std=c++0x"
# gnu++0x instead of c++0x so that
# we do not lose gnu extensions like typeof
Y2CORE_CFLAGS="-std=gnu++0x -DHAVE_CXX0X"
Y2CORE_CXXFLAGS="-std=gnu++0x -DHAVE_CXX0X"
AC_MSG_RESULT([c++0x])
;;
*)
Y2CORE_CFLAGS=""
Y2CORE_CXXFLAGS=""
AC_MSG_RESULT([older than c++0x])
;;
esac
AC_SUBST(Y2CORE_CFLAGS) dnl included in {C,CXX}FLAGS in YAST2-CHECKS-PROGRAM
AX_CHECK_DOCBOOK
CREATE_PKGCONFIG=true
## some common checks
@YAST2-CHECKS-COMMON@
@YAST2-CHECKS-PROGRAM@
@YAST2-CHECKS-TESTSUITE@
## and generate the output
AC_CONFIG_FILES([
scr/doc/SCR.html
scr/doc/intro_to_scr.html
])
@YAST2-OUTPUT@