diff options
author | Alexandre Pion <pion@afnic.fr> | 2022-09-28 18:07:51 +0200 |
---|---|---|
committer | Alexandre Pion <pion@afnic.fr> | 2022-09-28 18:29:11 +0200 |
commit | 4463084828de6d632e48fd143126901de52d9536 (patch) | |
tree | 46ca187fb08c535d528af5b6519507c5539e3965 | |
parent | 4e2d6da9847e404764d1d9d49406929e1f5dcbd8 (diff) |
Correctly look up for NSID support
* internal LDNS is 1.8.3 so it supports NSID
* external LDNS is unknown, a check is needed
-rw-r--r-- | Makefile.PL | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/Makefile.PL b/Makefile.PL index 90ae5ca..1a066bd 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -213,12 +213,15 @@ else { } -# LDNS +# LDNS and NSID + +my $ldns_has_nsid; if ( $opt_internal_ldns ) { print "Feature internal ldns enabled\n"; cc_libs '-Lldns/lib'; cc_include_paths 'ldns'; + $ldns_has_nsid = 1; } else { print "Feature internal ldns disabled\n"; @@ -241,16 +244,16 @@ else { function => 'if(LDNS_ED25519) return 0; else return 1;' ); } -} -# NSID feature requires LDNS version >= 1.8.2 -my $ldns_has_nsid = check_lib( - debug => $opt_debug, - lib => 'ldns', - header => 'ldns/util.h', - %{ $assert_lib_args{ldns} }, - function => 'if ( LDNS_REVISION >= ((1<<16)|(8<<8)|(2)) ) return 0; else return 1;' -); + # NSID feature requires LDNS version >= 1.8.2 + $ldns_has_nsid = check_lib( + debug => $opt_debug, + lib => 'ldns', + header => 'ldns/util.h', + %{ $assert_lib_args{ldns} }, + function => 'if ( LDNS_REVISION >= ((1<<16)|(8<<8)|(2)) ) return 0; else return 1;' + ); +} if ( $ldns_has_nsid ) { print "Feature NSID enabled\n"; |