1 dnl Process this file with autoconf to produce a configure script.
2 dnl Configure input file for elfutils test suite. -*-autoconf-*-
4 dnl Copyright (C) 2005 Red Hat, Inc.
6 dnl This program is free software; you can redistribute it and/or modify
7 dnl it under the terms of the GNU General Public License as published by
8 dnl the Free Software Foundation, version 2.
10 dnl This program is distributed in the hope that it will be useful,
11 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
12 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 dnl GNU General Public License for more details.
15 dnl You should have received a copy of the GNU General Public License
16 dnl along with this program; if not, write to the Free Software Foundation,
17 dnl Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
19 AC_INIT([elfutils tests],[0.117],
20 [http://bugzilla.redhat.com/bugzilla/],
23 AC_COPYRIGHT([Copyright (C) 2005 Red Hat, Inc.])
24 AC_PREREQ(2.59) dnl Minimum Autoconf version required.
26 AM_INIT_AUTOMAKE([foreign 1.7])
28 AC_CONFIG_SRCDIR([allfcts.c])
29 AC_CONFIG_FILES([Makefile])
30 AC_CONFIG_HEADERS([config.h])
34 AC_CACHE_CHECK([for gcc with C99 support], ac_cv_c99, [dnl
36 CFLAGS="$CFLAGS -std=gnu99"
37 AC_COMPILE_IFELSE([dnl
38 int foo (int a) { for (int i = 0; i < a; ++i) if (i % 4) break; int s = a; }],
39 ac_cv_c99=yes, ac_cv_c99=no)
40 CFLAGS="$old_CFLAGS"])
41 AS_IF([test "x$ac_cv_c99" != xyes],
42 AC_MSG_ERROR([gcc with C99 support required]))
44 AC_CHECK_HEADERS([libelf.h elfutils/libdw.h],,
45 [AC_MSG_ERROR([elfutils-devel package not installed])])
47 AC_CHECK_LIB([asm], [asm_begin], [have_libasm=yes], [have_libasm=no])
48 AM_CONDITIONAL(HAVE_LIBASM, [test $have_libasm = yes])
50 AM_CONDITIONAL(STANDALONE, true)
51 AM_CONDITIONAL(BUILD_STATIC, false)
52 AM_CONDITIONAL(TESTS_RPATH, false)
53 AM_CONDITIONAL(GCOV, false)
55 dnl Text of the config.h file.
56 AH_BOTTOM([#define ELFUTILS_HEADER(name) <elfutils/lib##name.h>])