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=-3.7 required=3.0 tests=AWL,BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,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 C47411F466 for ; Mon, 13 Jan 2020 11:01:54 +0000 (UTC) Received: from localhost ([::1]:48808 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iqxTl-0002Tm-Kx for normalperson@yhbt.net; Mon, 13 Jan 2020 06:01:53 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35144) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iqxTd-0002TI-EW for bug-gnulib@gnu.org; Mon, 13 Jan 2020 06:01:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iqxTc-0007MO-I3 for bug-gnulib@gnu.org; Mon, 13 Jan 2020 06:01:45 -0500 Received: from mo6-p00-ob.smtp.rzone.de ([2a01:238:20a:202:5300::3]:16085) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iqxTa-0006w2-Ab; Mon, 13 Jan 2020 06:01:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1578913301; s=strato-dkim-0002; d=clisp.org; h=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=fSLcsJaCBS9oxLcIZNDLzWyZ1YHypdW34VbMl/eiPoo=; b=CIn07slWd9LgCvJNOLi3KHaZGZDjBLLemTubKtyPOtUC5SDfxNZ48Cp+fj3GUCwN55 xLFTZSyZrm2CCkSDChcbd796G9TWmy9VyROC29EnExxRgFu6pKLY/EsKMvpfxpM0ZU52 cThFjpO3UVX+cijgAW+m09AFXvilAIZmgm8vKCmdi24d+7ldEExM+7pFkWHJVKewFhVg GkoYF72F7lsw2fYV+F3sXusfM0w6DZ1xfo3iKrDdEbuaYNh+6Df+05Bf67bAn5qgpFso VO6K6QbICM5DUHtSqbxTuozPwQLoZSxiyMDXPofRFPy6CjWyQq5K477S4OJ0uEcEo+b7 YVgg== 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.4 DYNA|AUTH) with ESMTPSA id z0b9d9w0DB1eGj3 (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); Mon, 13 Jan 2020 12:01:40 +0100 (CET) From: Bruno Haible To: Tim =?ISO-8859-1?Q?R=FChsen?= Subject: Re: Unicode support in poke Date: Mon, 13 Jan 2020 12:01:40 +0100 Message-ID: <8824791.IuzVZ8UCoK@omega> User-Agent: KMail/5.1.3 (Linux/4.4.0-171-generic; KDE/5.18.0; x86_64; ; ) In-Reply-To: <3698f27c-ad25-14f7-09b0-1cb5b1a5cad1@gmx.de> References: <75190314.tGigbJWGBi@omega> <3698f27c-ad25-14f7-09b0-1cb5b1a5cad1@gmx.de> 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::3 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: , Cc: bug-gnulib@gnu.org, jemarch@gnu.org Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: "bug-gnulib" Hi Tim, > you could look at libidn2 as an example how to use system libunistring > if there (or if new enough) and fallback to gnulib unistring. > (BTW, libunistring is made of the gnulib unistring modules) > > It creates a separate dir / library for gnulib unistring functions, > *BUT* only uses it when a system libunistring can't be found. > > bootstrap.conf: Call gnulib-tool in bootstrap_post_import_hook() only > for the needed unistring modules. > > configure.ac: Check for system libunistring (set a conditional > HAVE_LIBUNISTRING > > Makefile.am: if !HAVE_LIBUNISTRING -> add unistring/ to SUBDIR > > */Makefile.am: if !HAVE_LIBUNISTRING -> add unistring/ to includes in > AM_CPPFLAGS A simpler way to achieve the same thing is to include the gnulib module 'libunistring-optional'. It will use the system libunistring if it exists and is new enough, and otherwise compile the respective modules from source. Bruno