Skip to content
  • Michał Kępień's avatar
    Rework libidn2 detection · a0571d38
    Michał Kępień authored
    Clean up the parts of configure.in responsible for handling libidn2
    detection and adjust other pieces of the build system to match these
    cleanups:
    
      - use pkg-config when --with-libidn2 is used without an explicit path,
    
      - look for idn2_to_ascii_lz() rather than idn2_to_ascii_8z() as the
        former is used in BIND while the latter is not,
    
      - do not look for idn2_to_unicode_8zlz() as it is present in all
        libidn2 versions which have idn2_to_ascii_lz(),
    
      - check whether the <idn2.h> header is usable,
    
      - set LDFLAGS in the Makefile for dig so that, if specified, the
        requested libidn2 path is used when linking with libidn2,
    
      - override CPPFLAGS when looking for libidn2 components so that the
        configure script does not produce warnings when libidn2 is not
        installed system-wide,
    
      - merge the AS_CASE() call into the AS_IF() call below it to simplify
        code,
    
      - indicate the default value of --with-libidn2 in "./configure --help"
        output,
    
      - use $with_libidn2 rather than $use_libidn2 to better match the name
        of the configure script argument,
    
      - stop differentiating between IDN "in" and "out" support, i.e. make
        dig either support libidn2 or not; remove WITH_* Autoconf macros and
        use a new one, HAVE_LIBIDN2, to determine whether libidn2 support
        should be enabled.
    a0571d38