From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS22989 209.51.188.0/24 X-Spam-Status: No, score=-4.0 required=3.0 tests=AWL,BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 41F8D1F4B9 for ; Sat, 25 Jan 2020 09:17:33 +0000 (UTC) Received: from localhost ([::1]:52120 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ivHZL-0004X7-VB for normalperson@yhbt.net; Sat, 25 Jan 2020 04:17:31 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:51681) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ivHZF-0004Wu-Gx for bug-gnulib@gnu.org; Sat, 25 Jan 2020 04:17:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ivHZD-0001dV-M8 for bug-gnulib@gnu.org; Sat, 25 Jan 2020 04:17:25 -0500 Received: from mo6-p00-ob.smtp.rzone.de ([2a01:238:20a:202:5300::8]:24367) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ivHZC-0001aL-An for bug-gnulib@gnu.org; Sat, 25 Jan 2020 04:17:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1579943838; s=strato-dkim-0002; d=clisp.org; h=Message-ID:Date:Subject:To:From:X-RZG-CLASS-ID:X-RZG-AUTH:From: Subject:Sender; bh=/N+vi6JDvKf463u4r+HU6zgwltW3IBFepJcKIfJi6JM=; b=HPBNEwspSLSIGhtNYfGn4nJ3L9Qxoeq7L5MHO0AWftyfe71nwY+lZgLfrRg9yw1UPq kdFJcMemhSDa3vU9TaSru0MK2eUjW9h1dO81EGHHuNU7hPWlrjzJVdKS5hHbX1ToIt+k gIR47e3SrrNQqogSoEEUt190EY0u888UbHZHmz/mN6wCRzMi+9b9IGyHagqFRD0Rzdab Jol+8n3duD9Z1I9CqVT9cK7wolieDc0yVwiO7funaFLWssQJhPAky25+beKDqahKtGo2 I9ZbIsNE7rZm0nq0rcHmVXoUeqsqYBOmSyL3rRyuhDmbv0wlSp4MmCCpw5h2LV4Af9rj KLGw== X-RZG-AUTH: ":Ln4Re0+Ic/6oZXR1YgKryK8brlshOcZlIWs+iCP5vnk6shH+AHjwLuWOH6fzxfs=" X-RZG-CLASS-ID: mo00 Received: from bruno.haible.de by smtp.strato.de (RZmta 46.1.7 DYNA|AUTH) with ESMTPSA id d0b1daw0P9HI97G (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (curve X9_62_prime256v1 with 256 ECDH bits, eq. 3072 bits RSA)) (Client did not present a certificate); Sat, 25 Jan 2020 10:17:18 +0100 (CET) From: Bruno Haible To: bug-gnulib@gnu.org Subject: hard-locale tests: make it easy to reuse the musl test Date: Sat, 25 Jan 2020 10:17:17 +0100 Message-ID: <1856267.qrHUiQWaeK@omega> User-Agent: KMail/5.1.3 (Linux/4.4.0-171-generic; KDE/5.18.0; x86_64; ; ) MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a01:238:20a:202:5300::8 X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: "bug-gnulib" Some other tests may need to conditionalize on musl libc, in the future. 2020-01-25 Bruno Haible hard-locale tests: Make it easy to reuse the musl test. * m4/musl.m4: New file, extracted from modules/hard-locale-tests. * modules/hard-locale-tests (Files): Add it. (configure.ac): Invoke gl_MUSL_LIBC. diff --git a/m4/musl.m4 b/m4/musl.m4 new file mode 100644 index 0000000..252054c --- /dev/null +++ b/m4/musl.m4 @@ -0,0 +1,18 @@ +# musl.m4 serial 1 +dnl Copyright (C) 2019-2020 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +# Test for musl libc, despite the musl libc authors don't like it +# +# . +# From Bruno Haible. + +AC_DEFUN_ONCE([gl_MUSL_LIBC], +[ + AC_REQUIRE([AC_CANONICAL_HOST]) + case "$host_os" in + *-musl*) AC_DEFINE([MUSL_LIBC], [1], [Define to 1 on musl libc.]) ;; + esac +]) diff --git a/modules/hard-locale-tests b/modules/hard-locale-tests index ac7fcb2..7ed8575 100644 --- a/modules/hard-locale-tests +++ b/modules/hard-locale-tests @@ -1,14 +1,12 @@ Files: tests/test-hard-locale.c tests/locale.c +m4/musl.m4 Depends-on: configure.ac: -AC_REQUIRE([AC_CANONICAL_HOST]) -case "$host_os" in - *-musl*) AC_DEFINE([MUSL_LIBC], [1], [Define to 1 on musl libc.]) ;; -esac +gl_MUSL_LIBC dnl Distinguish OpenBSD >= 6.2 from OpenBSD < 6.2. AC_CHECK_FUNCS_ONCE([duplocale])