Home | History | Annotate | Download | only in tests
      1 dnl Process this file with autoconf to produce a configure script.
      2 dnl Configure input file for elfutils test suite.		-*-autoconf-*-
      3 dnl
      4 dnl Copyright (C) 2005 Red Hat, Inc.
      5 dnl
      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.
      9 dnl
     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.
     14 dnl
     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.
     18 dnl
     19 AC_INIT([elfutils tests],[0.117],
     20 	[http://bugzilla.redhat.com/bugzilla/],
     21 	[elfutils-tests])
     22 
     23 AC_COPYRIGHT([Copyright (C) 2005 Red Hat, Inc.])
     24 AC_PREREQ(2.59)			dnl Minimum Autoconf version required.
     25 
     26 AM_INIT_AUTOMAKE([foreign 1.7])
     27 
     28 AC_CONFIG_SRCDIR([allfcts.c])
     29 AC_CONFIG_FILES([Makefile])
     30 AC_CONFIG_HEADERS([config.h])
     31 
     32 AC_PROG_CC
     33 
     34 AC_CACHE_CHECK([for gcc with C99 support], ac_cv_c99, [dnl
     35 old_CFLAGS="$CFLAGS"
     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]))
     43 
     44 AC_CHECK_HEADERS([libelf.h elfutils/libdw.h],,
     45 [AC_MSG_ERROR([elfutils-devel package not installed])])
     46 
     47 AC_CHECK_LIB([asm], [asm_begin], [have_libasm=yes], [have_libasm=no])
     48 AM_CONDITIONAL(HAVE_LIBASM, [test $have_libasm = yes])
     49 
     50 AM_CONDITIONAL(STANDALONE, true)
     51 AM_CONDITIONAL(BUILD_STATIC, false)
     52 AM_CONDITIONAL(TESTS_RPATH, false)
     53 AM_CONDITIONAL(GCOV, false)
     54 
     55 dnl Text of the config.h file.
     56 AH_BOTTOM([#define ELFUTILS_HEADER(name) <elfutils/lib##name.h>])
     57 
     58 AC_OUTPUT
     59