]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - libctf/configure.ac
libctf: build system
[thirdparty/binutils-gdb.git] / libctf / configure.ac
1 dnl -*- Autoconf -*-
2 dnl Process this file with autoconf to produce a configure script.
3 dnl
4 dnl Copyright (C) 2019 Free Software Foundation, Inc.
5 dnl
6 dnl This file 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; either version 2 of the License, or
9 dnl (at your option) any later version.
10 dnl
11 dnl This program is distributed in the hope that it will be useful,
12 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
13 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 dnl GNU General Public License for more details.
15 dnl
16 dnl You should have received a copy of the GNU General Public License
17 dnl along with this program; see the file COPYING. If not see
18 dnl <http://www.gnu.org/licenses/>.
19 dnl
20
21 AC_PREREQ(2.64)
22 AC_INIT([libctf library], 1.2.0-pre)
23 AC_CONFIG_SRCDIR(ctf-impl.h)
24 AC_CONFIG_MACRO_DIR(../config)
25 AC_USE_SYSTEM_EXTENSIONS
26 AM_INIT_AUTOMAKE
27
28 # Checks for programs.
29 AC_PROG_MAKE_SET
30 AC_PROG_CC
31 AC_PROG_RANLIB
32 AM_PROG_AR
33
34 AC_SYS_LARGEFILE
35
36 MISSING=`cd $ac_aux_dir && ${PWDCMD-pwd}`/missing
37 AC_CHECK_PROGS([ACLOCAL], [aclocal], [$MISSING aclocal])
38 AC_CHECK_PROGS([AUTOCONF], [autoconf], [$MISSING autoconf])
39 AC_CHECK_PROGS([AUTOHEADER], [autoheader], [$MISSING autoheader])
40
41 # Figure out what compiler warnings we can enable.
42 # See config/warnings.m4 for details.
43
44 ACX_PROG_CC_WARNING_OPTS([-W -Wall -Wno-narrowing -Wwrite-strings \
45 -Wmissing-format-attribute], [warn])
46 ACX_PROG_CC_WARNING_OPTS([-Wstrict-prototypes -Wmissing-prototypes \
47 -Wold-style-definition], [c_warn])
48 ACX_PROG_CC_WARNING_ALMOST_PEDANTIC([-Wno-long-long])
49
50 # Only enable with --enable-werror-always until existing warnings are
51 # corrected.
52 ACX_PROG_CC_WARNINGS_ARE_ERRORS([manual])
53
54 AM_MAINTAINER_MODE
55 ACX_PROG_CC_WARNING_OPTS([-Wall], [ac_libctf_warn_cflags])
56
57 AC_FUNC_MMAP
58 AC_CHECK_HEADERS(byteswap.h)
59 AC_CHECK_FUNCS(pread)
60
61 AC_CONFIG_FILES(Makefile)
62 AC_CONFIG_HEADERS(config.h)
63 AC_OUTPUT