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