From 1faff39592680be6155acd2833afe1f5e72d087a Mon Sep 17 00:00:00 2001
From: Paolo Giannozzi
Date: Mon, 24 Apr 2023 12:28:51 +0200
Subject: [PATCH] [skip-CI] As suggested, configure option
"--enable-exit-status"
---
install/aclocal.m4 | 4 ++--
install/configure | 23 +++++++++++++++++++++++
install/configure.ac | 3 +++
install/m4/x_ac_qe_signal.m4 | 18 ++++++++++++++++++
4 files changed, 46 insertions(+), 2 deletions(-)
diff --git a/install/aclocal.m4 b/install/aclocal.m4
index ba05af402..fd6169598 100644
--- a/install/aclocal.m4
+++ b/install/aclocal.m4
@@ -1,6 +1,6 @@
-# generated automatically by aclocal 1.16.3 -*- Autoconf -*-
+# generated automatically by aclocal 1.15.1 -*- Autoconf -*-
-# Copyright (C) 1996-2020 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
diff --git a/install/configure b/install/configure
index 66cb43887..4f93c02cb 100755
--- a/install/configure
+++ b/install/configure
@@ -786,6 +786,7 @@ with_hdf5_include
with_environ
enable_legacy_plugins
enable_signals
+enable_exit_status
'
ac_precious_vars='build_alias
host_alias
@@ -1433,6 +1434,7 @@ Optional Features:
--enable-nvtx Enable compilation for NVTX [default=no]
--enable-legacy_plugins Enables use of legacy plugins in PW and CP.
--enable-signals enable signal trapping (default: no)
+ --enable-exit-status enable Unix status on exit (default: no)
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -7332,6 +7334,27 @@ fi
+# Checking STATUS...
+
+
+ # Check whether --enable-exit-status was given.
+if test "${enable_exit_status+set}" = set; then :
+ enableval=$enable_exit_status; if test "$enableval" = "yes" ; then
+ use_status=1
+ else
+ use_status=0
+ fi
+else
+ use_status=0
+fi
+
+
+ # preprocessing flag for returning Unix status on exit (experimental)
+ if test "$use_status" -eq 1 ; then try_dflags="$try_dflags -D__RETURN_EXIT_STATUS" ; fi
+
+
+
+
# Checking for ranlib...
diff --git a/install/configure.ac b/install/configure.ac
index ed4ebe96b..d6ae17d7c 100644
--- a/install/configure.ac
+++ b/install/configure.ac
@@ -101,6 +101,9 @@ X_AC_QE_PLUGINS()
# Checking SIGNAL...
X_AC_QE_SIGNAL()
+# Checking STATUS...
+X_AC_QE_STATUS()
+
# Checking for ranlib...
X_AC_QE_RANLIB()
diff --git a/install/m4/x_ac_qe_signal.m4 b/install/m4/x_ac_qe_signal.m4
index 67a1f2105..1ba3d9003 100644
--- a/install/m4/x_ac_qe_signal.m4
+++ b/install/m4/x_ac_qe_signal.m4
@@ -17,3 +17,21 @@ AC_DEFUN([X_AC_QE_SIGNAL], [
]
)
+
+AC_DEFUN([X_AC_QE_STATUS], [
+
+ AC_ARG_ENABLE(exit-status,
+ [AS_HELP_STRING([--enable-exit-status],
+ [enable Unix status on exit (default: no)])],
+ [if test "$enableval" = "yes" ; then
+ use_status=1
+ else
+ use_status=0
+ fi],
+ [use_status=0])
+
+ # preprocessing flag for returning Unix status on exit (experimental)
+ if test "$use_status" -eq 1 ; then try_dflags="$try_dflags -D__RETURN_EXIT_STATUS" ; fi
+
+ ]
+)