1dnl -*- Autoconf -*- 2dnl Process this file with autoconf to produce a configure script. 3dnl 4dnl Copyright (C) 2022 Free Software Foundation, Inc. 5dnl 6dnl This file 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; either version 2 of the License, or 9dnl (at your option) any later version. 10dnl 11dnl This program is distributed in the hope that it will be useful, 12dnl but WITHOUT ANY WARRANTY; without even the implied warranty of 13dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14dnl GNU General Public License for more details. 15dnl 16dnl You should have received a copy of the GNU General Public License 17dnl along with this program; see the file COPYING. If not see 18dnl <http://www.gnu.org/licenses/>. 19dnl 20 21AC_INIT([libsframe], BFD_VERSION) 22AC_CONFIG_SRCDIR(sframe.c) 23AC_USE_SYSTEM_EXTENSIONS 24AM_INIT_AUTOMAKE 25 26# Checks for programs. 27AC_PROG_MAKE_SET 28AC_PROG_CC 29AC_PROG_RANLIB 30AM_PROG_AR 31 32dnl Default to a non shared library. This may be overridden by the 33dnl configure option --enable-shared. 34AC_DISABLE_SHARED 35 36LT_INIT 37AC_SYS_LARGEFILE 38 39MISSING=`cd $ac_aux_dir && ${PWDCMD-pwd}`/missing 40AC_CHECK_PROGS([ACLOCAL], [aclocal], [$MISSING aclocal]) 41AC_CHECK_PROGS([AUTOCONF], [autoconf], [$MISSING autoconf]) 42AC_CHECK_PROGS([AUTOHEADER], [autoheader], [$MISSING autoheader]) 43 44dnl Figure out what compiler warnings we can enable. 45dnl See config/warnings.m4 for details. 46 47ACX_PROG_CC_WARNING_OPTS([-Wall -Wextra -Wwrite-strings \ 48 -Wmissing-format-attribute \ 49 -Wstrict-prototypes -Wmissing-prototypes], 50 [ac_libsframe_warn_cflags]) 51 52dnl The libsframe testsuite uses dejagnu.h. 53dnl If the version of dejagnu and gcc are incompatible then the libsframe 54dnl testsuite is not built. 55 56DEJAGNU_CHECK_VERSION 57AM_CONDITIONAL([HAVE_COMPAT_DEJAGNU], [test "x$ac_cv_dejagnu_compat" = "xyes"]) 58 59COMPAT_DEJAGNU=$ac_cv_dejagnu_compat 60AC_SUBST(COMPAT_DEJAGNU) 61 62dnl Check for makeinfo for building documentation 63build_info= 64AC_CHECK_PROGS([MAKEINFO], makeinfo, makeinfo, ) 65if test "x$MAKEINFO" = "x"; then 66 MAKEINFO="@echo makeinfo missing; true" 67 build_info= 68else 69 BUILD_INFO=info 70 case "$MAKEINFO" in 71 */missing\ makeinfo*) 72 build_info= 73 AC_MSG_WARN([ 74*** Makeinfo is missing. Info documentation will not be built.]) 75 ;; 76 *) 77 build_info=yes 78 ;; 79 esac 80fi 81AM_CONDITIONAL(BUILD_INFO, test "${build_info}" = yes) 82 83AM_MAINTAINER_MODE 84AM_INSTALL_LIBBFD 85 86AC_FUNC_MMAP 87AC_CHECK_HEADERS(byteswap.h endian.h) 88 89dnl Check for bswap_{16,32,64} 90AC_CHECK_DECLS([bswap_16, bswap_32, bswap_64], [], [], [[#include <byteswap.h>]]) 91 92AC_CONFIG_FILES(Makefile) 93AC_CONFIG_HEADERS(config.h) 94AC_OUTPUT 95 96GNU_MAKE_JOBSERVER 97