-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathconfigure.ac
More file actions
93 lines (68 loc) · 2.28 KB
/
configure.ac
File metadata and controls
93 lines (68 loc) · 2.28 KB
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
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.69])
AC_INIT(ktech, 2.1)
AC_CONFIG_AUX_DIR([build-aux])
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE([no-define foreign subdir-objects])
AC_CONFIG_MACRO_DIRS([m4])
AC_CONFIG_SRCDIR([src/ktech.cpp])
AH_TOP([#ifndef KTECH_CONFIG_H
#define KTECH_CONFIG_H])
AC_CONFIG_HEADERS([config.h])
AH_BOTTOM([#endif])
AC_ARG_ENABLE([cpuextensions],
AS_HELP_STRING([--disable-cpuextensions], [Disables use of CPU extensions.]))
# Checks for packages
PKG_CHECK_MODULES([DEPS], [Magick++])
# Checks for programs.
OLD_CXXFLAGS=$CXXFLAGS
AC_PROG_CXX
CXXFLAGS=$OLD_CXXFLAGS
AC_PROG_RANLIB
AC_PROG_INSTALL
# Checks for libraries.
AC_CHECK_LIB([m], [floor])
# Checks for header files.
AC_LANG_PUSH([C])
AC_CHECK_HEADERS([stdint.h inttypes.h sys/types.h],
[ktech_has_int_header=yes; break;])
AS_IF([test "x$ktech_has_int_header" != "xyes"],
[AC_MSG_ERROR([Unable to find headers defining fixed-length integer types.])])
AC_CHECK_HEADERS([sys/stat.h],
[ktech_has_stat_header=yes; break;])
AS_IF([test "x$ktech_has_stat_header" != "xyes"],
[AC_MSG_ERROR([Unable to find a stat.h header.])])
AC_LANG_POP
# Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_SIZE_T
AC_TYPE_SSIZE_T
AC_TYPE_UINT16_T
AC_TYPE_UINT32_T
AX_CXXFLAGS_WARN_ALL
AX_APPEND_COMPILE_FLAGS([-pedantic -Wshadow -Wextra -Wno-long-long], [CXXFLAGS])
AS_IF([! test "x$enable_cpuextensions" = "xno" && test "x$OLD_CXXFLAGS" = "x"],
[AX_APPEND_COMPILE_FLAGS([-O3], [CXXFLAGS])])
AS_IF([! test "x$enable_cpuextensions" = "xno" && test "x$ac_cv_cxx_compiler_gnu" = "xyes"], [AX_EXT])
AM_CONDITIONAL([HAVE_SSE2_EXTENSION], [test "x$ax_cv_have_sse2_ext" = "xyes"])
AM_CONDITIONAL([HAVE_ALTIVEC_EXTENSION], [test "x$ax_cv_have_altivec_ext" = "xyes"])
case "x$target" in
x*mingw* ) is_mingw_cross_compiling="yes" ;;
* ) ;;
esac
AM_CONDITIONAL([IS_MINGW_CROSS_COMPILING], [test "x$is_mingw_cross_compiling" = "xyes"])
################
# tclap stuff
################
AC_CXX_HAVE_SSTREAM
AC_CXX_HAVE_STRSTREAM
AC_CXX_HAVE_LONG_LONG
AC_CONFIG_FILES([Makefile m4/Makefile src/Makefile \
lib/Makefile \
lib/boost/Makefile \
\
lib/squish/Makefile \
\
lib/tclap/Makefile \
])
AC_OUTPUT