Hi Bruno, On 1/13/20 12:01 PM, Bruno Haible wrote: > 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.
Ah, I didn't know that, thanks. Don't that pull in all the unistring modules (and code) ? At least for building the project. In libidn2 we just use a small subset of the vast functionality of gnulib unistring. In order to keep build overhead small, isn't that the way to go ? I only know that building libunistring takes a while... Regards, Tim
Description: OpenPGP digital signature