1 1.1 christos dnl Process this file with autoconf to produce a configure script. 2 1.1 christos dnl 3 1.1 christos dnl Copyright (C) 2021 Free Software Foundation, Inc. 4 1.1 christos dnl 5 1.1 christos dnl This file is free software; you can redistribute it and/or modify 6 1.1 christos dnl it under the terms of the GNU General Public License as published by 7 1.1 christos dnl the Free Software Foundation; either version 3 of the License, or 8 1.1 christos dnl (at your option) any later version. 9 1.1 christos dnl 10 1.1 christos dnl This program is distributed in the hope that it will be useful, 11 1.1 christos dnl but WITHOUT ANY WARRANTY; without even the implied warranty of 12 1.1 christos dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 1.1 christos dnl GNU General Public License for more details. 14 1.1 christos dnl 15 1.1 christos dnl You should have received a copy of the GNU General Public License 16 1.1 christos dnl along with this program; see the file COPYING3. If not see 17 1.1 christos dnl <http://www.gnu.org/licenses/>. 18 1.1 christos 19 1.1 christos m4_include([../../bfd/version.m4]) 20 1.1 christos AC_INIT([gprofng], BFD_VERSION) 21 1.1 christos AC_CONFIG_MACRO_DIRS([../../config ../..]) 22 1.1 christos AC_CONFIG_AUX_DIR(../..) 23 1.1 christos AC_CANONICAL_TARGET 24 1.1 christos AM_INIT_AUTOMAKE 25 1.1 christos AM_MAINTAINER_MODE 26 1.1 christos 27 1.1 christos AC_CONFIG_SRCDIR(libcol_util.c) 28 1.1 christos 29 1.1 christos AC_USE_SYSTEM_EXTENSIONS 30 1.1 christos AC_PROG_CC 31 1.1 christos AC_PROG_CXX 32 1.1 christos AC_PROG_INSTALL 33 1.1 christos AC_PROG_RANLIB 34 1.1 christos AM_PROG_AR 35 1.1 christos 36 1.1 christos LT_INIT 37 1.1 christos AC_ENABLE_SHARED 38 1.1 christos AC_DISABLE_STATIC 39 1.1 christos 40 1.1 christos if test "$enable_shared" != "yes"; then 41 1.1 christos AC_MSG_WARN([Cannot set --enable-shared for gprofng/libcollector. Profiling will be unavailable.]) 42 1.1 christos fi 43 1.1 christos 44 1.1 christos GPROFNG_VARIANT=unknown 45 1.1 christos x=`echo | $CC $CFLAGS -dM -E - | grep -w __x86_64` 46 1.1 christos if test -n "$x"; then 47 1.1 christos GPROFNG_VARIANT=amd64-Linux 48 1.1 christos else 49 1.1 christos x=`echo | $CC $CFLAGS -dM -E - | grep -w __i386__` 50 1.1 christos if test -n "$x"; then 51 1.1 christos GPROFNG_VARIANT=intel-Linux 52 1.1 christos else 53 1.1 christos x=`echo | $CC $CFLAGS -dM -E - | grep -w __aarch64__` 54 1.1 christos if test -n "$x"; then 55 1.1 christos GPROFNG_VARIANT=aarch64-Linux 56 1.1 christos fi 57 1.1 christos fi 58 1.1 christos fi 59 1.1 christos AC_SUBST(GPROFNG_VARIANT) 60 1.1 christos 61 1.1 christos ACX_PROG_CC_WARNING_OPTS([-Wno-nonnull-compare], [GPROFNG_NO_NONNULL_COMPARE_CFLAGS]) 62 1.1 christos AC_SUBST(GPROFNG_NO_NONNULL_COMPARE_CFLAGS) 63 1.1 christos 64 1.1 christos AC_CONFIG_FILES([Makefile]) 65 1.1 christos AC_CONFIG_HEADERS([lib-config.h:../common/lib-config.h.in]) 66 1.1 christos 67 1.1 christos AC_OUTPUT 68 1.1 christos 69