ali@0
|
1 |
# -*- Autoconf -*-
|
ali@0
|
2 |
# Process this file with autoconf to produce a configure script.
|
ali@0
|
3 |
|
ali@0
|
4 |
AC_INIT([gutcheck],[1.50],[ali@juiblex.co.uk])
|
ali@0
|
5 |
AC_PREREQ(2.59)
|
ali@0
|
6 |
AC_CONFIG_AUX_DIR([config])
|
ali@0
|
7 |
AC_CONFIG_SRCDIR([gutcheck/gutcheck.c])
|
ali@0
|
8 |
AC_CONFIG_FILES([Makefile
|
ali@0
|
9 |
gclib/Makefile
|
ali@0
|
10 |
gutcheck/Makefile
|
ali@0
|
11 |
test/Makefile
|
ali@0
|
12 |
test/harness/Makefile
|
ali@0
|
13 |
test/compatibility/Makefile
|
ali@0
|
14 |
doc/Makefile
|
ali@0
|
15 |
])
|
ali@0
|
16 |
AM_INIT_AUTOMAKE(no-define)
|
ali@0
|
17 |
AC_CANONICAL_HOST
|
ali@0
|
18 |
|
ali@0
|
19 |
##################################################
|
ali@0
|
20 |
# Checks for programs.
|
ali@0
|
21 |
##################################################
|
ali@0
|
22 |
AC_PROG_CC
|
ali@0
|
23 |
LT_INIT
|
ali@0
|
24 |
# Libtool supports a --disable-shared option to tell it to avoid
|
ali@0
|
25 |
# building shared versions of libraries. We don't have any libraries
|
ali@0
|
26 |
# but we do want to support building static versions of our executables.
|
ali@0
|
27 |
# Libtool can do this (under the right circumstances) so we overload
|
ali@0
|
28 |
# this switch for this purpose.
|
ali@0
|
29 |
#
|
ali@0
|
30 |
# The libtool option that we use (-static-libtool-libs) means to use
|
ali@0
|
31 |
# static linking with libraries that supply a .la file and which
|
ali@0
|
32 |
# include a non-empty value for "old_library". If the library doesn't
|
ali@0
|
33 |
# include a .la file (they are deleted by some distributions), then
|
ali@0
|
34 |
# this option will have no effect and likewise if old_library is set
|
ali@0
|
35 |
# to '' (eg., if the library was build with --disable-static) then
|
ali@0
|
36 |
# again -static-libtool-libs will have no effect.
|
ali@0
|
37 |
#
|
ali@0
|
38 |
# If old_library is set to a non-empty value, then specifying
|
ali@0
|
39 |
# -static-libtool-libs will cause the link to fail if the old library
|
ali@0
|
40 |
# cannot be found (libtool will not fallback to a shared library
|
ali@0
|
41 |
# in these circumstances). This can happen with Fedora, for example,
|
ali@0
|
42 |
# if a main mingw32 library package is installed but not the
|
ali@0
|
43 |
# coresponding static sub-package. The solution is to either
|
ali@0
|
44 |
# install the relevant static sub-packages or don't use --disable-shared.
|
ali@0
|
45 |
AS_IF([test "$enable_shared" = no],[
|
ali@0
|
46 |
LDFLAGS="$LDFLAGS -static-libtool-libs"
|
ali@0
|
47 |
])
|
ali@0
|
48 |
PKG_PROG_PKG_CONFIG
|
ali@0
|
49 |
|
ali@0
|
50 |
##################################################
|
ali@0
|
51 |
# Checks for header files.
|
ali@0
|
52 |
##################################################
|
ali@0
|
53 |
|
ali@0
|
54 |
##################################################
|
ali@0
|
55 |
# Checks for typedefs, structures, and compiler characteristics.
|
ali@0
|
56 |
##################################################
|
ali@0
|
57 |
|
ali@0
|
58 |
##################################################
|
ali@0
|
59 |
# Checks for libraries.
|
ali@0
|
60 |
##################################################
|
ali@0
|
61 |
AC_MSG_CHECKING([whether to use glib])
|
ali@0
|
62 |
AC_ARG_WITH([glib],[AS_HELP_STRING([--without-glib],
|
ali@0
|
63 |
[use internal re-invented wheel rather than glib2])])
|
ali@0
|
64 |
AS_IF([test "$with_glib" != no],[
|
ali@0
|
65 |
AC_MSG_RESULT([yes])
|
ali@0
|
66 |
PKG_CHECK_MODULES([GLIB],[glib-2.0])
|
ali@0
|
67 |
AC_DEFINE([HAVE_GLIB],[1],[Define if you have glib version 2.x])
|
ali@0
|
68 |
],[
|
ali@0
|
69 |
AC_MSG_RESULT([no])
|
ali@0
|
70 |
])
|
ali@0
|
71 |
AM_CONDITIONAL([HAVE_GLIB],[test "$with_glib" != no])
|
ali@0
|
72 |
|
ali@0
|
73 |
# NOTE: If we are using a static version of glib then we
|
ali@0
|
74 |
# should define GLIB_STATIC_COMPILATION. This isn't needed
|
ali@0
|
75 |
# when glib is built only for static use (in which case
|
ali@0
|
76 |
# glibconfig.h will already define GLIB_STATIC_COMPILATION).
|
ali@0
|
77 |
# It's not easy to tell if libtool will actually link with
|
ali@0
|
78 |
# a static glib but luckily we don't currently need to;
|
ali@0
|
79 |
# this pre-processor define only affects the behaviour of
|
ali@0
|
80 |
# libraries which use glib and we don't have any.
|
ali@0
|
81 |
|
ali@0
|
82 |
##################################################
|
ali@0
|
83 |
# Checks for library functions.
|
ali@0
|
84 |
##################################################
|
ali@0
|
85 |
AC_CHECK_FUNCS_ONCE([mkstemp])
|
ali@0
|
86 |
|
ali@0
|
87 |
##################################################
|
ali@0
|
88 |
# Checks for processor independent files.
|
ali@0
|
89 |
##################################################
|
ali@0
|
90 |
|
ali@0
|
91 |
##################################################
|
ali@0
|
92 |
# Generate the various configured files
|
ali@0
|
93 |
##################################################
|
ali@0
|
94 |
AC_OUTPUT
|