$NetBSD: patch-configure,v 1.18 2023/10/11 07:16:03 adam Exp $ - Builtin krb5-config in platforms such as solaris do not support the gssapi option, and need an explicit -lgss - On Darwin, do not append custom CFLAGS. - Do not strip debug flags. - Support Minix. --- configure.orig 2023-10-09 06:22:20.000000000 +0000 +++ configure @@ -4282,6 +4282,7 @@ printf "%s\n" "$as_me: $xc_bad_var_msg l ;; esac done + xc_bad_var_cflags=no if test $xc_bad_var_cflags = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: using CFLAGS: $CFLAGS" >&5 printf "%s\n" "$as_me: using CFLAGS: $CFLAGS" >&6;} @@ -9167,7 +9168,7 @@ else $as_nop lt_cv_sys_max_cmd_len=8192; ;; - bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*) + bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | minix* | netbsd* | openbsd*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` @@ -9755,12 +9756,8 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu lt_cv_deplibs_check_method=pass_all ;; -netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' - fi +netbsd* | netbsdelf*-gnu | minix*) + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' ;; newos6*) @@ -14010,14 +14007,13 @@ _LT_EOF fi ;; - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - fi + netbsd* | netbsdelf*-gnu | minix*) + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + output_verbose_link_cmd=func_echo_all ;; solaris*) @@ -14708,15 +14704,13 @@ printf "%s\n" "$lt_cv_irix_exported_symb esac ;; - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - hardcode_libdir_flag_spec='-R$libdir' + netbsd* | netbsdelf*-gnu | minix*) + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' hardcode_direct=yes hardcode_shlibpath_var=no + output_verbose_link_cmd=func_echo_all ;; newsos6) @@ -15827,6 +15821,18 @@ fi dynamic_linker='GNU/Linux ld.so' ;; +minix*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Minix ld.elf_so' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + netbsdelf*-gnu) version_type=linux need_lib_prefix=no @@ -18465,7 +18471,7 @@ squeeze() { # - if test "$compiler_id" != "unknown"; then + if false; then # tmp_save_CPPFLAGS="$CPPFLAGS" tmp_save_CFLAGS="$CFLAGS" @@ -18760,13 +18766,6 @@ printf %s "checking if compiler accepts tmp_options="$flags_dbg_yes" fi # - if test "$flags_prefer_cppflags" = "yes"; then - CPPFLAGS="$tmp_CPPFLAGS $tmp_options" - CFLAGS="$tmp_CFLAGS" - else - CPPFLAGS="$tmp_CPPFLAGS" - CFLAGS="$tmp_CFLAGS $tmp_options" - fi squeeze CPPFLAGS squeeze CFLAGS fi @@ -21480,7 +21479,7 @@ printf "%s\n" "no" >&6; } tst_cflags="no" case $host_os in darwin*) - tst_cflags="yes" + tst_cflags="no" ;; esac @@ -25920,7 +25919,7 @@ printf "%s\n" "found" >&6; } LIBS="-lgss $LIBS" ;; *) - LIBS="-lgssapi $LIBS" + LIBS="-lgssapi -lkrb5 $LIBS" ;; esac fi