1## Process this file with autoconf to create configure. -*- autoconf -*-
2# Copyright 2001  Free Software Foundation, Inc.
3#
4# This program is free software; you can redistribute it and/or modify
5# it under the terms of the GNU General Public License as published by
6# the Free Software Foundation; either version 2 of the License, or
7# (at your option) any later version.
8#
9# This program is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY; without even the implied warranty of
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12# GNU General Public License for more details.
13#
14# You should have received a copy of the GNU General Public License
15# along with this program; if not, write to the Free Software
16# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17# 02110-1301  USA
18
19AC_PREREQ(2.59)
20
21
22## ------------------------ ##
23## Autoconf initialisation. ##
24## ------------------------ ##
25AC_INIT([demo],[1.0],[bug-libtool@gnu.org])
26AC_CONFIG_SRCDIR([hello.c])
27
28
29## ------------------------ ##
30## Automake Initialisation. ##
31## ------------------------ ##
32AM_INIT_AUTOMAKE(AC_PACKAGE_TARNAME, AC_PACKAGE_VERSION)
33
34
35## ---------------- ##
36## compiler checks. ##
37## ---------------- ##
38AC_PROG_CC
39AC_C_CONST
40AC_EXEEXT
41
42
43## ----------------------- ##
44## Libtool initialisation. ##
45## ----------------------- ##
46AC_LIBTOOL_DLOPEN
47AC_LIBTOOL_WIN32_DLL
48AM_PROG_LIBTOOL
49AC_SUBST([LIBTOOL_DEPS])
50
51if ./libtool --features | grep '^enable static libraries$' > /dev/null 2>&1; then
52  STATIC=-static
53else
54  STATIC=
55fi
56AC_SUBST([STATIC])
57
58AM_CONDITIONAL([BINARY_HELLDL],
59    [grep '^global_symbol_pipe=..*$' ./libtool >/dev/null])
60
61
62## ---------------------------- ##
63## C headers required by cdemo. ##
64## ---------------------------- ##
65AC_CHECK_HEADERS([string.h math.h])
66
67
68## --------------------------- ##
69## Libraries required by demo. ##
70## --------------------------- ##
71AC_CHECK_LIBM
72AC_SUBST([LIBM])
73
74
75## -------- ##
76## Outputs. ##
77## -------- ##
78AC_CONFIG_FILES([Makefile])
79AC_OUTPUT
80