| skipped 117 lines |
118 | 118 | | coverage=0 => "Enable Coverage Testing" |
119 | 119 | | testing=0 => "Enable Unit Testing" |
120 | 120 | | fuzzing => "Enable Fuzz Testing" |
121 | | - | # Configure with pkg-config |
122 | | - | pkgconf=0 => "Use pkg-config during configure" |
123 | 121 | | # Enable all options |
124 | 122 | | everything=0 => "Enable all options" |
125 | 123 | | # Debug options |
| skipped 7 lines |
133 | 131 | | debug-queue=0 => "DEBUG: Enable TAILQ debugging" |
134 | 132 | | debug-window=0 => "DEBUG: Enable windows dump" |
135 | 133 | | # Deprecated stuff |
| 134 | + | pkgconf:=deprecated => "Deprecated" |
| 135 | + | with-slang:deprecated => "Deprecated" |
136 | 136 | | with-ui:=deprecated => "Deprecated" |
137 | | - | with-slang:deprecated => "Deprecated" |
138 | 137 | | } |
139 | 138 | | ############################################################################### |
140 | 139 | | |
141 | 140 | | ############################################################################### |
142 | 141 | | # Deprecated config options |
143 | | - | foreach dep {with-ui with-slang} { |
| 142 | + | foreach dep {with-ui with-slang pkgconf} { |
144 | 143 | | if {[opt-bool -nodefault $dep] != -1} { |
145 | 144 | | user-notice "\nThe configure option \"--$dep\" is not used anymore\n" |
146 | 145 | | } |
| skipped 11 lines |
158 | 157 | | debug-graphviz debug-notify debug-parse-test debug-queue debug-window doc |
159 | 158 | | everything fmemopen full-doc fuzzing gdbm gnutls gpgme gsasl gss homespool idn |
160 | 159 | | idn2 include-path-in-cflags inotify kyotocabinet lmdb locales-fix lua lz4 |
161 | | - | mixmaster nls notmuch pcre2 pgp pkgconf qdbm rocksdb sasl smime sqlite ssl |
| 160 | + | mixmaster nls notmuch pcre2 pgp qdbm rocksdb sasl smime sqlite ssl |
162 | 161 | | testing tdb tokyocabinet zlib zstd |
163 | 162 | | } { |
164 | 163 | | define want-$opt [opt-bool $opt] |
| skipped 365 lines |
530 | 529 | | } |
531 | 530 | | define-feature gpgme |
532 | 531 | | |
533 | | - | if {![get-define want-pkgconf] || ![pkgconf false gpg-error]} { |
534 | | - | # Locate gpg-error-config |
535 | | - | msg-checking "Checking for gpg-error..." |
536 | | - | set gpg_error_config_guess [file join $gpgme_prefix bin gpg-error-config] |
537 | | - | if {[file-isexec $gpg_error_config_guess]} { |
538 | | - | define GPG-ERROR-CONFIG $gpg_error_config_guess |
539 | | - | } else { |
540 | | - | if {![cc-check-progs gpg-error-config]} { |
541 | | - | user-error "Unable to find gpg-error-config" |
542 | | - | } |
543 | | - | } |
544 | | - | set gpg_error_config [get-define GPG-ERROR-CONFIG] |
545 | | - | |
546 | | - | # Version |
547 | | - | if {[catch {exec-with-stderr $gpg_error_config --version} gpg_error_version err]} { |
548 | | - | user-error "Could not derive --version from $gpg_error_config" |
549 | | - | } |
550 | | - | |
551 | | - | # CFLAGS |
552 | | - | if {[catch {exec-with-stderr $gpg_error_config --cflags} res err]} { |
553 | | - | user-error "Could not derive --cflags from $gpg_error_config" |
554 | | - | } |
555 | | - | define-append CFLAGS $res |
556 | | - | |
557 | | - | # LIBS |
558 | | - | if {[catch {exec-with-stderr $gpg_error_config --libs} res err]} { |
559 | | - | user-error "Could not derive --libs from $gpg_error_config" |
560 | | - | } |
561 | | - | define-append LIBS $res |
562 | | - | msg-result $gpg_error_version |
563 | | - | } |
564 | | - | |
| 532 | + | pkgconf true gpg-error |
565 | 533 | | define CRYPT_BACKEND_GPGME |
566 | 534 | | } |
567 | 535 | | |
| skipped 27 lines |
595 | 563 | | user-error "Cannot specify both --gsasl and --sasl" |
596 | 564 | | } |
597 | 565 | | if {[get-define want-gsasl]} { |
598 | | - | if {[get-define want-pkgconf]} { |
599 | | - | pkgconf true libgsasl |
600 | | - | define USE_SASL_GNU |
601 | | - | define-feature SASL |
602 | | - | } else { |
603 | | - | if {[check-inc-and-lib gsasl [opt-val with-gsasl $prefix] \ |
604 | | - | gsasl.h gsasl_init gsasl]} { |
605 | | - | define USE_SASL_GNU |
606 | | - | } else { |
607 | | - | user-error "Unable to find GNU SASL" |
608 | | - | } |
609 | | - | } |
| 566 | + | pkgconf true libgsasl |
| 567 | + | define USE_SASL_GNU |
| 568 | + | define-feature SASL |
610 | 569 | | } |
611 | 570 | | |
612 | 571 | | ############################################################################### |
613 | 572 | | # SASL |
614 | 573 | | if {[get-define want-sasl]} { |
615 | | - | if {[get-define want-pkgconf]} { |
616 | | - | pkgconf true libsasl2 |
617 | | - | define USE_SASL_CYRUS |
618 | | - | define-feature SASL |
619 | | - | } else { |
620 | | - | foreach sasl_lib {sasl2 sasl} { |
621 | | - | if {[check-inc-and-lib sasl [opt-val with-sasl $prefix] \ |
622 | | - | sasl/sasl.h sasl_encode64 $sasl_lib]} { |
623 | | - | define USE_SASL_CYRUS |
624 | | - | break |
625 | | - | } |
626 | | - | } |
627 | | - | if {![get-define USE_SASL_CYRUS]} { |
628 | | - | user-error "Unable to find SASL" |
629 | | - | } |
630 | | - | } |
| 574 | + | pkgconf true libsasl2 |
| 575 | + | define USE_SASL_CYRUS |
| 576 | + | define-feature SASL |
631 | 577 | | } |
632 | 578 | | |
633 | 579 | | ############################################################################### |
| skipped 7 lines |
641 | 587 | | # Lua |
642 | 588 | | if {[get-define want-lua]} { |
643 | 589 | | |
644 | | - | if {[get-define want-pkgconf]} { |
645 | | - | if {![pkgconf false lua] && ![pkgconf false lua-5.4] && ![pkgconf false lua-5.3] && ![pkgconf false lua-5.2]} { |
646 | | - | user-error "Unable to find LUA" |
647 | | - | } |
648 | | - | define USE_LUA |
649 | | - | } else { |
650 | | - | set lua_versions { 5.4 5.3 5.2 } ;# Will be checked in order |
651 | | - | |
652 | | - | apply {{lua_prefix lua_versions} { |
653 | | - | foreach ver $lua_versions { |
654 | | - | lassign [split $ver .] maj min |
655 | | - | |
656 | | - | foreach lua_suffix [list /lua${maj}${min} /lua${maj}.${min} /lua-${maj}${min} /lua-${maj}.${min} /lua {}] { |
657 | | - | msg-checking "Checking for include$lua_suffix/lua.h..." |
658 | | - | if {[file exists $lua_prefix/include$lua_suffix/lua.h]} { |
659 | | - | msg-result "yes" |
660 | | - | set libs [list lua-${maj}.${min} lua${maj}.${min} lua] |
661 | | - | cc-with [list -libs "-L$lua_prefix/$::libdir_tail"] { |
662 | | - | if {![cc-check-function-in-lib luaL_openlibs $libs]} { |
663 | | - | continue |
664 | | - | } |
665 | | - | } |
666 | | - | define-append CFLAGS -I$lua_prefix/include$lua_suffix |
667 | | - | define-append LDFLAGS -L$lua_prefix/$::libdir_tail |
668 | | - | define USE_LUA |
669 | | - | return |
670 | | - | } |
671 | | - | msg-result "no" |
672 | | - | } |
673 | | - | } |
674 | | - | user-error "Unable to find Lua" |
675 | | - | }} [opt-val with-lua $prefix] $lua_versions |
| 590 | + | if {![pkgconf false lua] && ![pkgconf false lua-5.4] && ![pkgconf false lua-5.3] && ![pkgconf false lua-5.2]} { |
| 591 | + | user-error "Unable to find LUA" |
676 | 592 | | } |
| 593 | + | define USE_LUA |
677 | 594 | | } |
678 | 595 | | |
679 | 596 | | ############################################################################### |
| skipped 142 lines |
822 | 739 | | # TLS support |
823 | 740 | | if {[get-define want-ssl] && ![get-define want-gnutls]} { |
824 | 741 | | # OpenSSL |
825 | | - | if {[get-define want-pkgconf] && [pkgconf false openssl]} { |
| 742 | + | if {[pkgconf false openssl]} { |
826 | 743 | | # cool - we do not make pkg-config mandatory for OpenSSL because BSDs still |
827 | 744 | | # ship OpenSSL in the base system. Those aren't available through |
828 | 745 | | # pkg-config. |
| skipped 23 lines |
852 | 769 | | } |
853 | 770 | | } elseif {[get-define want-gnutls]} { |
854 | 771 | | # GnuTLS |
855 | | - | if {[get-define want-pkgconf]} { |
856 | | - | pkgconf true gnutls |
857 | | - | } else { |
858 | | - | set gnutls_prefix [opt-val with-gnutls $prefix] |
859 | | - | cc-with [list -cflags -I$gnutls_prefix/include \ |
860 | | - | -libs -L$gnutls_prefix/$::libdir_tail] { |
861 | | - | if {![cc-check-function-in-lib gnutls_check_version gnutls]} { |
862 | | - | user-error "Unable to find GnuTLS" |
863 | | - | } |
864 | | - | define-append CFLAGS -I$gnutls_prefix/include |
865 | | - | define-append LDFLAGS -L$gnutls_prefix/$::libdir_tail |
866 | | - | } |
867 | | - | } |
| 772 | + | pkgconf true gnutls |
868 | 773 | | cc-check-function-in-lib gnutls_priority_set_direct gnutls |
869 | 774 | | cc-with {-includes {gnutls/x509.h gnutls/gnutls.h}} { |
870 | 775 | | cc-check-decls GNUTLS_VERIFY_DISABLE_TIME_CHECKS |
| skipped 22 lines |
893 | 798 | | user-error "Unable to find GNU libidn" |
894 | 799 | | } |
895 | 800 | | } |
896 | | - | if {[get-define want-pkgconf]} { |
897 | | - | pkgconf true libidn |
898 | | - | find-idn1-includes |
899 | | - | } else { |
900 | | - | set idn_prefix [opt-val with-idn $prefix] |
901 | | - | cc-with [list -cflags -I$idn_prefix/include \ |
902 | | - | -libs -L$idn_prefix/$::libdir_tail] { |
903 | | - | find-idn1-includes |
904 | | - | define-append CFLAGS -I$idn_prefix/include |
905 | | - | define-append LDFLAGS -L$idn_prefix/$::libdir_tail |
906 | | - | } |
907 | | - | } |
| 801 | + | pkgconf true libidn |
| 802 | + | find-idn1-includes |
908 | 803 | | if {![cc-check-function-in-lib stringprep_check_version idn]} { |
909 | 804 | | user-error "Unable to find stringprep_check_version in libidn" |
910 | 805 | | } |
| skipped 8 lines |
919 | 814 | | user-error "Unable to find GNU libidn2" |
920 | 815 | | } |
921 | 816 | | } |
922 | | - | if {[get-define want-pkgconf]} { |
923 | | - | pkgconf true libidn2 |
924 | | - | find-idn2-includes |
925 | | - | } else { |
926 | | - | set idn_prefix [opt-val with-idn2 $prefix] |
927 | | - | cc-with [list -cflags -I$idn_prefix/include \ |
928 | | - | -libs -L$idn_prefix/$::libdir_tail] { |
929 | | - | find-idn2-includes |
930 | | - | define-append CFLAGS -I$idn_prefix/include |
931 | | - | define-append LDFLAGS -L$idn_prefix/$::libdir_tail |
932 | | - | } |
933 | | - | } |
| 817 | + | pkgconf true libidn2 |
| 818 | + | find-idn2-includes |
934 | 819 | | if {![cc-check-function-in-lib idn2_to_ascii_8z idn2] || |
935 | 820 | | ![cc-check-function-in-lib idn2_to_unicode_8z8z idn2] || |
936 | 821 | | ![cc-check-function-in-lib idn2_check_version idn2]} { |
| skipped 6 lines |
943 | 828 | | ############################################################################### |
944 | 829 | | # PCRE2 |
945 | 830 | | if {[get-define want-pcre2]} { |
946 | | - | if {[get-define want-pkgconf]} { |
947 | | - | pkgconf true libpcre2-8 |
948 | | - | } else { |
949 | | - | cc-with {-cflags -DPCRE2_CODE_UNIT_WIDTH=8} { |
950 | | - | if {![check-inc-and-lib pcre2 [opt-val with-pcre2 $prefix] \ |
951 | | - | pcre2.h pcre2_compile_8 pcre2-8]} { |
952 | | - | user-error "Unable to find PCRE2" |
953 | | - | } |
954 | | - | } |
955 | | - | } |
| 831 | + | pkgconf true libpcre2-8 |
956 | 832 | | define-feature pcre2 |
957 | 833 | | } elseif {[check-inc-and-lib pcre2_unwarranted {} {} pcre2_regcomp {}]} { |
958 | 834 | | # See https://bugs.exim.org/show_bug.cgi?id=2707 and |
| skipped 68 lines |
1027 | 903 | | # Header cache - QDBM |
1028 | 904 | | # Note: qdbm must come before gdbm because they share library symbols. |
1029 | 905 | | if {[get-define want-qdbm]} { |
1030 | | - | if {[get-define want-pkgconf]} { |
1031 | | - | pkgconf true qdbm |
1032 | | - | define-feature qdbm |
1033 | | - | } else { |
1034 | | - | # On Linux, headers are in a dedicated subdirectory |
1035 | | - | set qdbm_prefix [opt-val with-qdbm $prefix] |
1036 | | - | if {[file isdirectory $qdbm_prefix/include/qdbm]} { |
1037 | | - | set qdbm_inc_subdir qdbm/ |
1038 | | - | } else { |
1039 | | - | set qdbm_inc_subdir "" |
1040 | | - | } |
1041 | | - | if {[check-inc-and-lib qdbm [opt-val with-qdbm $qdbm_prefix] \ |
1042 | | - | ${qdbm_inc_subdir}villa.h vlopen qdbm]} { |
1043 | | - | define-append CFLAGS -I$qdbm_prefix/include/$qdbm_inc_subdir |
1044 | | - | } else { |
1045 | | - | user-error "Unable to find QDBM" |
1046 | | - | } |
1047 | | - | } |
| 906 | + | pkgconf true qdbm |
| 907 | + | define-feature qdbm |
1048 | 908 | | define-append HCACHE_BACKENDS "qdbm" |
1049 | 909 | | define USE_HCACHE |
1050 | 910 | | } |
| skipped 24 lines |
1075 | 935 | | ############################################################################### |
1076 | 936 | | # Header cache - KyotoCabinet |
1077 | 937 | | if {[get-define want-kyotocabinet]} { |
1078 | | - | if {[get-define want-pkgconf]} { |
1079 | | - | pkgconf true kyotocabinet |
1080 | | - | define-feature kc |
1081 | | - | } else { |
1082 | | - | if {![check-inc-and-lib kc [opt-val with-kyotocabinet $prefix] \ |
1083 | | - | kclangc.h kcdbopen kyotocabinet]} { |
1084 | | - | user-error "Unable to find KyotoCabinet" |
1085 | | - | } |
1086 | | - | } |
| 938 | + | pkgconf true kyotocabinet |
| 939 | + | define-feature kc |
1087 | 940 | | define-append HCACHE_BACKENDS "kyotocabinet" |
1088 | 941 | | define USE_HCACHE |
1089 | 942 | | } |
| skipped 12 lines |
1102 | 955 | | ############################################################################### |
1103 | 956 | | # Header Cache - TDB |
1104 | 957 | | if {[get-define want-tdb]} { |
1105 | | - | if {[get-define want-pkgconf]} { |
1106 | | - | pkgconf true tdb |
1107 | | - | define-feature tdb |
1108 | | - | } else { |
1109 | | - | cc-with {-includes {sys/stat.h stddef.h} } { |
1110 | | - | if {![check-inc-and-lib tdb [opt-val with-tdb $prefix] \ |
1111 | | - | tdb.h tdb_close tdb]} { |
1112 | | - | user-error "Unable to find TDB" |
1113 | | - | } |
1114 | | - | } |
1115 | | - | } |
| 958 | + | pkgconf true tdb |
| 959 | + | define-feature tdb |
1116 | 960 | | define-append HCACHE_BACKENDS "tdb" |
1117 | 961 | | define USE_HCACHE |
1118 | 962 | | } |
| skipped 1 lines |
1120 | 964 | | ############################################################################### |
1121 | 965 | | # Header Cache - TokyoCabinet |
1122 | 966 | | if {[get-define want-tokyocabinet]} { |
1123 | | - | if {[get-define want-pkgconf]} { |
1124 | | - | pkgconf true tokyocabinet |
1125 | | - | define-feature tc |
1126 | | - | } else { |
1127 | | - | if {![check-inc-and-lib tc [opt-val with-tokyocabinet $prefix] \ |
1128 | | - | tcbdb.h tcbdbopen tokyocabinet]} { |
1129 | | - | user-error "Unable to find TokyoCabinet" |
1130 | | - | } |
1131 | | - | } |
| 967 | + | pkgconf true tokyocabinet |
| 968 | + | define-feature tc |
1132 | 969 | | define-append HCACHE_BACKENDS "tokyocabinet" |
1133 | 970 | | define USE_HCACHE |
1134 | 971 | | } |
| skipped 286 lines |