forked from brijohn/exword_tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
86 lines (68 loc) · 2.27 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
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.61])
AC_INIT(exword_tools, 1.0, brijohn@gmail.com)
AM_INIT_AUTOMAKE([-Wall -Werror])
AC_CONFIG_SRCDIR([src/common/ExwordDevice.cpp])
AC_CONFIG_HEADERS([config.h])
# Checks for programs.
AC_PROG_CXX
AM_PROG_CC_C_O
AC_PROG_RANLIB
# Checks for header files.
AC_CHECK_HEADERS([stdlib.h string.h])
AC_CHECK_HEADER([zlib.h], [], [AC_MSG_ERROR([zlib header not found])])
# Checks for libraries.
AC_CHECK_LIB(z, inflateEnd, AC_SUBST([ZLIB_LIBS], [-lz]), [AC_MSG_ERROR([zlib support not available])])
AM_OPTIONS_WXCONFIG
reqwx=2.8.11
AM_PATH_WXCONFIG($reqwx, wxWin=1, wxWin=0, [core, xrc, adv])
if test "$wxWin" != 1; then
AC_MSG_ERROR([
wxWidgets must be installed on your system.
Please check that wx-config is in path, the directory
where wxWidgets libraries are installed (returned by
'wx-config --libs' or 'wx-config --static --libs' command)
is in LD_LIBRARY_PATH or equivalent variable and
wxWidgets version is $reqwx or above.
])
fi
AM_PATH_WXRC(wxrc=1)
if test "$wxrc" != 1; then
AC_MSG_ERROR([
The wxrc program was not installed or not found.
Please check the wxWidgets installation.
])
fi
CPPFLAGS="$CPPFLAGS $WX_CPPFLAGS"
CXXFLAGS="$CXXFLAGS $WX_CXXFLAGS_ONLY"
CFLAGS="$CFLAGS $WX_CFLAGS_ONLY"
LIBS="$LIBS $WX_LIBS"
AM_CONDITIONAL(HAVE_WINDRES, which windres > /dev/null)
# Big-endian stuff
AC_SUBST(WORDS_BIGENDIAN)
AC_SUBST(BYTESWAP_HEADER,dummy)
AC_SUBST(HAVE_BYTESWAP_HEADER,0)
AC_C_BIGENDIAN()
if test "$ac_cv_c_bigendian" = yes; then
WORDS_BIGENDIAN=1
AC_CHECK_HEADERS(sys/byteswap.h,[BYTESWAP_HEADER=sys/byteswap.h; HAVE_BYTESWAP_HEADER=1])
AC_CHECK_HEADERS(byteswap.h, [BYTESWAP_HEADER=byteswap.h; HAVE_BYTESWAP_HEADER=1])
else
WORDS_BIGENDIAN=0
fi
# Checks for typedefs, structures, and compiler characteristics.
LIBEXWORD_REQUIRED=2.0
PKG_CHECK_MODULES([EXWORD],[libexword >= $LIBEXWORD_REQUIRED])
AC_SUBST([EXWORD_CFLAGS])
AC_SUBST([EXWORD_LIBS])
AC_SUBST([AM_CPPFLAGS])
AC_SUBST([AM_CFLAGS])
AC_SUBST([AM_LDFLAGS])
AC_CONFIG_FILES([Makefile
src/Makefile
src/textloader/Makefile
src/library/Makefile
src/libraryinstaller/Makefile
src/unshield/Makefile])
AC_OUTPUT