message: Introduce underlining for error message regions.
[pspp] / acinclude.m4
index c1c67119aad1f12f759a0648df7edeaea9960bf3..e7dd390d6917babdf7743cda447829d8af8fa973 100644 (file)
@@ -66,6 +66,30 @@ AC_DEFUN([PSPP_CHECK_CC_OPTION],
   fi
 ])
 
+# PSPP_ENABLE_OPTION comes from Open vSwitch:
+# ----------------------------------------------------------------------
+# Copyright (c) 2007-2017 Nicira, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at:
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+dnl PSPP_ENABLE_OPTION([OPTION])
+dnl Check whether the given C compiler OPTION is accepted.
+dnl If so, add it to WARNING_FLAGS.
+dnl Example: PSPP_ENABLE_OPTION([-Wdeclaration-after-statement])
+AC_DEFUN([PSPP_ENABLE_OPTION],
+  [PSPP_CHECK_CC_OPTION([$1], [WARNING_FLAGS="$WARNING_FLAGS $1"])
+   AC_SUBST([WARNING_FLAGS])])
+# ----------------------------------------------------------------------
+
 dnl Check for readline and history libraries.
 
 dnl Modified for PSPP, based on readline.m4 serial 3 from