+ # Locate the libgnu definition to determine whether or not the user is
+ # using libtool mode in gnulib-tool. Default to program mode if they
+ # are not, which will avoid pulling in the glsym dependencies.
+ #
+ # Convert noinst to EXTRA, that way libgnu will not be built unless
+ # something actually depends on it (which is typically the case).
+ if (/^noinst_LIBRARIES.*libgnu.a/) {
+ s/^noinst/EXTRA/;
+ $for_library //= 0;
+ $use_libtool = 0;
+ }
+ if (/^noinst_LTLIBRARIES.*libgnu.la/) {
+ s/^noinst/EXTRA/;
+ $for_library //= 1;
+ $use_libtool = 1;
+ }
+