1 dnl Process this file with autoconf to produce a configure script.
3 dnl Copyright (C) 2021-2023 Free Software Foundation, Inc.
5 dnl This file is free software; you can redistribute it and/or modify
6 dnl it under the terms of the GNU General Public License as published by
7 dnl the Free Software Foundation; either version 3 of the License, or
8 dnl (at your option) any later version.
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.
15 dnl You should have received a copy of the GNU General Public License
16 dnl along with this program; see the file COPYING3. If not see
17 dnl <http://www.gnu.org/licenses/>.
19 m4_include([../../bfd/version.m4])
20 AC_INIT([gprofng], BFD_VERSION)
21 AC_CONFIG_MACRO_DIRS([../../config ../..])
22 AC_CONFIG_AUX_DIR(../..)
27 AC_CONFIG_SRCDIR(libcol_util.c)
29 AC_USE_SYSTEM_EXTENSIONS
40 if test "$enable_shared" != "yes"; then
41 AC_MSG_WARN([Cannot set --enable-shared for gprofng/libcollector. Profiling will be unavailable.])
44 GPROFNG_VARIANT=unknown
45 x=`echo | $CC $CFLAGS -dM -E - | grep -w __x86_64`
47 GPROFNG_VARIANT=amd64-Linux
49 x=`echo | $CC $CFLAGS -dM -E - | grep -w __i386__`
51 GPROFNG_VARIANT=intel-Linux
53 x=`echo | $CC $CFLAGS -dM -E - | grep -w __aarch64__`
55 GPROFNG_VARIANT=aarch64-Linux
59 AC_SUBST(GPROFNG_VARIANT)
61 ACX_PROG_CC_WARNING_OPTS([-Wno-nonnull-compare], [GPROFNG_NO_NONNULL_COMPARE_CFLAGS])
62 AC_SUBST(GPROFNG_NO_NONNULL_COMPARE_CFLAGS)
64 AC_CONFIG_FILES([Makefile])
65 AC_CONFIG_HEADERS([lib-config.h:../common/lib-config.h.in])