X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=acinclude.m4;h=e7dd390d6917babdf7743cda447829d8af8fa973;hb=27aa70c92c5b1eb7f09bdac05e887c5e1261109b;hp=c1c67119aad1f12f759a0648df7edeaea9960bf3;hpb=0a18cc59b123294641d8e2bafc3d579be1f59e77;p=pspp diff --git a/acinclude.m4 b/acinclude.m4 index c1c67119aa..e7dd390d69 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -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