Skip to content

Commit

Permalink
configure: move picky build detection from doc setup to core setup
Browse files Browse the repository at this point in the history
Make it conditional on standalone mode instead of doc being enabled.

Signed-off-by: Brice Goglin <Brice.Goglin@inria.fr>
  • Loading branch information
bgoglin committed Jan 10, 2020
1 parent fbcf5aa commit 3b1f076
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 37 deletions.
39 changes: 38 additions & 1 deletion config/hwloc.m4
@@ -1,6 +1,6 @@
dnl -*- Autoconf -*-
dnl
dnl Copyright © 2009-2019 Inria. All rights reserved.
dnl Copyright © 2009-2020 Inria. All rights reserved.
dnl Copyright © 2009-2012, 2015-2017, 2020 Université Bordeaux
dnl Copyright © 2004-2005 The Trustees of Indiana University and Indiana
dnl University Research and Technology
Expand Down Expand Up @@ -376,6 +376,43 @@ EOF])
])
])
AS_IF([test "$hwloc_mode" = "standalone"],[
# For the common developer case, if we're in a developer checkout and
# using the GNU compilers, turn on maximum warnings unless
# specifically disabled by the user.
AC_MSG_CHECKING([whether to enable "picky" compiler mode])
hwloc_want_picky=0
AS_IF([test "$hwloc_c_vendor" = "gnu"],
[AS_IF([test -e "$srcdir/.git"],
[hwloc_want_picky=1])])
if test "$enable_picky" = "yes"; then
if test "$GCC" = "yes"; then
AC_MSG_RESULT([yes])
hwloc_want_picky=1
else
AC_MSG_RESULT([no])
AC_MSG_WARN([Warning: --enable-picky used, but is currently only defined for the GCC compiler set -- automatically disabled])
hwloc_want_picky=0
fi
elif test "$enable_picky" = "no"; then
AC_MSG_RESULT([no])
hwloc_want_picky=0
else
if test "$hwloc_want_picky" = 1; then
AC_MSG_RESULT([yes (default)])
else
AC_MSG_RESULT([no (default)])
fi
fi
if test "$hwloc_want_picky" = 1; then
add="-Wall -Wunused-parameter -Wundef -Wno-long-long -Wsign-compare"
add="$add -Wmissing-prototypes -Wstrict-prototypes"
add="$add -Wcomment -pedantic -Wshadow"
HWLOC_CFLAGS="$HWLOC_CFLAGS $add"
fi
])
#
# Now detect support
#
Expand Down
37 changes: 1 addition & 36 deletions config/hwloc_internal.m4
@@ -1,6 +1,6 @@
dnl -*- Autoconf -*-
dnl
dnl Copyright © 2010-2019 Inria. All rights reserved.
dnl Copyright © 2010-2020 Inria. All rights reserved.
dnl Copyright © 2009, 2011 Université Bordeaux
dnl Copyright © 2004-2005 The Trustees of Indiana University and Indiana
dnl University Research and Technology
Expand Down Expand Up @@ -193,41 +193,6 @@ EOF
[hwloc_install_doxs=no])
AC_MSG_RESULT([$hwloc_install_doxs])
# For the common developer case, if we're in a developer checkout and
# using the GNU compilers, turn on maximum warnings unless
# specifically disabled by the user.
AC_MSG_CHECKING([whether to enable "picky" compiler mode])
hwloc_want_picky=0
AS_IF([test "$hwloc_c_vendor" = "gnu"],
[AS_IF([test -e "$srcdir/.git"],
[hwloc_want_picky=1])])
if test "$enable_picky" = "yes"; then
if test "$GCC" = "yes"; then
AC_MSG_RESULT([yes])
hwloc_want_picky=1
else
AC_MSG_RESULT([no])
AC_MSG_WARN([Warning: --enable-picky used, but is currently only defined for the GCC compiler set -- automatically disabled])
hwloc_want_picky=0
fi
elif test "$enable_picky" = "no"; then
AC_MSG_RESULT([no])
hwloc_want_picky=0
else
if test "$hwloc_want_picky" = 1; then
AC_MSG_RESULT([yes (default)])
else
AC_MSG_RESULT([no (default)])
fi
fi
if test "$hwloc_want_picky" = 1; then
add="-Wall -Wunused-parameter -Wundef -Wno-long-long -Wsign-compare"
add="$add -Wmissing-prototypes -Wstrict-prototypes"
add="$add -Wcomment -pedantic -Wshadow"
HWLOC_CFLAGS="$HWLOC_CFLAGS $add"
fi
# Generate some files for the docs
AC_CONFIG_FILES(
hwloc_config_prefix[doc/Makefile]
Expand Down

0 comments on commit 3b1f076

Please sign in to comment.