diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000000000000000000000000000000000000..f5f938f0776bb4305ff1bbfb10ca4de4de5f2e01 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +*tar.gz filter=lfs diff=lfs merge=lfs -text diff --git a/3000-add-sw_64-support.patch b/3000-add-sw_64-support.patch deleted file mode 100644 index c3522c7dfbc2a1f6cad6c0d9b7d1c45580af49cc..0000000000000000000000000000000000000000 --- a/3000-add-sw_64-support.patch +++ /dev/null @@ -1,1789 +0,0 @@ -From 1d1ba5da4366f12a8bc020d5d0432030cd890db2 Mon Sep 17 00:00:00 2001 -From: panchenbo -Date: Sun, 25 Jun 2023 14:48:59 +0800 -Subject: [PATCH] add sw_64 support - ---- - .../cmake/src/build_options.cmake | 2 +- - openGauss-server-2.1.0/config/config.guess | 3 + - openGauss-server-2.1.0/config/config.sub | 2 + - openGauss-server-2.1.0/configure | 10 +- - .../contrib/pgcrypto/crypt-blowfish.cpp | 2 +- - openGauss-server-2.1.0/src/Makefile.global.in | 2 +- - .../src/bin/initdb/Makefile | 3 +- - .../src/bin/initdb/initdb.cpp | 31 ++-- - .../src/bin/pg_probackup/atomics.h | 2 + - .../src/bin/pg_probackup/atomics/arch-sw_64.h | 17 +++ - .../src/common/port/Makefile | 10 ++ - .../src/common/port/exec.cpp | 1 - - .../src/common/port/pg_crc32c_choose.cpp | 1 + - .../src/gausskernel/CMakeLists.txt | 4 +- - .../src/gausskernel/bootstrap/bootstrap.cpp | 4 +- - .../src/gausskernel/cbb/bbox/bbox_atomic.h | 4 + - .../gausskernel/cbb/bbox/bbox_atomic_sw_64.h | 124 ++++++++++++++++ - .../gausskernel/cbb/bbox/bbox_elf_dump.cpp | 6 +- - .../src/gausskernel/cbb/bbox/bbox_elf_dump.h | 94 +++++++++++- - .../gausskernel/cbb/bbox/bbox_syscall_SW_64.h | 136 ++++++++++++++++++ - .../cbb/bbox/bbox_syscall_support.cpp | 89 ++++++++++++ - .../cbb/bbox/bbox_syscall_support.h | 38 ++++- - .../src/gausskernel/process/main/main.cpp | 3 +- - .../process/postmaster/postmaster.cpp | 2 +- - .../runtime/executor/instrument.cpp | 6 + - .../vecexecutor/vectorsonic/vsonichash.cpp | 9 +- - .../access/transam/extreme_rto/page_redo.cpp | 10 +- - .../storage/access/transam/xlog.cpp | 45 +++--- - .../storage/mot/core/Makefile.local | 9 +- - .../mot/core/infra/synchronization/cycles.h | 12 ++ - .../infra/synchronization/mot_atomic_ops.h | 2 +- - .../src/include/access/double_write_basic.h | 2 + - .../include/access/extreme_rto/dispatcher.h | 2 +- - .../include/access/extreme_rto/page_redo.h | 2 +- - .../access/parallel_recovery/page_redo.h | 2 +- - .../communication/commproxy_interface.h | 10 ++ - .../src/include/gtm/gtm_atomic.h | 12 ++ - .../src/include/gtm/gtm_slock.h | 39 +++++ - .../src/include/storage/lock/s_lock.h | 41 +++++- - .../src/include/utils/atomic.h | 3 + - .../src/test/regress/pg_regress.cpp | 4 + - protobuf-3.11.3/cmake/CMakeLists.txt | 3 +- - .../kokoro/release/protoc/linux/build.sh | 2 + - .../protoc-artifacts/build-protoc.sh | 6 + - .../google/protobuf/stubs/platform_macros.h | 3 + - zlib-1.2.11/configure | 14 +- - 46 files changed, 744 insertions(+), 84 deletions(-) - create mode 100644 openGauss-server-2.1.0/src/bin/pg_probackup/atomics/arch-sw_64.h - create mode 100644 openGauss-server-2.1.0/src/gausskernel/cbb/bbox/bbox_atomic_sw_64.h - create mode 100644 openGauss-server-2.1.0/src/gausskernel/cbb/bbox/bbox_syscall_SW_64.h - -diff --git a/openGauss-server-2.1.0/cmake/src/build_options.cmake b/openGauss-server-2.1.0/cmake/src/build_options.cmake -index 0ef180f..bb7e974 100755 ---- a/openGauss-server-2.1.0/cmake/src/build_options.cmake -+++ b/openGauss-server-2.1.0/cmake/src/build_options.cmake -@@ -237,7 +237,7 @@ endif() - - - if(${USE_PROTOBUF}) -- set(LIBS "${LIBS} -lprotobuf -lgrpc++ -lgrpc -lgpr") -+ set(LIBS "${LIBS} -lprotobuf -latomic -lgrpc++ -lgrpc -lgpr") - set(GAUSSDB_CONFIGURE "${GAUSSDB_CONFIGURE} -DUSE_PROTOBUF") - endif() - add_definitions(-Wno-builtin-macro-redefined) -diff --git a/openGauss-server-2.1.0/config/config.guess b/openGauss-server-2.1.0/config/config.guess -index d622a44..0ed97fe 100644 ---- a/openGauss-server-2.1.0/config/config.guess -+++ b/openGauss-server-2.1.0/config/config.guess -@@ -868,6 +868,9 @@ EOF - UNAME_MACHINE=aarch64_be - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; -+ sw_64:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; -diff --git a/openGauss-server-2.1.0/config/config.sub b/openGauss-server-2.1.0/config/config.sub -index 02df9f8..4e99ea1 100644 ---- a/openGauss-server-2.1.0/config/config.sub -+++ b/openGauss-server-2.1.0/config/config.sub -@@ -256,6 +256,7 @@ case $basic_machine in - 1750a | 580 \ - | a29k \ - | aarch64 | aarch64_be \ -+ | sw_64 \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | am33_2.0 \ -@@ -368,6 +369,7 @@ case $basic_machine in - 580-* \ - | a29k-* \ - | aarch64-* | aarch64_be-* \ -+ | sw_64-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ -diff --git a/openGauss-server-2.1.0/configure b/openGauss-server-2.1.0/configure -index 8446431..5937920 100755 ---- a/openGauss-server-2.1.0/configure -+++ b/openGauss-server-2.1.0/configure -@@ -4713,7 +4713,7 @@ fi - # but has its own. Also check other compiler-specific flags here. - - if test "$GCC" = yes -a "$ICC" = no; then -- CFLAGS="$CFLAGS -Wall -Wpointer-arith -Wno-write-strings -fnon-call-exceptions -fno-common -freg-struct-return -pipe" -+ CFLAGS="$CFLAGS -Wall -Wpointer-arith -Wno-write-strings -latomic -fnon-call-exceptions -fno-common -freg-struct-return -pipe" - if test "$autodepend" = yes; then - CFLAGS="$CFLAGS -fPIC" - fi -@@ -28510,7 +28510,7 @@ if test x"$USE_SSE42_CRC32C" = x"" && test x"$USE_SSE42_CRC32C_WITH_RUNTIME_CHEC - else - # fall back to slicing-by-8 algorithm which doesn't require any special CPU support. USE_SLICING_BY_8_CRC32C=1 - # but we need runtime check, so need support special CRC instructions for calculating CRC-32C at compile. -- USE_ARM_CRC32C=1 -+ USE_SW_64_CRC32C=1 - fi - fi - fi -@@ -28533,11 +28533,11 @@ $as_echo "#define USE_SSE42_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h - PG_CRC32C_OBJS="pg_crc32c_sse42.o pg_crc32c_sb8.o pg_crc32c_choose.o" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2 with runtime check" >&5 - $as_echo "SSE 4.2 with runtime check" >&6; } -- elif test x"$USE_ARM_CRC32C" = x"1"; then -+ elif test x"$USE_SW_64_CRC32C" = x"1"; then - - PG_CRC32C_OBJS="pg_crc32c_choose.o" -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARM CRC32C" >&5 --$as_echo "ARM CRC32C" >&6; } -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: SW_64 CRC32C" >&5 -+$as_echo "SW_64 CRC32C" >&6; } - else - - $as_echo "#define USE_SLICING_BY_8_CRC32C 1" >>confdefs.h -diff --git a/openGauss-server-2.1.0/contrib/pgcrypto/crypt-blowfish.cpp b/openGauss-server-2.1.0/contrib/pgcrypto/crypt-blowfish.cpp -index b9f7bfe..1c1e1a9 100644 ---- a/openGauss-server-2.1.0/contrib/pgcrypto/crypt-blowfish.cpp -+++ b/openGauss-server-2.1.0/contrib/pgcrypto/crypt-blowfish.cpp -@@ -40,7 +40,7 @@ - #ifdef __i386__ - #define BF_ASM 0 /* 1 */ - #define BF_SCALE 1 --#elif defined(__x86_64__) || defined(__alpha__) || defined(__hppa__) -+#elif defined(__x86_64__) || defined(__alpha__) || defined(__hppa__) || defined(__sw_64__) - #define BF_ASM 0 - #define BF_SCALE 1 - #else -diff --git a/openGauss-server-2.1.0/src/Makefile.global.in b/openGauss-server-2.1.0/src/Makefile.global.in -index ab8bea3..ff6687a 100644 ---- a/openGauss-server-2.1.0/src/Makefile.global.in -+++ b/openGauss-server-2.1.0/src/Makefile.global.in -@@ -546,7 +546,7 @@ CJSON_LIB_PATH = $(CJSON_HOME)/lib - # protobuf component - ############################################################################# - PROTOBUF_INCLUDE_PATH = $(PROTOBUF_HOME)/include --PROTOBUF_LIB_PATH = $(PROTOBUF_HOME)/lib64 -+PROTOBUF_LIB_PATH = $(PROTOBUF_HOME)/lib - - ############################################################################# - # kerberos component -diff --git a/openGauss-server-2.1.0/src/bin/initdb/Makefile b/openGauss-server-2.1.0/src/bin/initdb/Makefile -index 0712306..3c92440 100644 ---- a/openGauss-server-2.1.0/src/bin/initdb/Makefile -+++ b/openGauss-server-2.1.0/src/bin/initdb/Makefile -@@ -30,7 +30,8 @@ ifneq "$(MAKECMDGOALS)" "clean" - endif - endif - endif --OBJS= initdb.o findtimezone.o localtime.o encnames.o pqsignal.o $(WIN32RES) $(top_builddir)/src/lib/elog/elog.a -+#OBJS= initdb.o findtimezone.o localtime.o encnames.o pqsignal.o $(WIN32RES) $(top_builddir)/src/lib/elog/elog.a -+OBJS= initdb.o findtimezone.o localtime.o encnames.o pqsignal.o $(top_builddir)/src/lib/elog/elog.a - all: gs_initdb - - gs_initdb: $(OBJS) | submake-libpgport -diff --git a/openGauss-server-2.1.0/src/bin/initdb/initdb.cpp b/openGauss-server-2.1.0/src/bin/initdb/initdb.cpp -index 05ae64e..0dfbf57 100644 ---- a/openGauss-server-2.1.0/src/bin/initdb/initdb.cpp -+++ b/openGauss-server-2.1.0/src/bin/initdb/initdb.cpp -@@ -344,15 +344,18 @@ static void InitUndoSubsystemMeta(); - exit_nicely(); /* message already printed by popen_check */ \ - } while (0) - --#define PG_CMD_CLOSE \ -+#define PG_CMD_CLOSE \ - do { \ - if (pclose_check(cmdfd)) \ - exit_nicely(); /* message already printed by pclose_check */ \ - } while (0) - --#define PG_CMD_PUTS(line) \ -- do { \ -- if (fputs((line), cmdfd) < 0 || fflush(cmdfd) < 0) \ -+#define PG_CMD_PUTS(line) \ -+ do { \ -+ if (fputs((line), cmdfd) < 0) \ -+ output_failed = true, output_errno = errno; \ -+ } while (0) -+ //if (fputs((line), cmdfd) < 0 || fflush(cmdfd) < 0) \ - output_failed = true, output_errno = errno; \ - } while (0) - -@@ -1060,7 +1063,6 @@ static void test_config_settings(void) - - printf(_("selecting default max_connections ... ")); - (void)fflush(stdout); -- - for (i = 0; i < connslen; i++) { - test_conns = trial_conns[i]; - test_buffs = MIN_BUFS_FOR_CONNS(test_conns); -@@ -1088,11 +1090,10 @@ static void test_config_settings(void) - if (i >= connslen) { - i = connslen - 1; - } -- -+ - n_connections = trial_conns[i]; - - printf("%d\n", n_connections); -- - printf(_("selecting default shared_buffers ... ")); - (void)fflush(stdout); - -@@ -1384,14 +1385,11 @@ static void bootstrap_template1(void) - char* buf_ctype = NULL; - - printf(_("creating template1 database in %s/base/1 ... "), pg_data); -- - (void)fflush(stdout); -- - if (debug) - talkargs = "-d 5"; - - bki_lines = readfile(bki_file); -- - /* Check that bki file appears to be of the right version */ - - nRet = snprintf_s(headerline, sizeof(headerline), sizeof(headerline) - 1, "# PostgreSQL %s\n", PG_MAJORVERSION); -@@ -1406,7 +1404,7 @@ static void bootstrap_template1(void) - PG_VERSION); - exit_nicely(); - } -- -+ - /* Substitute for various symbols used in the BKI file */ - - nRet = sprintf_s(buf, BUF_LENGTH, "%d", NAMEDATALEN); -@@ -1478,18 +1476,17 @@ static void bootstrap_template1(void) - (void)unsetenv("PGCLIENTENCODING"); - - nRet = snprintf_s( -- cmd, sizeof(cmd), sizeof(cmd) - 1, "\"%s\" --boot -x1 %s %s 2>&1", backend_exec, boot_options, talkargs); -+ cmd, sizeof(cmd), sizeof(cmd) - 1, "\"%s\" --boot -x1 %s %s 2>&1", backend_exec, boot_options, talkargs); - securec_check_ss_c(nRet, "\0", "\0"); -- -+ //exit(1);//zmk - PG_CMD_OPEN; -- - for (line = bki_lines; *line != NULL; line++) { -- PG_CMD_PUTS(*line); -+ printf(*line); -+ PG_CMD_PUTS(*line); - FREE_AND_RESET(*line); - } -- - PG_CMD_CLOSE; -- -+ - FREE_AND_RESET(bki_lines); - - check_ok(); -diff --git a/openGauss-server-2.1.0/src/bin/pg_probackup/atomics.h b/openGauss-server-2.1.0/src/bin/pg_probackup/atomics.h -index f28d7d0..89037dd 100644 ---- a/openGauss-server-2.1.0/src/bin/pg_probackup/atomics.h -+++ b/openGauss-server-2.1.0/src/bin/pg_probackup/atomics.h -@@ -67,6 +67,8 @@ - #if defined(__arm__) || defined(__arm) || \ - defined(__aarch64__) || defined(__aarch64) - #include "atomics/arch-arm.h" -+#elif defined(__sw_64__) //modify by yjy -+#include "atomics/arch-sw_64.h" - #elif defined(__i386__) || defined(__i386) || defined(__x86_64__) - #include "atomics/arch-x86.h" - #elif defined(__ia64__) || defined(__ia64) -diff --git a/openGauss-server-2.1.0/src/bin/pg_probackup/atomics/arch-sw_64.h b/openGauss-server-2.1.0/src/bin/pg_probackup/atomics/arch-sw_64.h -new file mode 100644 -index 0000000..060ae4e ---- /dev/null -+++ b/openGauss-server-2.1.0/src/bin/pg_probackup/atomics/arch-sw_64.h -@@ -0,0 +1,17 @@ -+/*------------------------------------------------------------------------- -+ * -+ * arch-sw_64.h -+ * src/include/port/atomics/arch-sw_64.h -+ * -+ *------------------------------------------------------------------------- -+ */ -+ -+#if defined(__GNUC__) -+ -+#define pg_memory_barrier_impl() __asm__ __volatile__ ("memb" : : : "memory") -+#define pg_read_barrier_impl() __asm__ __volatile__ ("memb" : : : "memory") -+#define pg_write_barrier_impl() __asm__ __volatile__ ("memb" : : : "memory") -+#endif -+ -+/* per architecture manual doubleword accesses have single copy atomicity */ -+#define PG_HAVE_8BYTE_SINGLE_COPY_ATOMICITY -diff --git a/openGauss-server-2.1.0/src/common/port/Makefile b/openGauss-server-2.1.0/src/common/port/Makefile -index 51767b7..be606c2 100644 ---- a/openGauss-server-2.1.0/src/common/port/Makefile -+++ b/openGauss-server-2.1.0/src/common/port/Makefile -@@ -60,6 +60,16 @@ OBJS = $(LIBOBJS) pg_crc32c_choose.o chklocale.o dirmod.o erand48.o exec.o fls.o - gs_system.o \ - cipher.o - endif -+#modify bu yjy -+ifeq "${host_cpu}" "sw_64" -+OBJS = $(LIBOBJS) pg_crc32c_sb8.o pg_crc32c_choose.o chklocale.o dirmod.o erand48.o exec.o fls.o inet_net_ntop.o \ -+ noblock.o path.o pgcheckdir.o pgmkdirp.o pgsleep.o \ -+ pgstrcasecmp.o qsort.o qsort_arg.o sprompt.o thread.o flock.o pgstrcasestr.o\ -+ gs_thread.o gs_env_r.o gs_getopt_r.o \ -+ gs_readdir.o gs_strerror.o gs_syscall_lock.o \ -+ gs_system.o \ -+ cipher.o -+endif - # foo_srv.o and foo.o are both built from foo.c, but only foo.o has -DFRONTEND - OBJS_SRV = $(OBJS:%.o=%_srv.o) - -diff --git a/openGauss-server-2.1.0/src/common/port/exec.cpp b/openGauss-server-2.1.0/src/common/port/exec.cpp -index 0ba9bf3..f73a9b4 100644 ---- a/openGauss-server-2.1.0/src/common/port/exec.cpp -+++ b/openGauss-server-2.1.0/src/common/port/exec.cpp -@@ -518,7 +518,6 @@ static char* pipe_read_line(const char* cmd, char* line, int maxsize) - int pclose_check(FILE* stream) - { - int exitstatus = pclose(stream); -- - if (exitstatus == 0) { - return 0; /* all is well */ - } -diff --git a/openGauss-server-2.1.0/src/common/port/pg_crc32c_choose.cpp b/openGauss-server-2.1.0/src/common/port/pg_crc32c_choose.cpp -index 3e62f46..c01d55b 100644 ---- a/openGauss-server-2.1.0/src/common/port/pg_crc32c_choose.cpp -+++ b/openGauss-server-2.1.0/src/common/port/pg_crc32c_choose.cpp -@@ -47,6 +47,7 @@ uint32 pg_crc32c_hardware(uint32 crc, const void* data, Size len) - } - #endif - -+#elif defined(__sw_64__)//modify by yjy - #else - - static bool pg_crc32c_sse42_available(void) -diff --git a/openGauss-server-2.1.0/src/gausskernel/CMakeLists.txt b/openGauss-server-2.1.0/src/gausskernel/CMakeLists.txt -index 16aabb7..bfba84c 100755 ---- a/openGauss-server-2.1.0/src/gausskernel/CMakeLists.txt -+++ b/openGauss-server-2.1.0/src/gausskernel/CMakeLists.txt -@@ -268,9 +268,9 @@ if(${ENABLE_MEMORY_CHECK}) - endif() - - if(NOT "${ENABLE_LITE_MODE}" STREQUAL "ON") -- list(APPEND gaussdb_LINK_LIBS -lz -lminiunz -leSDKOBS -leSDKLogAPI -lpcre -liconv -lnghttp2 -llog4cpp -lcurl -llz4 -lcjson -l${JEMALLOC_LIB_NAME} -lcgroup -lorc -lparquet -larrow -lthrift -lsnappy -lzstd -lprotobuf -lcom_err_gauss -lgssapi_krb5_gauss -lkrb5_gauss -lgssrpc_gauss -lk5crypto_gauss -lkadm5clnt_mit -lkadm5srv_mit -lkdb5 -lkrb5support_gauss -lstdc++ -lboost_thread -lboost_chrono -lboost_system -lboost_atomic -lxml2 -laio -lncurses -ltinfo) -+ list(APPEND gaussdb_LINK_LIBS -lz -lminiunz -leSDKOBS -leSDKLogAPI -lpcre -liconv -lnghttp2 -llog4cpp -lcurl -llz4 -lcjson -l${JEMALLOC_LIB_NAME} -lcgroup -lorc -lparquet -larrow -lthrift -lsnappy -lzstd -lprotobuf -lcom_err_gauss -lgssapi_krb5_gauss -lkrb5_gauss -lgssrpc_gauss -lk5crypto_gauss -lkadm5clnt_mit -lkadm5srv_mit -lkdb5 -lkrb5support_gauss -lstdc++ -lboost_thread -lboost_chrono -lboost_system -lboost_atomic -lxml2 -laio -lncurses -ltinfo -latomic) - else() -- list(APPEND gaussdb_LINK_LIBS -lz -lminiunz -lcurl -llz4 -lcjson -l${JEMALLOC_LIB_NAME} -lcgroup -lzstd -lprotobuf -laio -lncurses -ltinfo) -+ list(APPEND gaussdb_LINK_LIBS -lz -lminiunz -lcurl -llz4 -lcjson -l${JEMALLOC_LIB_NAME} -lcgroup -lzstd -lprotobuf -laio -lncurses -ltinfo -latomic) - endif() - - include_directories( -diff --git a/openGauss-server-2.1.0/src/gausskernel/bootstrap/bootstrap.cpp b/openGauss-server-2.1.0/src/gausskernel/bootstrap/bootstrap.cpp -index 622b6b6..9559872 100755 ---- a/openGauss-server-2.1.0/src/gausskernel/bootstrap/bootstrap.cpp -+++ b/openGauss-server-2.1.0/src/gausskernel/bootstrap/bootstrap.cpp -@@ -341,7 +341,6 @@ void BootStrapProcessMain(int argc, char* argv[]) - * XLOG operations - */ - SetProcessingMode(NormalProcessing); -- - switch (t_thrd.bootstrap_cxt.MyAuxProcType) { - case CheckerProcess: - /* don't set signals, they're useless here */ -@@ -350,7 +349,7 @@ void BootStrapProcessMain(int argc, char* argv[]) - - case BootstrapProcess: - bootstrap_signals(); -- BootStrapXLOG(); -+ //BootStrapXLOG(); - MemoryContextUnSeal(t_thrd.top_mem_cxt); - BootstrapModeMain(); - MemoryContextSeal(t_thrd.top_mem_cxt); -@@ -383,7 +382,6 @@ static void CheckerModeMain(void) - static void BootstrapModeMain(void) - { - int i; -- - Assert(!IsUnderPostmaster); - - SetProcessingMode(BootstrapProcessing); -diff --git a/openGauss-server-2.1.0/src/gausskernel/cbb/bbox/bbox_atomic.h b/openGauss-server-2.1.0/src/gausskernel/cbb/bbox/bbox_atomic.h -index 8a0e5c1..3f376ff 100644 ---- a/openGauss-server-2.1.0/src/gausskernel/cbb/bbox/bbox_atomic.h -+++ b/openGauss-server-2.1.0/src/gausskernel/cbb/bbox/bbox_atomic.h -@@ -38,6 +38,10 @@ - - #elif defined(__aarch64__) - #include "bbox_atomic_arm64.h" -+/* modify by yjy */ -+#elif defined(__sw_64__) -+#include "bbox_atomic_sw_64.h" -+/* end */ - #endif - - #endif -diff --git a/openGauss-server-2.1.0/src/gausskernel/cbb/bbox/bbox_atomic_sw_64.h b/openGauss-server-2.1.0/src/gausskernel/cbb/bbox/bbox_atomic_sw_64.h -new file mode 100644 -index 0000000..0948fcc ---- /dev/null -+++ b/openGauss-server-2.1.0/src/gausskernel/cbb/bbox/bbox_atomic_sw_64.h -@@ -0,0 +1,124 @@ -+/* bbox_atomic_sw_64.h -+ * -+ * IDENTIFICATION -+ * src/gausskernel/cbb/bbox/bbox_atomic_sw_64.h -+ * modify by yjy -+ * ------------------------------------------------------------------------- -+ */ -+ -+#ifndef BBOX_ATOMIC_SW_64_H -+#define BBOX_ATOMIC_SW_64_H -+ -+#ifdef __cplusplus -+extern "C" { -+#endif /* __cplusplus */ -+ -+#define barrier() __asm__ __volatile__("memb" : : : "memory") -+#define smp_mb() barrier() -+ -+typedef struct { -+ volatile int counter; -+} BBOX_ATOMIC_STRU; -+ -+/* -+ init the automic variable. -+ */ -+#define BBOX_ATOMIC_INIT(i) \ -+ { \ -+ (i) \ -+ } -+ -+/* -+ read the atomic variable atomically. -+ */ -+#define BBOX_AtomicRead(v) ((v)->counter) -+ -+/* -+ set the value of atomic variable to i atomically. -+ */ -+#define BBOX_AtomicSet(v, i) (((v)->counter) = (i)) -+ -+/* -+ add i to the atomic variable atomically. -+ */ -+static inline void BBOX_AtomicAdd(int i, BBOX_ATOMIC_STRU* v) -+{ -+ unsigned long tmp; -+ int result,cmp; -+ -+ __asm__ __volatile__( -+ " ldi %1, %4 \n" -+ "1: lldw %0,0(%1)\n" -+ " ldi %2,1 \n" -+ " wr_f %2 \n" -+ " addw %0,%3,%0\n" -+ " lstw %0,0(%1)\n" -+ " rd_f %2 \n" -+ " beq %2, 1b \n" -+ : "=&r"(result), "=&r"(tmp), "=&r"(cmp) -+ : "Ir"(i),"m"(v->counter)); -+} -+ -+/* -+ add i to the atomic variable atomically and return new value. -+ */ -+static inline int BBOX_AtomicAddReturn(int i, BBOX_ATOMIC_STRU* v) -+{ -+ unsigned long tmp; -+ int result,cmp; -+ -+ __asm__ __volatile__( -+ " ldi %1, %4 \n" -+ "1: lldw %0,0(%1)\n" -+ " ldi %2,1 \n" -+ " wr_f %2 \n" -+ " addw %0,%3,%0\n" -+ " lstw %0,0(%1)\n" -+ " rd_f %2 \n" -+ " beq %2, 1b \n" -+ : "=&r"(result), "=&r"(tmp), "=&r"(cmp) -+ : "Ir"(i),"m"(v->counter) -+ : "memory"); -+ -+ smp_mb(); -+ return result; -+} -+ -+#define BBOX_AtomicIncReturn(v) BBOX_AtomicAddReturn(1, (v)) -+ -+/* -+ sub i of the value of atomic variable atomically. -+ */ -+static inline void BBOX_AtomicSub(int i, BBOX_ATOMIC_STRU* v) -+{ -+ unsigned long tmp; -+ int result,cmp; -+ -+ __asm__ __volatile__( -+ " ldi %1, %4 \n" -+ "1: lldw %0,0(%1)\n" -+ " ldi %2,1 \n" -+ " wr_f %2 \n" -+ " subw %0,%3,%0\n" -+ " lstw %0,0(%1)\n" -+ " rd_f %2 \n" -+ " beq %2, 1b \n" -+ : "=&r"(result), "=&r"(tmp), "=&r"(cmp) -+ : "Ir"(i),"m"(v->counter)); -+} -+ -+/* -+ add l to the atomic variable atomically. -+ */ -+#define BBOX_AtomicInc(v) BBOX_AtomicAdd(1, v) -+ -+/* -+ sub l of the value of atomic variable atomically. -+ */ -+#define BBOX_AtomicDec(v) BBOX_AtomicSub(1, v) -+ -+#ifdef __cplusplus -+} -+#endif /* __cplusplus */ -+ -+#endif -diff --git a/openGauss-server-2.1.0/src/gausskernel/cbb/bbox/bbox_elf_dump.cpp b/openGauss-server-2.1.0/src/gausskernel/cbb/bbox/bbox_elf_dump.cpp -index 4a9b209..68c204d 100644 ---- a/openGauss-server-2.1.0/src/gausskernel/cbb/bbox/bbox_elf_dump.cpp -+++ b/openGauss-server-2.1.0/src/gausskernel/cbb/bbox/bbox_elf_dump.cpp -@@ -1177,7 +1177,7 @@ static int BBOX_FillPrPsInfo(struct BBOX_ELF_PRPSINFO* pstPrPsInfo, pid_t tMainP - - pstPrPsInfo->cSname = 'R'; - pstPrPsInfo->cNice = (signed char)sys_getpriority(PRIO_PROCESS, 0); --#if (defined(__x86_64__)) || (defined(__aarch64__)) -+#if (defined(__x86_64__)) || (defined(__aarch64__))|| (defined(__sw_64__)) //add sw_64 modify by yjy - pstPrPsInfo->tUid = (uint32_t)sys_geteuid(); - pstPrPsInfo->tGid = (uint32_t)sys_getegid(); - #elif (defined(__i386__)) || (defined(__ARM_ARCH_5TE__)) || (defined(__ARM_ARCH_7A__)) -@@ -1741,7 +1741,7 @@ static int BBOX_FillEhdr(BBOX_EHDR* pstEhdr, int iPhdrSum) - #if (defined(__i386__)) - pstEhdr->e_phnum = (Elf32_Half)(iPhdrSum + 1); /* Number of memory address space segments plus note segments */ - pstEhdr->e_shnum = (Elf32_Half)(BBOX_SECTION_NUM); --#elif (defined(__x86_64__)) || (defined(__ARM_ARCH_5TE__)) || (defined(__ARM_ARCH_7A__)) || (defined(__aarch64__)) -+#elif (defined(__x86_64__)) || (defined(__ARM_ARCH_5TE__)) || (defined(__ARM_ARCH_7A__)) || (defined(__aarch64__))|| (defined(__sw_64__)) //add sw_64 modify by yjy - pstEhdr->e_phnum = (Elf64_Half)(iPhdrSum + 1); /* Number of memory address space segments plus note segments */ - pstEhdr->e_shnum = (Elf64_Half)(BBOX_SECTION_NUM); - #endif -@@ -2301,7 +2301,7 @@ static int BBOX_WritePrPsStatusToFile(struct BBOX_ELF_PRPSSTATUS* pstPrPsStatusI - static int BBOX_WriteFpRegistersToFile(struct BBOX_FPREGSET* pstFpRegisters, struct BBOX_WRITE_FDS* pstFileFds) - { - /* since ptrace() doesn't support to obtain float registers' context in aarch64, don't dump it out. */ --#if !defined(__aarch64__) -+#if !defined(__aarch64__) || !defined(__sw_64__) //add sw_64 modify by yjy - BBOX_NHDR stElfNhdr; - - if (NULL == pstFpRegisters || NULL == pstFileFds) { -diff --git a/openGauss-server-2.1.0/src/gausskernel/cbb/bbox/bbox_elf_dump.h b/openGauss-server-2.1.0/src/gausskernel/cbb/bbox/bbox_elf_dump.h -index 9b6f751..543a6a6 100644 ---- a/openGauss-server-2.1.0/src/gausskernel/cbb/bbox/bbox_elf_dump.h -+++ b/openGauss-server-2.1.0/src/gausskernel/cbb/bbox/bbox_elf_dump.h -@@ -142,6 +142,10 @@ extern "C" { - #define ELF_ARCH EM_ARM - #elif defined(__aarch64__) - #define ELF_ARCH EM_AARCH64 -+/* modify by yjy */ -+#elif defined(__sw_64__) -+#define ELF_ARCH EM_SW_64 -+/* end */ - #endif - - #ifndef AT_SYSINFO_EHDR -@@ -233,6 +237,83 @@ typedef struct Frame { - (f).uregs.gs_base = (r).gs_base; \ - (r) = (f).uregs; \ - } while (0) -+ -+/* modify by yjy */ -+#elif (defined(__sw_64__)) -+/* member variable are named by register. */ -+struct sw_64_regs { -+ #define BP fp -+ #define SP sp -+ #define IP pc -+ uint64_t r0, r1, r2, r3, r4, r5, r6,r7,r8; //Tmp registers -+ uint64_t r9, r10,r11,r12,r13,r14,r15; //save registers -+ uint64_t r16, r17, r18, r19,r20,r21; //Parm regsiters -+ uint64_t r22,r23,r24,r25; //Tmp registers -+ uint64_t r26; //Returen register -+ uint64_t r27; -+ uint64_t r28; -+}; -+ -+/* 64 CPU */ -+#define CPURegs sw_64_regs -+ -+typedef struct Frame { -+ struct CPURegs uregs; -+ int errno_; -+ pid_t tid; -+} Frame; -+ -+/* save call frame */ -+#define FRAME(fm) \ -+ Frame fm; \ -+ do { \ -+ fm.errno_ = errno; \ -+ fm.tid = sys_gettid(); \ -+ __asm__ volatile("stl $0,0(%0) \n" \ -+ "stl $1,8(%0) \n" \ -+ "stl $2,16(%0) \n" \ -+ "stl $3,24(%0) \n" \ -+ "stl $4,32(%0) \n" \ -+ "stl $5,40(%0) \n" \ -+ "stl $6,48(%0) \n" \ -+ "stl $7,56(%0) \n" \ -+ "stl $8,64(%0) \n" \ -+ "stl $9,72(%0) \n" \ -+ "stl $10,80(%0) \n" \ -+ "stl $11,88(%0) \n" \ -+ "stl $12,96(%0) \n" \ -+ "stl $13,104(%0) \n" \ -+ "stl $14,112(%0) \n" \ -+ "stl $15,120(%0) \n" \ -+ "stl $16,128(%0) \n" \ -+ "stl $17,136(%0) \n" \ -+ "stl $18,144(%0) \n" \ -+ "stl $19,152(%0) \n" \ -+ "stl $20,160(%0) \n" \ -+ "stl $21,168(%0) \n" \ -+ "stl $22,176(%0) \n" \ -+ "stl $23,184(%0) \n" \ -+ "stl $24,192(%0) \n" \ -+ "stl $25,200(%0) \n" \ -+ "stl $26,208(%0) \n" \ -+ "stl $27,216(%0) \n" \ -+ "stl $28,224(%0) \n" \ -+ "stl $29,232(%0) \n" \ -+ "stl $30,240(%0) \n" \ -+ "mov $sp,$10 \n" \ -+ "stl $10,248(%0) \n" \ -+ "1:" \ -+ : \ -+ : "a"(&fm) \ -+ : "memory"); \ -+ } while (0) -+ -+#define SET_FRAME(f, r) \ -+ do { \ -+ errno = (f).errno_; \ -+ (r) = (f).uregs; \ -+ } while (0) -+/* end */ - - #elif (defined(__i386__)) - /* member variable are named by register. */ -@@ -420,7 +501,7 @@ struct BBOX_ELF_PRPSINFO { /* Information about process */ - unsigned char ucZomb; /* Zombie */ - signed char cNice; /* Nice val */ - unsigned long ulLlag; /* Flags */ --#if (defined(__x86_64__)) || (defined(__aarch64__)) -+#if (defined(__x86_64__)) || (defined(__aarch64__)) || (defined(__sw_64)) //add sw_64 modify by yjy - uint32_t tUid; /* User ID */ - uint32_t tGid; /* Group ID */ - #else -@@ -517,6 +598,17 @@ struct BBOX_FPXREGSET { /* x86-64 stores FPU registers in SSE struct */ - struct BBOX_FPREGSET { /* FPU registers */ - /* nothing */ - }; -+* modify by yjy */ -+#elif defined(__sw_64__) -+struct BBOX_FPXREGSET { /* sw-64 stores FPU */ -+ /* nothing */ -+}; -+ -+/* member variable are named by register. */ -+struct BBOX_FPREGSET { /* FPU registers */ -+ /* nothing */ -+}; -+/* end */ - #endif - - struct BBOX_ELF_PRPSSTATUS { /* Information about thread; includes CPU reg */ -diff --git a/openGauss-server-2.1.0/src/gausskernel/cbb/bbox/bbox_syscall_SW_64.h b/openGauss-server-2.1.0/src/gausskernel/cbb/bbox/bbox_syscall_SW_64.h -new file mode 100644 -index 0000000..14438b9 ---- /dev/null -+++ b/openGauss-server-2.1.0/src/gausskernel/cbb/bbox/bbox_syscall_SW_64.h -@@ -0,0 +1,136 @@ -+/* bbox_syscall_SW_64.h -+ * -+ * IDENTIFICATION -+ * src/gausskernel/cbb/bbox/bbox_syscall_SW_64.h -+ * modify by yjy -+ * ------------------------------------------------------------------------- -+ */ -+#ifndef __BBOX_SYSCALL_SW_64_H_ -+#define __BBOX_SYSCALL_SW_64_H_ -+ -+#include -+#include -+#define SYS_NAME(name) sys_##name -+#define SYS_CODE(syscall_code) (__NR_##syscall_code) -+ -+#define ___syscall_return(type, ___res) \ -+ do { \ -+ if ((unsigned long)(___res) >= (unsigned long)(-4095)) { \ -+ errno = -(___res); \ -+ ___res = -1; \ -+ } \ -+ return (type)(___res); \ -+ } while (0) -+ -+#define __syscall0(type, name) \ -+ type SYS_NAME(name)() \ -+ { \ -+ long ___res; \ -+ register long _r0 asm("$0")= SYS_CODE(name); \ -+ asm("sys_call 0x83 \n" \ -+ :"=r"(_r0) \ -+ :"r"(_r0) \ -+ : "memory"); \ -+ ___res=_r0; \ -+ ___syscall_return(type,___res); \ -+ } -+ -+#define __syscall1(type, name, type1, arg1) \ -+ type SYS_NAME(name)(type1 arg1) \ -+ { \ -+ long ___res; \ -+ register long _r0 asm("$0") = SYS_CODE(name);\ -+ register long _r16 asm("$16")= (long)arg1; \ -+ asm("sys_call 0x83 \n" \ -+ :"=r"(_r0) \ -+ :"r"(_r0),"r"(_r16) \ -+ : "memory"); \ -+ ___res=_r0; \ -+ ___syscall_return(type,___res); \ -+ } -+ -+#define __syscall2(type, name, type1, arg1, type2, arg2) \ -+ type SYS_NAME(name)(type1 arg1, type2 arg2) \ -+ { \ -+ long ___res; \ -+ register long _r0 asm("$0") = SYS_CODE(name); \ -+ register long _r16 asm("$16")= (long)arg1; \ -+ register long _r17 asm("$17")= (long)arg2; \ -+ asm("sys_call 0x83 \n" \ -+ :"=r"(_r0) \ -+ :"r"(_r0),"r"(_r16),"r"(_r17) \ -+ : "memory"); \ -+ ___res=_r0; \ -+ ___syscall_return(type,___res); \ -+ } -+ -+#define __syscall3(type, name, type1, arg1, type2, arg2, type3, arg3) \ -+ type SYS_NAME(name)(type1 arg1, type2 arg2, type3 arg3) \ -+ { \ -+ long ___res; \ -+ register long _r0 asm("$0") = SYS_CODE(name); \ -+ register long _r16 asm("$16")= (long)arg1; \ -+ register long _r17 asm("$17")= (long)arg2; \ -+ register long _r18 asm("$18")= (long)arg3; \ -+ asm("sys_call 0x83 \n" \ -+ :"=r"(_r0) \ -+ :"r"(_r0),"r"(_r16),"r"(_r17),"r"(_r18) \ -+ : "memory"); \ -+ ___res=_r0; \ -+ ___syscall_return(type,___res); \ -+ } -+ -+#define __syscall4(type, name, type1, arg1, type2, arg2, type3, arg3, type4, arg4) \ -+ type SYS_NAME(name)(type1 arg1, type2 arg2, type3 arg3, type4 arg4) \ -+ { \ -+ long ___res; \ -+ register long _r0 asm("$0") = SYS_CODE(name); \ -+ register long _r16 asm("$16")= (long)arg1; \ -+ register long _r17 asm("$17")= (long)arg2; \ -+ register long _r18 asm("$18")= (long)arg3; \ -+ register long _r19 asm("$19")= (long)arg4; \ -+ asm("sys_call 0x83 \n" \ -+ :"=r"(_r0) \ -+ :"r"(_r0),"r"(_r16),"r"(_r17),"r"(_r18),"r"(_r19) \ -+ : "memory"); \ -+ ___res=_r0; \ -+ ___syscall_return(type,___res); \ -+ } -+ -+#define __syscall5(type, name, type1, arg1, type2, arg2, type3, arg3, type4, arg4, type5, arg5) \ -+ type SYS_NAME(name)(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) \ -+ { \ -+ long ___res; \ -+ register long _r0 asm("$0") = SYS_CODE(name); \ -+ register long _r16 asm("$16")= (long)arg1; \ -+ register long _r17 asm("$17")= (long)arg2; \ -+ register long _r18 asm("$18")= (long)arg3; \ -+ register long _r19 asm("$19")= (long)arg4; \ -+ register long _r20 asm("$20")= (long)arg5; \ -+ asm("sys_call 0x83 \n" \ -+ :"=r"(_r0) \ -+ :"r"(_r0),"r"(_r16),"r"(_r17),"r"(_r18),"r"(_r19),"r"(_r20) \ -+ : "memory"); \ -+ ___res=_r0; \ -+ ___syscall_return(type,___res); \ -+ } -+ -+#define __syscall6(type, name, type1, arg1, type2, arg2, type3, arg3, type4, arg4, type5, arg5, type6, arg6) \ -+ type SYS_NAME(name)(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5, type6 arg6) \ -+ { \ -+ long ___res; \ -+ register long _r0 asm("$0") = SYS_CODE(name); \ -+ register long _r16 asm("$16")= (long)arg1; \ -+ register long _r17 asm("$17")= (long)arg2; \ -+ register long _r18 asm("$18")= (long)arg3; \ -+ register long _r19 asm("$19")= (long)arg4; \ -+ register long _r20 asm("$20")= (long)arg5; \ -+ register long _r21 asm("$21")= (long)arg6; \ -+ asm("sys_call 0x83 \n" \ -+ :"=r"(_r0) \ -+ :"r"(_r0),"r"(_r16),"r"(_r17),"r"(_r18),"r"(_r19),"r"(_r20),"r"(_r21) \ -+ : "memory"); \ -+ ___res=_r0; \ -+ ___syscall_return(type,___res); \ -+ } -+#endif -diff --git a/openGauss-server-2.1.0/src/gausskernel/cbb/bbox/bbox_syscall_support.cpp b/openGauss-server-2.1.0/src/gausskernel/cbb/bbox/bbox_syscall_support.cpp -index 86398ec..462a029 100644 ---- a/openGauss-server-2.1.0/src/gausskernel/cbb/bbox/bbox_syscall_support.cpp -+++ b/openGauss-server-2.1.0/src/gausskernel/cbb/bbox/bbox_syscall_support.cpp -@@ -595,5 +595,94 @@ long SYS_NAME(_clone)( - ___res = __res_x0; - ___syscall_return(int, ___res); - } -+/* modify by yjy */ -+#elif (defined(__sw_64__)) -+__syscall3(long, socket, int, family, int, type, int, protocol); -+ -+long SYS_NAME(waitpid)(pid_t pid, int* status, int options) -+{ -+ return SYS_NAME(wait4)(pid, status, options, 0); -+} -+ -+long SYS_NAME(signal)(int __signum, void (*handler)(int)) -+{ -+ struct kernel_sigaction _sa; -+ struct kernel_sigaction old; - -+ errno_t rc = memset_s(&_sa, sizeof(_sa), 0, sizeof(_sa)); -+ securec_check_c(rc, "\0", "\0"); -+ sys_sigfillset(&_sa.sa_mask); -+ _sa.sa_flags |= SA_RESTORER | SA_RESTART; -+ _sa.handle.sa_handler_ = handler; -+ -+ return SYS_NAME(rt_sigaction)(__signum, &_sa, &old, (KERNEL_NSIG + 7) / 8); -+} -+ -+long SYS_NAME(_clone)( -+ int (*fn)(void*), void* child_stack, int flags, void* arg, int* parent_tidptr, void* newtls, int* child_tidptr) -+{ -+ register long result_r0 __asm__("$0"); -+ long ___res; -+ int tmp = 0; -+ { -+ register int (*fn_tmp)(void*) __asm__("$16") = fn; -+ register void* stack_tmp __asm__("$17") = child_stack; -+ register int flags_tmp __asm__("$18") = flags; -+ register void* arg_tmp __asm__("$19") = arg; -+ register int* ptid_tmp __asm__("$20") = parent_tidptr; -+ register void* tls_tmp __asm__("$21") = newtls; -+ register int* ctid_tmp __asm__("$22") = child_tidptr; -+ -+ __asm__ __volatile__( -+ -+ /*if (fn == NULL || child_stack == NULL) return -EINVAL; */ -+ "beq $16,1f\n" -+ "beq $17,1f\n" -+ -+ "ldi $17,-16($17)\n" -+ "stl $16,0($17) \n" -+ "stl $19,8($17) \n" -+ -+ "mov $18,$16 \n" /* flags */ -+ "mov $20,$18 \n" /* ptid */ -+ "mov $21,$19 \n" /* tls */ -+ "mov $22,$20 \n" /* ctid */ -+ "mov %9,$0 \n" /* save __NR_clone into $0 register */ -+ "sys_call 0x83\n" -+ -+ /* example: if (%r0 != 0) return %r0; */ -+ "cmpeq $0,0,%11\n" -+ "beq %11,2f\n" -+ -+ /* In the child, now. Call "fn(arg)". -+ */ -+ "ldl $16, 0($sp)\n" -+ "ldl $17, 8($sp)\n" -+ "mov $17, $27 \n" -+ "call $31, ($27),0x0\n" -+ /* example: Call _exit(%r0). -+ */ -+ "mov %10, $0 \n" /*save __NR_exit into $0 register*/ -+ "sys_call 0x83\n" -+ "1: \n" -+ "mov %1, $0 \n" -+ "2: \n" -+ : "=r"(result_r0) -+ : "i"(-EINVAL), -+ "r"(fn_tmp), -+ "r"(stack_tmp), -+ "r"(flags_tmp), -+ "r"(arg_tmp), -+ "r"(ptid_tmp), -+ "r"(tls_tmp), -+ "r"(ctid_tmp), -+ "i"(__NR_clone), -+ "i"(__NR_exit), -+ "r"(tmp) -+ : "$26", "memory"); -+ } -+ ___res = result_r0; -+ ___syscall_return(int, ___res); -+} -+/* end */ - #endif -diff --git a/openGauss-server-2.1.0/src/gausskernel/cbb/bbox/bbox_syscall_support.h b/openGauss-server-2.1.0/src/gausskernel/cbb/bbox/bbox_syscall_support.h -index c131a57..5938ef0 100644 ---- a/openGauss-server-2.1.0/src/gausskernel/cbb/bbox/bbox_syscall_support.h -+++ b/openGauss-server-2.1.0/src/gausskernel/cbb/bbox/bbox_syscall_support.h -@@ -73,11 +73,16 @@ - #include "bbox_syscall_ARM.h" - #elif (defined(__aarch64__)) - #include "bbox_syscall_ARM64.h" -+/* modify by yjy */ -+#elif (defined(__sw_64__)) -+#include "bbox_syscall_SW_64.h" -+/*end*/ - #endif - - #define SA_RESTORER 0x04000000 - #define KERNEL_NSIG 64 --#define EM_AARCH64 183 -+#define EM_AARCH64 183 -+#define EM_SW_64 0x9916//modify by yjy - - #if (defined(__aarch64__)) - struct linux_dirent { -@@ -197,6 +202,29 @@ struct kernel_stat { - unsigned int __unused4; - unsigned int __unused5; - }; -+/* modify by yjy */ -+#elif (defined(__sw_64__)) -+struct kernel_stat { -+ unsigned long st_dev; -+ unsigned long st_ino; -+ unsigned long st_rdev; -+ long st_size; -+ unsigned long st_blocks; -+ unsigned int st_mode; -+ unsigned int st_nlink; -+ unsigned int st_uid; -+ unsigned int st_gid; -+ unsigned int st_blksize; -+ unsigned int __pad0; -+ unsigned long st_atime_; -+ unsigned long st_atime_nsec_; -+ unsigned long st_mtime_; -+ unsigned long st_mtime_nsec_; -+ unsigned long st_ctime_; -+ unsigned long st_ctime_nsec_; -+ long __unused[3]; -+}; -+/* end */ - #endif - - extern long SYS_NAME(gettid)(void); -@@ -295,5 +323,13 @@ extern long SYS_NAME(signal)(int _signum, void (*handler)(int)); - extern long SYS_NAME(socket)(int domain, int type, int protocol); - extern long SYS_NAME(_clone)( - int (*fn)(void*), void* child_stack, int flags, void* arg, int* parent_tidptr, void* newtls, int* child_tidptr); -+/* modify by yjy */ -+#elif (defined(__sw_64__)) -+extern long SYS_NAME(waitpid)(pid_t pid, int* status, int options); -+extern long SYS_NAME(signal)(int _signum, void (*handler)(int)); -+extern long SYS_NAME(socket)(int domain, int type, int protocol); -+extern long SYS_NAME(_clone)( -+ int (*fn)(void*), void* child_stack, int flags, void* arg, int* parent_tidptr, void* newtls, int* child_tidptr); -+/* end */ - #endif - #endif -diff --git a/openGauss-server-2.1.0/src/gausskernel/process/main/main.cpp b/openGauss-server-2.1.0/src/gausskernel/process/main/main.cpp -index 02eb5f1..4a19a47 100755 ---- a/openGauss-server-2.1.0/src/gausskernel/process/main/main.cpp -+++ b/openGauss-server-2.1.0/src/gausskernel/process/main/main.cpp -@@ -78,7 +78,6 @@ int main(int argc, char* argv[]) - { - char* mmap_env = NULL; - syscall_lock_init(); -- - mmap_env = gs_getenv_r("GAUSS_MMAP_THRESHOLD"); - if (mmap_env != NULL) { - check_backend_env(mmap_env); -@@ -322,7 +321,7 @@ static void startup_hacks(const char* progname) - */ - #ifdef NOFIXADE - --#if defined(__alpha) /* no __alpha__ ? */ -+#if defined(__alpha) || defined(__sw_64) /* no __alpha__ ? */ - { - int buffer[] = {SSIN_UACPROC, UAC_SIGBUS | UAC_NOPRINT}; - -diff --git a/openGauss-server-2.1.0/src/gausskernel/process/postmaster/postmaster.cpp b/openGauss-server-2.1.0/src/gausskernel/process/postmaster/postmaster.cpp -index 2407ef8..9231dfa 100644 ---- a/openGauss-server-2.1.0/src/gausskernel/process/postmaster/postmaster.cpp -+++ b/openGauss-server-2.1.0/src/gausskernel/process/postmaster/postmaster.cpp -@@ -844,7 +844,7 @@ void get_coredump_pattern_path(char* path, Size len) - - if (0 != stat(path, &stat_buf) || !S_ISDIR(stat_buf.st_mode) || 0 != access(path, W_OK)) { - write_stderr("The core dump path is an invalid directory\n"); -- *path = '\0'; -+ *path = '\0'; - return; - } - } -diff --git a/openGauss-server-2.1.0/src/gausskernel/runtime/executor/instrument.cpp b/openGauss-server-2.1.0/src/gausskernel/runtime/executor/instrument.cpp -index 24be0e6..72a6a6e 100644 ---- a/openGauss-server-2.1.0/src/gausskernel/runtime/executor/instrument.cpp -+++ b/openGauss-server-2.1.0/src/gausskernel/runtime/executor/instrument.cpp -@@ -86,6 +86,12 @@ static inline uint64 rdtsc(void) - asm volatile("isb; mrs %0, cntvct_el0" : "=r"(cval) : : "memory"); - - return cval; -+/* modify by yjy */ -+#elif defined(__sw_64__) -+ unsigned long time_val = 0; -+ __asm__ __volatile__("rtc %0" : "=r"(time_val) : : "memory"); -+ return time_val; -+/* end */ - #else - uint32 hi = 0; - uint32 lo = 0; -diff --git a/openGauss-server-2.1.0/src/gausskernel/runtime/vecexecutor/vectorsonic/vsonichash.cpp b/openGauss-server-2.1.0/src/gausskernel/runtime/vecexecutor/vectorsonic/vsonichash.cpp -index cc14674..3b45dbb 100644 ---- a/openGauss-server-2.1.0/src/gausskernel/runtime/vecexecutor/vectorsonic/vsonichash.cpp -+++ b/openGauss-server-2.1.0/src/gausskernel/runtime/vecexecutor/vectorsonic/vsonichash.cpp -@@ -30,6 +30,7 @@ - #include "utils/dynahash.h" - #ifdef __aarch64__ - #include -+#elif defined(__sw_64__) - #else - #include - #endif -@@ -40,8 +41,10 @@ extern bool anls_opt_is_on(AnalysisOpt dfx_opt); - #define HASH_RANDOM_2 1.1131347 - #define HASH_RANDOM_3 1.0132677 - --#ifdef __aarch64__ -+#if defined __aarch64__ - #define HASH_INT32_CRC(c, k) __crc32cw(c, k) -+#elif defined(__sw_64__) -+#define HASH_INT32_CRC(c, k) c - #else - #define HASH_INT32_CRC(c, k) _mm_crc32_u32(c, k) - #endif -@@ -58,7 +61,7 @@ uint32 hashquickany(uint32 seed, register const unsigned char* data, register in - - uint32 crc = seed; - --#ifdef __aarch64__ -+#if defined __aarch64__ - while (p + 8 <= pend) { - crc = (uint32)__crc32d(crc, *((const uint64*)p)); - p += 8; -@@ -75,6 +78,8 @@ uint32 hashquickany(uint32 seed, register const unsigned char* data, register in - crc = __crc32cb(crc, *p); - p++; - } -+#elif defined(__sw_64__) -+ return crc; - #else - while (p + 8 <= pend) { - crc = (uint32)_mm_crc32_u64(crc, *((const uint64*)p)); -diff --git a/openGauss-server-2.1.0/src/gausskernel/storage/access/transam/extreme_rto/page_redo.cpp b/openGauss-server-2.1.0/src/gausskernel/storage/access/transam/extreme_rto/page_redo.cpp -index ceda891..e5c6379 100755 ---- a/openGauss-server-2.1.0/src/gausskernel/storage/access/transam/extreme_rto/page_redo.cpp -+++ b/openGauss-server-2.1.0/src/gausskernel/storage/access/transam/extreme_rto/page_redo.cpp -@@ -207,7 +207,7 @@ PageRedoWorker *CreateWorker(uint32 id) - PosixSemaphoreInit(&worker->phaseMarker, 0); - worker->oldCtx = NULL; - worker->fullSyncFlag = 0; --#if (!defined __x86_64__) && (!defined __aarch64__) -+#if (!defined __x86_64__) && (!defined __aarch64__) && (!defined __sw_64__) - SpinLockInit(&worker->ptrLck); - #endif - worker->parseManager.memctl.isInit = false; -@@ -236,7 +236,7 @@ void DestroyPageRedoWorker(PageRedoWorker *worker) - void SetCompletedReadEndPtr(PageRedoWorker *worker, XLogRecPtr readPtr, XLogRecPtr endPtr) - { - volatile PageRedoWorker *tmpWk = worker; --#if defined(__x86_64__) || defined(__aarch64__) -+#if defined(__x86_64__) || defined(__aarch64__) || defined(__sw_64__) - uint128_u exchange; - uint128_u current; - uint128_u compare = atomic_compare_and_swap_u128((uint128_u *)&tmpWk->lastReplayedReadRecPtr); -@@ -258,14 +258,14 @@ loop: - tmpWk->lastReplayedReadRecPtr = readPtr; - tmpWk->lastReplayedEndRecPtr = endPtr; - SpinLockRelease(&tmpWk->ptrLck); --#endif /* __x86_64__ || __aarch64__ */ -+#endif /* __x86_64__ || __aarch64__ || __sw_64__*/ - } - - /* automic write for lastReplayedReadRecPtr and lastReplayedEndRecPtr */ - void GetCompletedReadEndPtr(PageRedoWorker *worker, XLogRecPtr *readPtr, XLogRecPtr *endPtr) - { - volatile PageRedoWorker *tmpWk = worker; --#if defined(__x86_64__) || defined(__aarch64__) -+#if defined(__x86_64__) || defined(__aarch64__) || defined(__sw_64__) - uint128_u compare = atomic_compare_and_swap_u128((uint128_u *)&tmpWk->lastReplayedReadRecPtr); - Assert(sizeof(tmpWk->lastReplayedReadRecPtr) == 8); - Assert(sizeof(tmpWk->lastReplayedEndRecPtr) == 8); -@@ -277,7 +277,7 @@ void GetCompletedReadEndPtr(PageRedoWorker *worker, XLogRecPtr *readPtr, XLogRec - *readPtr = tmpWk->lastReplayedReadRecPtr; - *endPtr = tmpWk->lastReplayedEndRecPtr; - SpinLockRelease(&tmpWk->ptrLck); --#endif /* __x86_64__ || __aarch64__ */ -+#endif /* __x86_64__ || __aarch64__ || __sw_64__ */ - } - - /* Run from both the dispatcher and the worker thread. */ -diff --git a/openGauss-server-2.1.0/src/gausskernel/storage/access/transam/xlog.cpp b/openGauss-server-2.1.0/src/gausskernel/storage/access/transam/xlog.cpp -index cb9f91e..21a72e1 100755 ---- a/openGauss-server-2.1.0/src/gausskernel/storage/access/transam/xlog.cpp -+++ b/openGauss-server-2.1.0/src/gausskernel/storage/access/transam/xlog.cpp -@@ -13,6 +13,7 @@ - * - * ------------------------------------------------------------------------- - */ -+//#ifndef __sw_64__ - #include "postgres.h" - #include "knl/knl_variable.h" - -@@ -259,7 +260,7 @@ TransactionId OldestXidAfterRecovery; - */ - typedef struct { - LWLock lock; --#ifdef __aarch64__ -+#if defined(__aarch64__) || defined(__sw_64__) - pg_atomic_uint32 xlogGroupFirst; - #endif - XLogRecPtr insertingAt; -@@ -292,7 +293,7 @@ typedef struct XLogCtlInsert { - uint32 PrevByteSize; - int32 CurrLRC; - --#if (!defined __x86_64__) && (!defined __aarch64__) -+#if (!defined __x86_64__) && (!defined __aarch64__) && (!defined __sw_64__ ) - slock_t insertpos_lck; /* protects CurrBytePos and PrevBytePos */ - #endif - /* -@@ -669,7 +670,7 @@ bool mpfl_pread_file(int fd, void *buf, int32 size, int64 offset); - int ParallelXLogPageRead(XLogReaderState *xlogreader, XLogRecPtr targetPagePtr, int reqLen, XLogRecPtr targetRecPtr, - TimeLineID *readTLI); - --#ifdef __aarch64__ -+#if defined(__aarch64__) - static XLogRecPtr XLogInsertRecordGroup(XLogRecData *rdata, XLogRecPtr fpw_lsn); - - static void XLogInsertRecordNolock(XLogRecData *rdata, PGPROC *proc, XLogRecPtr StartPos, XLogRecPtr EndPos, -@@ -1091,7 +1092,7 @@ static void ReserveXLogInsertByteLocation(uint32 size, uint32 lastRecordSize, ui - * because the usable byte position doesn't include any headers, reserving - * X bytes from WAL is almost as simple as "CurrBytePos += X". - */ --#if defined(__x86_64__) || defined(__aarch64__) -+#if defined(__x86_64__) || defined(__aarch64__) || defined(__sw_64__) - union Union128 compare; - union Union128 exchange; - union Union128 current; -@@ -1622,7 +1623,7 @@ static void ReserveXLogInsertLocation(uint32 size, XLogRecPtr* StartPos, XLogRec - * because the usable byte position doesn't include any headers, reserving - * X bytes from WAL is almost as simple as "CurrBytePos += X". - */ --#if defined(__x86_64__) || defined(__aarch64__) -+#if defined(__x86_64__) || defined(__aarch64__) || defined(__sw_64__) - union Union128 compare; - union Union128 exchange; - union Union128 current; -@@ -1709,7 +1710,7 @@ static bool ReserveXLogSwitch(XLogRecPtr *StartPos, XLogRecPtr *EndPos, XLogRecP - * are no other inserters competing for it. GetXLogInsertRecPtr() does - * compete for it, but that's not called very frequently. - */ --#if defined(__x86_64__) || defined(__aarch64__) -+#if defined(__x86_64__) || defined(__aarch64__) || defined(__sw_64__) - uint128_u exchange; - uint128_u current; - uint128_u compare = atomic_compare_and_swap_u128((uint128_u*)&Insert->CurrBytePos); -@@ -2623,7 +2624,7 @@ static void AdvanceXLInsertBuffer(XLogRecPtr upto, bool opportunistic, PGPROC *p - XLogwrtResult *LogwrtResultPtr = NULL; - TimeLineID xlogTimeLineID = 0; - --#ifdef __aarch64__ -+#if defined __aarch64__ - if (isGroupInsert) { - LogwrtResultPtr = (XLogwrtResult *)proc->xlogGroupLogwrtResult; - xlogTimeLineID = proc->xlogGroupTimeLineID; -@@ -6314,6 +6315,7 @@ static void WriteControlFile(void) - COMP_CRC32C(t_thrd.shemem_ptr_cxt.ControlFile->crc, (char *)t_thrd.shemem_ptr_cxt.ControlFile, - offsetof(ControlFileData, crc)); - FIN_CRC32C(t_thrd.shemem_ptr_cxt.ControlFile->crc); -+ - - /* - * We write out PG_CONTROL_SIZE bytes into pg_control, zero-padding the -@@ -6331,6 +6333,7 @@ static void WriteControlFile(void) - - errorno = memcpy_s(buffer, PG_CONTROL_SIZE, t_thrd.shemem_ptr_cxt.ControlFile, sizeof(ControlFileData)); - securec_check(errorno, "", ""); -+ securec_check(errorno, "", ""); - - #ifdef USE_ASSERT_CHECKING - #define MAX_SIZE 1024 -@@ -6938,7 +6941,7 @@ void XLOGShmemInit(void) - LWLockInitialize(&t_thrd.shemem_ptr_cxt.GlobalWALInsertLocks[processorIndex][i].l.lock, - LWTRANCHE_WAL_INSERT); - t_thrd.shemem_ptr_cxt.GlobalWALInsertLocks[processorIndex][i].l.insertingAt = InvalidXLogRecPtr; --#ifdef __aarch64__ -+#if defined __aarch64__ || defined __sw_64__ - pg_atomic_init_u32(&t_thrd.shemem_ptr_cxt.GlobalWALInsertLocks[processorIndex][i].l.xlogGroupFirst, - INVALID_PGPROCNO); - #endif -@@ -6974,7 +6977,7 @@ void XLOGShmemInit(void) - t_thrd.shemem_ptr_cxt.XLogCtl->lastRemovedSegNo = GetOldestXLOGSegNo(t_thrd.proc_cxt.DataDir); - } - --#if (!defined __x86_64__) && (!defined __aarch64__) -+#if (!defined __x86_64__) && (!defined __aarch64__) && (!defined __sw_64__) - SpinLockInit(&t_thrd.shemem_ptr_cxt.XLogCtl->Insert.insertpos_lck); - #endif - SpinLockInit(&t_thrd.shemem_ptr_cxt.XLogCtl->info_lck); -@@ -7136,7 +7139,6 @@ void BootStrapXLOG(void) - page = (XLogPageHeader)TYPEALIGN(XLOG_BLCKSZ, buffer); - ret = memset_s(page, XLOG_BLCKSZ, 0, XLOG_BLCKSZ); - securec_check(ret, "", ""); -- - /* - * Set up information for the initial checkpoint record - * -@@ -7287,6 +7289,7 @@ void BootStrapXLOG(void) - - /* Bootstrap the commit log, too */ - BootStrapCLOG(); -+ BootStrapCLOG(); - BootStrapCSNLOG(); - BootStrapMultiXact(); - -@@ -14978,7 +14981,7 @@ XLogRecPtr do_roach_stop_backup(const char *backupidstr) - stoppoint = t_thrd.shemem_ptr_cxt.ControlFile->minRecoveryPoint; - LWLockRelease(ControlFileLock); - } else { --#if defined(__x86_64__) || defined(__aarch64__) -+#if defined(__x86_64__) || defined(__aarch64__) || defined(__sw_64__) - current_bytepos = pg_atomic_barrier_read_u64((uint64*)&Insert->CurrBytePos); - stoppoint = XLogBytePosToEndRecPtr(current_bytepos); - #else -@@ -15228,7 +15231,7 @@ XLogRecPtr enable_delay_ddl_recycle(void) - - LWLockAcquire(CBMParseXlogLock, LW_EXCLUSIVE); - --#if defined(__x86_64__) || defined(__aarch64__) -+#if defined(__x86_64__) || defined(__aarch64__) || defined(__sw_64__) - uint64 current_bytepos = pg_atomic_barrier_read_u64((uint64*)&Insert->CurrBytePos); - curDelayRange.startLSN = XLogBytePosToEndRecPtr(current_bytepos); - #else -@@ -15362,7 +15365,7 @@ void disable_delay_ddl_recycle(XLogRecPtr barrierLSN, bool isForce, XLogRecPtr * - */ - LWLockAcquire(RelfilenodeReuseLock, LW_EXCLUSIVE); - --#if defined(__x86_64__) || defined(__aarch64__) -+#if defined(__x86_64__) || defined(__aarch64__) || defined(__sw_64__) - uint64 current_bytepos = pg_atomic_barrier_read_u64((uint64*)&Insert->CurrBytePos); - delayRange.endLSN = XLogBytePosToEndRecPtr(current_bytepos); - #else -@@ -15444,7 +15447,7 @@ XLogRecPtr enable_delay_ddl_recycle_with_slot(const char* slotname) - /* hold this lock to push cbm parse exact to the ddl stop position */ - LWLockAcquire(CBMParseXlogLock, LW_EXCLUSIVE); - --#if defined(__x86_64__) || defined(__aarch64__) -+#if defined(__x86_64__) || defined(__aarch64__) || defined(__sw_64__) - uint64 current_bytepos = pg_atomic_barrier_read_u64((uint64*)&Insert->CurrBytePos); - delay_start_lsn = XLogBytePosToEndRecPtr(current_bytepos); - #else -@@ -15510,7 +15513,7 @@ void disable_delay_ddl_recycle_with_slot(const char* slotname, XLogRecPtr *start - */ - LWLockAcquire(RelfilenodeReuseLock, LW_EXCLUSIVE); - --#if defined(__x86_64__) || defined(__aarch64__) -+#if defined(__x86_64__) || defined(__aarch64__) || defined(__sw_64__) - uint64 current_bytepos = pg_atomic_barrier_read_u64((uint64*)&Insert->CurrBytePos); - delay_end_lsn = XLogBytePosToEndRecPtr(current_bytepos); - #else -@@ -15928,7 +15931,7 @@ XLogRecPtr GetXLogInsertRecPtr(void) - volatile XLogCtlInsert *Insert = &t_thrd.shemem_ptr_cxt.XLogCtl->Insert; - uint64 current_bytepos; - --#if defined(__x86_64__) || defined(__aarch64__) -+#if defined(__x86_64__) || defined(__aarch64__) || defined(__sw_64__) - current_bytepos = pg_atomic_barrier_read_u64((uint64*)&Insert->CurrBytePos); - #else - SpinLockAcquire(&Insert->insertpos_lck); -@@ -15950,7 +15953,7 @@ XLogRecPtr GetXLogInsertEndRecPtr(void) - volatile XLogCtlInsert *Insert = &t_thrd.shemem_ptr_cxt.XLogCtl->Insert; - uint64 current_bytepos; - --#if defined(__x86_64__) || defined(__aarch64__) -+#if defined(__x86_64__) || defined(__aarch64__) || defined(__sw_64__) - current_bytepos = pg_atomic_barrier_read_u64((uint64*)&Insert->CurrBytePos); - #else - SpinLockAcquire(&Insert->insertpos_lck); -@@ -18432,7 +18435,7 @@ bool IsRoachRestore(void) - } - - const uint UPDATE_REC_XLOG_NUM = 4; --#if defined(__x86_64__) || defined(__aarch64__) -+#if defined(__x86_64__) || defined(__aarch64__) || defined(__sw_64__) - bool atomic_update_dirty_page_queue_rec_lsn(XLogRecPtr current_insert_lsn, bool need_immediately_update) - { - XLogRecPtr cur_rec_lsn = InvalidXLogRecPtr; -@@ -18490,7 +18493,7 @@ void update_dirty_page_queue_rec_lsn(XLogRecPtr current_insert_lsn, bool need_im - } - } - --#if defined(__x86_64__) || defined(__aarch64__) -+#if defined(__x86_64__) || defined(__aarch64__) || defined(__sw_64__) - is_update = atomic_update_dirty_page_queue_rec_lsn(current_insert_lsn, need_immediately_update); - #else - SpinLockAcquire(&g_instance.ckpt_cxt_ctl->queue_lock); -@@ -18515,7 +18518,7 @@ void update_dirty_page_queue_rec_lsn(XLogRecPtr current_insert_lsn, bool need_im - uint64 get_dirty_page_queue_rec_lsn() - { - uint64 dirty_page_queue_rec_lsn = 0; --#if defined(__x86_64__) || defined(__aarch64__) -+#if defined(__x86_64__) || defined(__aarch64__) || defined(__sw_64__) - uint128_u compare; - compare = atomic_compare_and_swap_u128((uint128_u*)&g_instance.ckpt_cxt_ctl->dirty_page_queue_reclsn); - dirty_page_queue_rec_lsn = compare.u64[0]; -@@ -18956,4 +18959,4 @@ void InitXlogStatuEntryTblSize() - g_instance.attr.attr_storage.wal_insert_status_entries_power = MIN_WAL_INSERT_STATUS_ENTRY_POW; - } - } -- -+//#endif -diff --git a/openGauss-server-2.1.0/src/gausskernel/storage/mot/core/Makefile.local b/openGauss-server-2.1.0/src/gausskernel/storage/mot/core/Makefile.local -index 5cdaaff..74daee4 100644 ---- a/openGauss-server-2.1.0/src/gausskernel/storage/mot/core/Makefile.local -+++ b/openGauss-server-2.1.0/src/gausskernel/storage/mot/core/Makefile.local -@@ -73,9 +73,10 @@ PLATFORM_ARCH = $(shell uname -p) - ifeq ($(PLATFORM_ARCH),aarch64) - #CFLAGS += -std=gnu++11 -march=armv8-a+crc -Wall -Wextra -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC - CFLAGS += -std=gnu++11 -march=armv8-a+crc -w -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC --else -- #CFLAGS += -std=gnu++11 -march=native -mcx16 -Wall -Wextra -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -- CFLAGS += -std=gnu++11 -mcx16 -w -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -+else ifeq($(PLATFORM_ARCH),sw_64) -+ CFLAGS += -std=gnu++11 -march=native -Wall -Wextra -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -+else -+ CFLAGS += -std=gnu++11 -march=native -mcx16 -Wall -Wextra -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC - endif - - CFLAGS += $(INCLUDE) -@@ -93,6 +94,8 @@ ifeq ($(UNDERPG), no) - ifeq ($(BUILD),Release) - ifeq ($(PLATFORM_ARCH),aarch64) - CFLAGS += -O2 -DNDEBUG -D_FORTIFY_SOURCE=2 -+ else ifeq ($(PLATFORM_ARCH),sw_64) -+ CFLAGS += -O2 -DNDEBUG -D_FORTIFY_SOURCE=2 - else - CFLAGS += -Werror -O2 -DNDEBUG -mcx16 -D_FORTIFY_SOURCE=2 - endif -diff --git a/openGauss-server-2.1.0/src/gausskernel/storage/mot/core/infra/synchronization/cycles.h b/openGauss-server-2.1.0/src/gausskernel/storage/mot/core/infra/synchronization/cycles.h -index 559ce1d..e42465d 100644 ---- a/openGauss-server-2.1.0/src/gausskernel/storage/mot/core/infra/synchronization/cycles.h -+++ b/openGauss-server-2.1.0/src/gausskernel/storage/mot/core/infra/synchronization/cycles.h -@@ -55,6 +55,12 @@ public: - unsigned long cval = 0; - asm volatile("isb; mrs %0, cntvct_el0" : "=r"(cval) : : "memory"); - return cval; -+/* modify by yjy */ -+#elif defined(__sw_64__) -+ unsigned long time_val = 0; -+ __asm__ __volatile__("rtc %0" : "=r"(time_val) : : "memory"); -+ return time_val; -+/* end */ - #else - #error "Unsupported CPU architecture or compiler." - #endif -@@ -75,6 +81,12 @@ public: - unsigned long cval = 0; - asm volatile("isb; mrs %0, cntvct_el0" : "=r"(cval) : : "memory"); - return cval; -+/* modify by yjy */ -+#elif defined(__sw_64__) -+ unsigned long time_val = 0; -+ __asm__ volatile("rtc %0" : "=r"(time_val) : : "memory"); -+ return time_val; -+/* end */ - #else - #error "Unsupported CPU architecture or compiler." - #endif -diff --git a/openGauss-server-2.1.0/src/gausskernel/storage/mot/core/infra/synchronization/mot_atomic_ops.h b/openGauss-server-2.1.0/src/gausskernel/storage/mot/core/infra/synchronization/mot_atomic_ops.h -index 2c57cbf..7c628e3 100644 ---- a/openGauss-server-2.1.0/src/gausskernel/storage/mot/core/infra/synchronization/mot_atomic_ops.h -+++ b/openGauss-server-2.1.0/src/gausskernel/storage/mot/core/infra/synchronization/mot_atomic_ops.h -@@ -65,4 +65,4 @@ - /** @define Atomic compare-and-swap. Performs the operation "if (v == curr_value) then v = new_value". */ - #define MOT_ATOMIC_CAS(v, curr_value, new_value) __sync_bool_compare_and_swap(&v, curr_value, new_value) - --#endif /* MM_ATOMIC_OPS_H */ -\ No newline at end of file -+#endif /* MM_ATOMIC_OPS_H */ -diff --git a/openGauss-server-2.1.0/src/include/access/double_write_basic.h b/openGauss-server-2.1.0/src/include/access/double_write_basic.h -index 0543ca2..7b1f55d 100644 ---- a/openGauss-server-2.1.0/src/include/access/double_write_basic.h -+++ b/openGauss-server-2.1.0/src/include/access/double_write_basic.h -@@ -109,6 +109,8 @@ typedef unsigned char slock_t; - - #if defined(__aarch64__) || defined(__aarch64) - typedef int slock_t; -+#elif defined(__sw_64__) //modify by yjy -+typedef unsigned long slock_t; - #endif - - typedef uintptr_t Datum; -diff --git a/openGauss-server-2.1.0/src/include/access/extreme_rto/dispatcher.h b/openGauss-server-2.1.0/src/include/access/extreme_rto/dispatcher.h -index 5890af2..41eb8fa 100644 ---- a/openGauss-server-2.1.0/src/include/access/extreme_rto/dispatcher.h -+++ b/openGauss-server-2.1.0/src/include/access/extreme_rto/dispatcher.h -@@ -105,7 +105,7 @@ typedef struct RecordBufferAarray { - typedef struct { - uint64 curPosition; - XLogRecPtr curLsn; --#if (!defined __x86_64__) && (!defined __aarch64__) -+#if (!defined __x86_64__) && (!defined __aarch64__) && (!defined __sw_64__) //add sw_64 modify bu yjy - /* protects lastReplayedReadRecPtr and lastReplayedEndRecPtr */ - slock_t ptrLck; - #endif -diff --git a/openGauss-server-2.1.0/src/include/access/extreme_rto/page_redo.h b/openGauss-server-2.1.0/src/include/access/extreme_rto/page_redo.h -index 6dc938a..8bbf855 100644 ---- a/openGauss-server-2.1.0/src/include/access/extreme_rto/page_redo.h -+++ b/openGauss-server-2.1.0/src/include/access/extreme_rto/page_redo.h -@@ -65,7 +65,7 @@ struct PageRedoWorker { - */ - XLogRecPtr lastReplayedReadRecPtr; - XLogRecPtr lastReplayedEndRecPtr; --#if (!defined __x86_64__) && (!defined __aarch64__) -+#if (!defined __x86_64__) && (!defined __aarch64__) && (!defined __sw_64__) //add sw_64 modify by yjy - /* protects lastReplayedReadRecPtr and lastReplayedEndRecPtr */ - slock_t ptrLck; - #endif -diff --git a/openGauss-server-2.1.0/src/include/access/parallel_recovery/page_redo.h b/openGauss-server-2.1.0/src/include/access/parallel_recovery/page_redo.h -index 3e0a720..eccef33 100644 ---- a/openGauss-server-2.1.0/src/include/access/parallel_recovery/page_redo.h -+++ b/openGauss-server-2.1.0/src/include/access/parallel_recovery/page_redo.h -@@ -61,7 +61,7 @@ struct PageRedoWorker { - */ - XLogRecPtr lastReplayedReadRecPtr; - XLogRecPtr lastReplayedEndRecPtr; --#if (!defined __x86_64__) && (!defined __aarch64__) -+#if (!defined __x86_64__) && (!defined __aarch64__) //add sw_64 modify by yjy - /* protects lastReplayedReadRecPtr and lastReplayedEndRecPtr */ - slock_t ptrLck; - #endif -diff --git a/openGauss-server-2.1.0/src/include/communication/commproxy_interface.h b/openGauss-server-2.1.0/src/include/communication/commproxy_interface.h -index c42cc43..7a1beb6 100644 ---- a/openGauss-server-2.1.0/src/include/communication/commproxy_interface.h -+++ b/openGauss-server-2.1.0/src/include/communication/commproxy_interface.h -@@ -416,7 +416,17 @@ extern bool comm_compare_and_swap_32(volatile int32* dest, int32 oldval, int32 n - - #define gaussdb_numa_memory_bind(i) - #define gaussdb_numa_memory_unbind() -+/* modify by yjy */ -+#elif defined(__sw_64__) -+#define gaussdb_memory_barrier() \ -+ __asm__ __volatile__ ("memb" : : : "memory") -+ -+#define gaussdb_read_barrier() gaussdb_memory_barrier() -+#define gaussdb_write_barrier() gaussdb_memory_barrier() - -+#define gaussdb_numa_memory_bind(i) -+#define gaussdb_numa_memory_unbind() -+/* end */ - #elif defined(__i386__) - #define gaussdb_memory_barrier() \ - __asm__ __volatile__ ("lock; addl $0,0(%%esp)" : : : "memory") -diff --git a/openGauss-server-2.1.0/src/include/gtm/gtm_atomic.h b/openGauss-server-2.1.0/src/include/gtm/gtm_atomic.h -index 35e8fb9..affb5e6 100644 ---- a/openGauss-server-2.1.0/src/include/gtm/gtm_atomic.h -+++ b/openGauss-server-2.1.0/src/include/gtm/gtm_atomic.h -@@ -169,6 +169,10 @@ static inline void GTM_loadStoreFence() - #ifdef __aarch64__ - - __asm__ __volatile__("DMB ish" ::: "memory"); -+/* modify by yjy */ -+#elif defined(__sw_64__) -+ __asm__ __volatile__("memb" ::: "memory"); -+/* end */ - #else - __asm__ __volatile__("lfence" ::: "memory"); - __asm__ __volatile__("sfence" ::: "memory"); -@@ -177,11 +181,19 @@ static inline void GTM_loadStoreFence() - - static inline void GTM_loadFence() - { -+/* modify */ -+#ifndef __sw_64__ - __asm__ __volatile__("lfence" ::: "memory"); -+#endif -+/* end */ - } - - static inline void GTM_StoreFence() - { -+/* modify */ -+#ifndef __sw_64__ - __asm__ __volatile__("sfence" ::: "memory"); -+#endif -+/* end */ - } - #endif /* CODE_SRC_INCLUDE_GTM_GTM_ATOMIC_H_ */ -diff --git a/openGauss-server-2.1.0/src/include/gtm/gtm_slock.h b/openGauss-server-2.1.0/src/include/gtm/gtm_slock.h -index 1ba3e64..207b71e 100644 ---- a/openGauss-server-2.1.0/src/include/gtm/gtm_slock.h -+++ b/openGauss-server-2.1.0/src/include/gtm/gtm_slock.h -@@ -585,6 +585,45 @@ static __inline__ int tas(volatile slock_t* lock) - - #endif /* __ns32k__ */ - -+/* modify by yjy */ -+#if defined(__sw_64__) -+#define HAS_TEST_AND_SET -+typedef unsigned long slock_t; -+#define TAS(lock) tas(lock) -+ -+static __inline__ int tas(volatile slock_t* lock) -+{ -+ register slock_t _res; -+ unsigned long tmp; -+ __asm__ __volatile__( -+ " ldl $0, %1 \n" -+ " bne $0, 2f \n" -+ " lldl %0, %1 \n" -+ " cmpeq %0, 0,%2\n" -+ " wr_f %2 \n" -+ " mov %2, $0 \n" -+ " lstl $0, %1 \n" -+ " rd_f $0 \n" -+ " beq %2, 2f \n" -+ " beq $0, 2f \n" -+ " memb \n" -+ " br 3f \n" -+ "2: mov 1, %0 \n" -+ "3: \n" -+ :"=&r"(_res), "+m"(*lock),"=&r"(tmp) -+ : -+ :"memory", "0"); -+ return (int)_res; -+} -+ -+#define S_UNLOCK(lock) \ -+ do { \ -+ __asm__ __volatile__("memb \n"); \ -+ *((volatile slock_t*)(lock)) = 0; \ -+ } while (0) -+#endif -+/* end */ -+ - #if defined(__alpha) || defined(__alpha__) /* Alpha */ - /* - * Correct multi-processor locking methods are explained in section 5.5.3 -diff --git a/openGauss-server-2.1.0/src/include/storage/lock/s_lock.h b/openGauss-server-2.1.0/src/include/storage/lock/s_lock.h -index 6a64c9d..929fec9 100644 ---- a/openGauss-server-2.1.0/src/include/storage/lock/s_lock.h -+++ b/openGauss-server-2.1.0/src/include/storage/lock/s_lock.h -@@ -97,7 +97,7 @@ - - #include "storage/lock/pg_sema.h" - --#if !defined(ENABLE_THREAD_CHECK) || defined(__aarch64__) -+#if !defined(ENABLE_THREAD_CHECK) || defined(__aarch64__) || defined(__sw_64__) - - #ifdef HAVE_SPINLOCKS /* skip spinlocks if requested */ - -@@ -606,6 +606,45 @@ static __inline__ int tas(volatile slock_t* lock) - - #endif /* __ns32k__ */ - -+/* modify by yjy */ -+#if defined(__sw_64) || defined(__sw_64__) -+#define HAS_TEST_AND_SET -+typedef unsigned long slock_t; -+#define TAS(lock) tas(lock) -+ -+static __inline__ int tas(volatile slock_t* lock) -+{ -+ register slock_t _res; -+ unsigned long tmp; -+ __asm__ __volatile__( -+ " ldl $0, %1 \n" -+ " bne $0, 2f \n" -+ " lldl %0, %1 \n" -+ " cmpeq %0, 0,%2\n" -+ " wr_f %2 \n" -+ " mov %2, $0 \n" -+ " lstl $0, %1 \n" -+ " rd_f $0 \n" -+ " beq %2, 2f \n" -+ " beq $0, 2f \n" -+ " memb \n" -+ " br 3f \n" -+ "2: mov 1, %0 \n" -+ "3: \n" -+ :"=&r"(_res), "+m"(*lock),"=&r"(tmp) -+ : -+ :"memory", "0"); -+ return (int)_res; -+} -+ -+#define S_UNLOCK(lock) \ -+ do { \ -+ __asm__ __volatile__("memb \n"); \ -+ *((volatile slock_t*)(lock)) = 0; \ -+ } while (0) -+#endif -+/* end */ -+ - #if defined(__alpha) || defined(__alpha__) /* Alpha */ - /* - * Correct multi-processor locking methods are explained in section 5.5.3 -diff --git a/openGauss-server-2.1.0/src/include/utils/atomic.h b/openGauss-server-2.1.0/src/include/utils/atomic.h -index 510a695..c64ec40 100644 ---- a/openGauss-server-2.1.0/src/include/utils/atomic.h -+++ b/openGauss-server-2.1.0/src/include/utils/atomic.h -@@ -504,6 +504,9 @@ static inline uint128_u atomic_compare_and_swap_u128( - { - #ifdef __aarch64__ - return arm_compare_and_swap_u128(ptr, oldval, newval); -+#elif defined(__sw_64__) -+ uint128_u ret; -+ return ret; - #else - uint128_u ret; - ret.u128 = __sync_val_compare_and_swap(&ptr->u128, oldval.u128, newval.u128); -diff --git a/openGauss-server-2.1.0/src/test/regress/pg_regress.cpp b/openGauss-server-2.1.0/src/test/regress/pg_regress.cpp -index 859d430..42f0590 100644 ---- a/openGauss-server-2.1.0/src/test/regress/pg_regress.cpp -+++ b/openGauss-server-2.1.0/src/test/regress/pg_regress.cpp -@@ -6589,6 +6589,10 @@ int regression_main(int argc, char* argv[], init_function ifunc, test_function t - (void)snprintf(pgbenchdir, MAXPGPATH, "%s/%s", ".", "data/pgbench/x86_64"); - #elif defined (__aarch64__) - (void)snprintf(pgbenchdir, MAXPGPATH, "%s/%s", ".", "data/pgbench/aarch64"); -+/* modify by yjy */ -+#elif defined (__sw_64__) -+ (void)snprintf(pgbenchdir, MAXPGPATH, "%s/%s", ".", "data/pgbench/sw_64"); -+/* endif */ - #endif - - /* Check thread local varieble's num */ -diff --git a/protobuf-3.11.3/cmake/CMakeLists.txt b/protobuf-3.11.3/cmake/CMakeLists.txt -index 8e5e680..f3b7046 100644 ---- a/protobuf-3.11.3/cmake/CMakeLists.txt -+++ b/protobuf-3.11.3/cmake/CMakeLists.txt -@@ -138,7 +138,8 @@ set(protobuf_LINK_LIBATOMIC false) - if (NOT MSVC) - include(CheckCXXSourceCompiles) - set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS}) -- set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS} -std=c++11) -+ #set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS} -std=c++11) -+ set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS} -std=gnu++11) - check_cxx_source_compiles(" - #include - int main() { -diff --git a/protobuf-3.11.3/kokoro/release/protoc/linux/build.sh b/protobuf-3.11.3/kokoro/release/protoc/linux/build.sh -index d165a89..cf13b49 100755 ---- a/protobuf-3.11.3/kokoro/release/protoc/linux/build.sh -+++ b/protobuf-3.11.3/kokoro/release/protoc/linux/build.sh -@@ -19,6 +19,8 @@ git submodule update --init --recursive - sudo apt install -y g++-aarch64-linux-gnu - protoc-artifacts/build-protoc.sh linux aarch_64 protoc - -+protoc-artifacts/build-protoc.sh linux sw_64 protoc -+ - sudo apt install -y g++-powerpc64le-linux-gnu - protoc-artifacts/build-protoc.sh linux ppcle_64 protoc - -diff --git a/protobuf-3.11.3/protoc-artifacts/build-protoc.sh b/protobuf-3.11.3/protoc-artifacts/build-protoc.sh -index 6ad2ea1..268a3e3 100755 ---- a/protobuf-3.11.3/protoc-artifacts/build-protoc.sh -+++ b/protobuf-3.11.3/protoc-artifacts/build-protoc.sh -@@ -11,6 +11,7 @@ - # cygwin windows x86_32 Requires: i686-w64-mingw32-gcc - # cygwin windows x86_64 Requires: x86_64-w64-mingw32-gcc - # linux linux aarch_64 Requires: g++-aarch64-linux-gnu -+# linux linux sw_64 - # linux linux x86_32 - # linux linux x86_64 - # linux windows x86_32 Requires: i686-w64-mingw32-gcc -@@ -162,6 +163,9 @@ checkDependencies () - elif [[ "$ARCH" == aarch_64 ]]; then - dump_cmd='objdump -p '"$1"' | grep NEEDED' - white_list="libpthread\.so\.0\|libm\.so\.6\|libc\.so\.6\|ld-linux-aarch64\.so\.1" -+ elif [[ "$ARCH" == sw_64 ]]; then -+ dump_cmd='objdump -p '"$1"' | grep NEEDED' -+ white_list="libpthread\.so\.0\|libm\.so\.6\.1\|libc\.so\.6\.1\|ld-linux\.so\.2" - fi - elif [[ "$OS" == osx ]]; then - dump_cmd='otool -L '"$1"' | fgrep dylib' -@@ -223,6 +227,8 @@ elif [[ "$(uname)" == Linux* ]]; then - CXXFLAGS="$CXXFLAGS -m32" - elif [[ "$ARCH" == aarch_64 ]]; then - CONFIGURE_ARGS="$CONFIGURE_ARGS --host=aarch64-linux-gnu" -+ elif [[ "$ARCH" == sw_64 ]]; then -+ CONFIGURE_ARGS="$CONFIGURE_ARGS --host=sw_64-linux-gnu" - elif [[ "$ARCH" == ppcle_64 ]]; then - CXXFLAGS="$CXXFLAGS -m64" - CONFIGURE_ARGS="$CONFIGURE_ARGS --host=powerpc64le-linux-gnu" -diff --git a/protobuf-3.11.3/src/google/protobuf/stubs/platform_macros.h b/protobuf-3.11.3/src/google/protobuf/stubs/platform_macros.h -index ce1b1e3..fd482f9 100644 ---- a/protobuf-3.11.3/src/google/protobuf/stubs/platform_macros.h -+++ b/protobuf-3.11.3/src/google/protobuf/stubs/platform_macros.h -@@ -56,6 +56,9 @@ - #elif defined(__aarch64__) - #define GOOGLE_PROTOBUF_ARCH_AARCH64 1 - #define GOOGLE_PROTOBUF_ARCH_64_BIT 1 -+#elif defined(__sw_64__) -+#define GOOGLE_PROTOBUF_ARCH_SW_64 1 -+#define GOOGLE_PROTOBUF_ARCH_64_BIT 1 - #elif defined(__mips__) - #if defined(__LP64__) - #define GOOGLE_PROTOBUF_ARCH_MIPS64 1 -diff --git a/zlib-1.2.11/configure b/zlib-1.2.11/configure -index e974d1f..027ba8c 100755 ---- a/zlib-1.2.11/configure -+++ b/zlib-1.2.11/configure -@@ -391,13 +391,13 @@ tryboth() - cat > $test.c << EOF - int foo() { return 0; } - EOF --echo "Checking for obsessive-compulsive compiler options..." >> configure.log --if try $CC -c $CFLAGS $test.c; then -- : --else -- echo "Compiler error reporting is too harsh for $0 (perhaps remove -Werror)." | tee -a configure.log -- leave 1 --fi -+#echo "Checking for obsessive-compulsive compiler options..." >> configure.log -+#if try $CC -c $CFLAGS $test.c; then -+# : -+#else -+# echo "Compiler error reporting is too harsh for $0 (perhaps remove -Werror)." | tee -a configure.log -+# leave 1 -+#fi - - echo >> configure.log - --- -2.27.0 - diff --git a/cJSON-1.7.15.tar.gz b/cJSON-1.7.15.tar.gz deleted file mode 100644 index bc92023d9fcc421fd2c8fefd0cba740c6b25f8ab..0000000000000000000000000000000000000000 Binary files a/cJSON-1.7.15.tar.gz and /dev/null differ diff --git a/clonecode.sh b/clonecode.sh index 530963f6fa95aff170f81d1da5dfffae843e2766..212a5eefc446c143cdecf520e50622020c7dc9b6 100644 --- a/clonecode.sh +++ b/clonecode.sh @@ -1,9 +1,12 @@ -version=5.0.1 +current_dir=$(pwd) +cd $current_dir +version=6.0.0 server_repo=https://gitee.com/opengauss/openGauss-server.git plugin_repo=https://gitee.com/opengauss/Plugin.git -git clone $server_repo -b v5.0.1 openGauss-server-$version -git clone $plugin_repo -b v5.0.1 Plugin-$version +git clone $server_repo -b v6.0.0 openGauss-server-$version +git clone $plugin_repo -b v6.0.0 Plugin-$version cp -rf Plugin-$version/contrib/* openGauss-server-$version/contrib/ +rm -rf openGauss-server-$version/contrib/datavec cd openGauss-server-$version gitcommit=$(git log 2>/dev/null | grep commit | head -1 | awk '{print $2}' | cut -b 1-8) echo $gitcommit > ../COMMIT diff --git a/cmake_compile.patch b/cmake_compile.patch deleted file mode 100644 index 7db4e2b1b0be40b55e1f2043541ec43ffa77f630..0000000000000000000000000000000000000000 --- a/cmake_compile.patch +++ /dev/null @@ -1,335 +0,0 @@ -diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' openGauss-server-5.0.1/cmake/src/set_thirdparty_path.cmake openGauss-server-5.0.1-edit/cmake/src/set_thirdparty_path.cmake -*** openGauss-server-5.0.1/cmake/src/set_thirdparty_path.cmake 2024-05-07 20:16:38.988794109 +0800 ---- openGauss-server-5.0.1-edit/cmake/src/set_thirdparty_path.cmake 2024-05-09 14:15:39.965184154 +0800 -*************** -*** 158,163 **** ---- 158,165 ---- - - if(${WITH_OPENEULER_OS} STREQUAL "ON") - set(SECURE_C_CHECK boundscheck) -+ elseif(${ENABLE_OPENEULER_MAJOR} STREQUAL "ON") -+ set(SECURE_C_CHECK boundscheck) - else() - set(SECURE_C_CHECK securec) - endif() -diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' openGauss-server-5.0.1/src/CMakeLists.txt openGauss-server-5.0.1-edit/src/CMakeLists.txt -*** openGauss-server-5.0.1/src/CMakeLists.txt 2024-05-07 20:16:39.156795348 +0800 ---- openGauss-server-5.0.1-edit/src/CMakeLists.txt 2024-05-09 15:36:33.381689446 +0800 -*************** -*** 192,198 **** - endif() - - if("${ENABLE_MULTIPLE_NODES}" STREQUAL "OFF") -! install(DIRECTORY ${DCF_LIB_PATH} DESTINATION .) - endif() - if(${ENABLE_MULTIPLE_NODES}_${ENABLE_PRIVATEGAUSS} STREQUAL OFF_OFF AND NOT ${ENABLE_LITE_MODE} STREQUAL ON) - if(EXISTS ${DMS_LIB_PATH}) ---- 192,200 ---- - endif() - - if("${ENABLE_MULTIPLE_NODES}" STREQUAL "OFF") -! if(EXISTS ${DCF_LIB_PATH}) -! install(DIRECTORY ${DCF_LIB_PATH} DESTINATION .) -! endif() - endif() - if(${ENABLE_MULTIPLE_NODES}_${ENABLE_PRIVATEGAUSS} STREQUAL OFF_OFF AND NOT ${ENABLE_LITE_MODE} STREQUAL ON) - if(EXISTS ${DMS_LIB_PATH}) -*************** -*** 206,218 **** - endif() - endif() - -- install(DIRECTORY ${ZSTD_LIB_PATH} DESTINATION . PATTERN "*.a" EXCLUDE) - if(NOT "${ENABLE_LITE_MODE}" STREQUAL "ON") - install(DIRECTORY ${LIBOBS_LIB_PATH} DESTINATION .) - install(DIRECTORY ${LIBOBS_INCLUDE_PATH} DESTINATION include/postgresql/server/access/obs) - endif() -! install(DIRECTORY ${CJSON_LIB_PATH} DESTINATION .) -! install(DIRECTORY ${CJSON_INCLUDE_PATH}/cjson DESTINATION include/postgresql/server) - if(NOT ${ENABLE_LITE_MODE} STREQUAL ON) - install(DIRECTORY ${ETCD_BIN_PATH} DESTINATION .) - install(DIRECTORY ${IPERF_LIB_PATH} DESTINATION .) ---- 208,218 ---- - endif() - endif() - - if(NOT "${ENABLE_LITE_MODE}" STREQUAL "ON") - install(DIRECTORY ${LIBOBS_LIB_PATH} DESTINATION .) - install(DIRECTORY ${LIBOBS_INCLUDE_PATH} DESTINATION include/postgresql/server/access/obs) - endif() -! - if(NOT ${ENABLE_LITE_MODE} STREQUAL ON) - install(DIRECTORY ${ETCD_BIN_PATH} DESTINATION .) - install(DIRECTORY ${IPERF_LIB_PATH} DESTINATION .) -*************** -*** 222,242 **** - install(DIRECTORY ${KMC_LIB_PATH} DESTINATION .) - endif() - endif() -- install(DIRECTORY ${LIBCURL_LIB_PATH} DESTINATION .) - if(NOT "${ENABLE_LITE_MODE}" STREQUAL "ON") - install(DIRECTORY ${KERBEROS_SBIN_PATH}/ DESTINATION bin) - install(DIRECTORY ${KERBEROS_BIN_PATH} DESTINATION .) - install(DIRECTORY ${KERBEROS_LIB_PATH} DESTINATION .) - endif() -! install(DIRECTORY ${LZ4_LIB_PATH} DESTINATION .) -! install(DIRECTORY ${LZ4_BIN_PATH} DESTINATION .) -! install(DIRECTORY ${LIBOPENSSL_BIN_PATH} DESTINATION .) -! install(DIRECTORY ${LIBOPENSSL_LIB_PATH} DESTINATION . PATTERN "*.a" EXCLUDE ) - install(DIRECTORY ${ZLIB_LIB_PATH} DESTINATION . FILES_MATCHING PATTERN "libz.*") - - list(FIND MACRO_OPTIONS "-D__USE_NUMA" RET_NUMA) - if(NOT ${RET_NUMA} EQUAL -1) -! install(DIRECTORY ${NUMA_LIB_PATH} DESTINATION .) - endif() - - if("${ENABLE_MOT}" STREQUAL "ON") ---- 222,240 ---- - install(DIRECTORY ${KMC_LIB_PATH} DESTINATION .) - endif() - endif() - if(NOT "${ENABLE_LITE_MODE}" STREQUAL "ON") - install(DIRECTORY ${KERBEROS_SBIN_PATH}/ DESTINATION bin) - install(DIRECTORY ${KERBEROS_BIN_PATH} DESTINATION .) - install(DIRECTORY ${KERBEROS_LIB_PATH} DESTINATION .) - endif() -! - install(DIRECTORY ${ZLIB_LIB_PATH} DESTINATION . FILES_MATCHING PATTERN "libz.*") - - list(FIND MACRO_OPTIONS "-D__USE_NUMA" RET_NUMA) - if(NOT ${RET_NUMA} EQUAL -1) -! if(EXISTS ${NUMA_LIB_PATH}) -! install(DIRECTORY ${NUMA_LIB_PATH} DESTINATION .) -! endif() - endif() - - if("${ENABLE_MOT}" STREQUAL "ON") -*************** -*** 251,261 **** - install(CODE "message(\"-- Created symlink: libatomic.so.1 -> libatomic.so.1.2.0\")") - endif() - -- install(FILES ${SECUREDYNAMICLIB_HOME}/libsecurec.so DESTINATION lib) -- install(FILES ${BUILDTOOLS_PATH}/gcc7.3/gcc/lib64/libgcc_s.so.1 DESTINATION lib) -- install(FILES ${BUILDTOOLS_PATH}/gcc7.3/gcc/lib64/libgomp.so DESTINATION lib) -- install(FILES ${BUILDTOOLS_PATH}/gcc7.3/gcc/lib64/libgomp.so.1 DESTINATION lib) -- install(FILES ${BUILDTOOLS_PATH}/gcc7.3/gcc/lib64/libgomp.so.1.0.0 DESTINATION lib) - install(FILES ${XGBOOST_LIB_PATH}/libxgboost.so DESTINATION lib) - if(NOT "${ENABLE_LITE_MODE}" STREQUAL "ON") - install(FILES ${PLJAVA_HOME}/lib/libpljava.so DESTINATION lib) ---- 249,254 ---- -*************** -*** 273,295 **** - install(DIRECTORY ${GCC_LIB_PATH}/lib64/ DESTINATION lib - FILES_MATCHING PATTERN "libatomic.so*") - endif() -- -- install(FILES ${GCC_LIB_PATH}/lib64/libgcc_s.so.1 DESTINATION lib) -- install(DIRECTORY ${GCC_LIB_PATH}/lib64/ DESTINATION lib -- FILES_MATCHING PATTERN "libgomp.so*") -- -- install(CODE "execute_process( -- COMMAND cp ${GCC_LIB_PATH}/lib64/libstdc++.so.6.0.24 ${prefix_home}/lib/libstdc++.so.6 -- WORKING_DIRECTORY ${prefix_home}/lib)" -- ) -- -- # install(DIRECTORY ${LIBCGROUP_LIB_PATH} DESTINATION . FILES_MATCHING PATTERN "libcgroup.so*") -- install(CODE "execute_process( -- COMMAND cp ${LIBCGROUP_LIB_PATH}/libcgroup.so.1.0.42 ${prefix_home}/lib/libcgroup.so -- COMMAND ln -fs libcgroup.so libcgroup.so.1 -- WORKING_DIRECTORY ${prefix_home}/lib)" -- ) -- install(CODE "message(\"-- Created symlink: libcgroup.so.1 -> libcgroup.so\")") - - # fastcheck part - install(FILES ${PROJECT_SRC_DIR}/test/regress/stub/roach_api_stub/roach_api_stub.control ---- 266,271 ---- -diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' openGauss-server-5.0.1/src/common/interfaces/libpq/CMakeLists.txt openGauss-server-5.0.1-edit/src/common/interfaces/libpq/CMakeLists.txt -*** openGauss-server-5.0.1/src/common/interfaces/libpq/CMakeLists.txt 2024-05-07 20:16:39.540798180 +0800 ---- openGauss-server-5.0.1-edit/src/common/interfaces/libpq/CMakeLists.txt 2024-05-09 14:15:40.525188303 +0800 -*************** -*** 118,129 **** - set(pq_LINK_OPTIONS ${LIB_LINK_OPTIONS}) - add_shared_libtarget(pq TGT_pq_SRC TGT_pq_INC "${pq_DEF_OPTIONS}" "${pq_COMPILE_OPTIONS}" "${pq_LINK_OPTIONS}") - if(NOT "${ENABLE_LITE_MODE}" STREQUAL "ON") -! target_link_libraries(pq PRIVATE com_err_gauss crypto gssapi_krb5_gauss gssrpc_gauss k5crypto_gauss krb5_gauss krb5support_gauss securec ssl) - else() -! target_link_libraries(pq PRIVATE crypto securec ssl) - endif() - target_link_directories(pq PUBLIC -! ${LIBOPENSSL_LIB_PATH} ${KERBEROS_LIB_PATH} ${SECURE_LIB_PATH} - ${PROJECT_SRC_DIR}/common/port ${PROJECT_SRC_DIR}/gstrace/common - ) - set_target_properties(pq PROPERTIES VERSION 5.5) ---- 118,129 ---- - set(pq_LINK_OPTIONS ${LIB_LINK_OPTIONS}) - add_shared_libtarget(pq TGT_pq_SRC TGT_pq_INC "${pq_DEF_OPTIONS}" "${pq_COMPILE_OPTIONS}" "${pq_LINK_OPTIONS}") - if(NOT "${ENABLE_LITE_MODE}" STREQUAL "ON") -! target_link_libraries(pq PRIVATE com_err_gauss crypto gssapi_krb5_gauss gssrpc_gauss k5crypto_gauss krb5_gauss krb5support_gauss ${SECURE_C_CHECK} ssl) - else() -! target_link_libraries(pq PRIVATE crypto ${SECURE_C_CHECK} ssl) - endif() - target_link_directories(pq PUBLIC -! ${LIBOPENSSL_LIB_PATH} ${KERBEROS_LIB_PATH} - ${PROJECT_SRC_DIR}/common/port ${PROJECT_SRC_DIR}/gstrace/common - ) - set_target_properties(pq PROPERTIES VERSION 5.5) -*************** -*** 302,308 **** - endif() - add_dependencies(pq_ce libpq_ce cmk_entity_manager_hooks encryption_hooks client_logic_common client_logic_expressions client_logic_cache client_logic_processor client_logic_fmt client_logic_hooks client_logic_data_fetcher frontend_parser) - target_link_directories(pq_ce PUBLIC -- ${SECURE_LIB_PATH} - ${KMC_LIB_PATH} - ${LIBOPENSSL_LIB_PATH} - ${CJSON_LIB_PATH} ---- 302,307 ---- -diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' openGauss-server-5.0.1/src/gausskernel/cbb/communication/libcomm_utils/libcomm_thread.cpp openGauss-server-5.0.1-edit/src/gausskernel/cbb/communication/libcomm_utils/libcomm_thread.cpp -*** openGauss-server-5.0.1/src/gausskernel/cbb/communication/libcomm_utils/libcomm_thread.cpp 2024-05-07 20:16:39.608798681 +0800 ---- openGauss-server-5.0.1-edit/src/gausskernel/cbb/communication/libcomm_utils/libcomm_thread.cpp 2024-05-07 20:17:58.873383188 +0800 -*************** -*** 2417,2423 **** - #else - switch ((comm_sender_flower_pid = fork_process())) { - #endif -! case -1: - ereport(LOG, (errmsg("could not fork comm sender flower process: %m"))); - return 0; - #ifndef EXEC_BACKEND ---- 2417,2423 ---- - #else - switch ((comm_sender_flower_pid = fork_process())) { - #endif -! case (ThreadId)-1: - ereport(LOG, (errmsg("could not fork comm sender flower process: %m"))); - return 0; - #ifndef EXEC_BACKEND -*************** -*** 2454,2460 **** - #else - switch ((comm_receiver_flower_pid = fork_process())) { - #endif -! case -1: - ereport(LOG, (errmsg("could not fork comm sender flower process: %m"))); - return 0; - #ifndef EXEC_BACKEND ---- 2454,2460 ---- - #else - switch ((comm_receiver_flower_pid = fork_process())) { - #endif -! case (ThreadId)-1: - ereport(LOG, (errmsg("could not fork comm sender flower process: %m"))); - return 0; - #ifndef EXEC_BACKEND -*************** -*** 2488,2494 **** - #else - switch ((comm_auxiliary_pid = fork_process())) { - #endif -! case -1: - ereport(LOG, (errmsg("could not fork comm auxiliary flower process: %m"))); - return 0; - #ifndef EXEC_BACKEND ---- 2488,2494 ---- - #else - switch ((comm_auxiliary_pid = fork_process())) { - #endif -! case (ThreadId)-1: - ereport(LOG, (errmsg("could not fork comm auxiliary flower process: %m"))); - return 0; - #ifndef EXEC_BACKEND -*************** -*** 2522,2528 **** - switch ((comm_receiver_pid = fork_process())) - #endif - { -! case -1: - ereport(LOG, (errmsg("could not fork comm receiver process: %m"))); - return 0; - #ifndef EXEC_BACKEND ---- 2522,2528 ---- - switch ((comm_receiver_pid = fork_process())) - #endif - { -! case (ThreadId)-1: - ereport(LOG, (errmsg("could not fork comm receiver process: %m"))); - return 0; - #ifndef EXEC_BACKEND -diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' openGauss-server-5.0.1/src/gausskernel/storage/smgr/smgr.cpp openGauss-server-5.0.1-edit/src/gausskernel/storage/smgr/smgr.cpp -*** openGauss-server-5.0.1/src/gausskernel/storage/smgr/smgr.cpp 2024-05-07 20:16:39.940801129 +0800 ---- openGauss-server-5.0.1-edit/src/gausskernel/storage/smgr/smgr.cpp 2024-05-07 20:17:59.201385607 +0800 -*************** -*** 949,955 **** - return convertScalarToDatumT; - } - default: { -! return convertScalarToDatumT<-2>; - } - } - } ---- 949,955 ---- - return convertScalarToDatumT; - } - default: { -! return convertScalarToDatumT<((Oid)-2)>; - } - } - } -diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' Plugin-5.0.1/contrib/dolphin/cmake.sh Plugin-5.0.1-edit/contrib/dolphin/cmake.sh -*** Plugin-5.0.1/contrib/dolphin/cmake.sh 2024-06-12 20:17:51.731405913 +0800 ---- Plugin-5.0.1-edit/contrib/dolphin/cmake.sh 2024-06-12 20:43:24.223308216 +0800 -*************** -*** 1,5 **** - #!/bin/bash -! CMAKE_OPT="-DENABLE_MULTIPLE_NODES=OFF -DENABLE_PRIVATEGAUSS=OFF -DENABLE_THREAD_SAFETY=ON -DENABLE_LITE_MODE=ON" - cpus_num=$(grep -w processor /proc/cpuinfo|wc -l) - rm -f dolphin--1.0.sql - touch dolphin--1.0.sql ---- 1,5 ---- - #!/bin/bash -! CMAKE_OPT="-DENABLE_MULTIPLE_NODES=OFF -DENABLE_PRIVATEGAUSS=OFF -DENABLE_THREAD_SAFETY=ON -DENABLE_LITE_MODE=ON -DENABLE_OPENEULER_MAJOR=ON -DWITH_OPENEULER_OS=ON" - cpus_num=$(grep -w processor /proc/cpuinfo|wc -l) - rm -f dolphin--1.0.sql - touch dolphin--1.0.sql -*************** -*** 9,14 **** ---- 9,15 ---- - touch dolphin--1.2.sql - cat dolphin--1.0.sql >> dolphin--1.2.sql - cat upgrade_script/dolphin--1.0--1.2.sql >> dolphin--1.2.sql -+ BUILD_TUPLE=$(uname -p) - cp llvmir/openGauss_expr_dolphin_${BUILD_TUPLE}.ir openGauss_expr_dolphin.ir - DOLPHIN_CMAKE_BUILD_DIR=`pwd`/tmp_build - [ -d "${DOLPHIN_CMAKE_BUILD_DIR}" ] && rm -rf ${DOLPHIN_CMAKE_BUILD_DIR} -diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' openGauss-server-5.0.1/src/bin/pg_ctl/backup.cpp openGauss-server-5.0.1-edit/src/bin/pg_ctl/backup.cpp -*** openGauss-server-5.0.1/src/bin/pg_ctl/backup.cpp 2024-05-09 14:48:32.000000000 +0800 ---- openGauss-server-5.0.1-edit/src/bin/pg_ctl/backup.cpp 2024-06-19 16:22:57.390413059 +0800 -*************** -*** 1939,1945 **** - } - while (1) { - de = readdir(dir); -! if (de <= 0) { - break; - } - if (strcmp(de->d_name, ".") == 0 || strcmp(de->d_name, "..") == 0) { ---- 1939,1945 ---- - } - while (1) { - de = readdir(dir); -! if (de == NULL) { - break; - } - if (strcmp(de->d_name, ".") == 0 || strcmp(de->d_name, "..") == 0) { -*************** -*** 2799,2802 **** - /* free sysidentifier after use */ - pg_free(sysidentifier); - sysidentifier = NULL; -! } -\ No newline at end of file ---- 2799,2802 ---- - /* free sysidentifier after use */ - pg_free(sysidentifier); - sysidentifier = NULL; -! } diff --git a/compile_2309.patch b/compile_2309.patch deleted file mode 100644 index fdca4ccca361ed9408516f1e21472b447097d528..0000000000000000000000000000000000000000 --- a/compile_2309.patch +++ /dev/null @@ -1,39 +0,0 @@ -diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' openGauss-server-5.0.1/src/bin/pg_basebackup/pg_basebackup.cpp openGauss-server-5.0.1-edit/src/bin/pg_basebackup/pg_basebackup.cpp -*** openGauss-server-5.0.1/src/bin/pg_basebackup/pg_basebackup.cpp 2024-05-07 20:16:39.176795495 +0800 ---- openGauss-server-5.0.1-edit/src/bin/pg_basebackup/pg_basebackup.cpp 2024-05-07 20:17:58.441380003 +0800 -*************** -*** 1622,1628 **** - struct dirent* ent; - while (1) { - ent = readdir(dir); -! if (ent <= 0) { - break; - } - if ((strcmp(".", ent->d_name) == 0) || (strcmp("..", ent->d_name) == 0)) { ---- 1622,1628 ---- - struct dirent* ent; - while (1) { - ent = readdir(dir); -! if (ent == NULL) { - break; - } - if ((strcmp(".", ent->d_name) == 0) || (strcmp("..", ent->d_name) == 0)) { -diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' openGauss-server-5.0.1/src/gausskernel/runtime/opfusion/opfusion_util.cpp openGauss-server-5.0.1-edit/src/gausskernel/runtime/opfusion/opfusion_util.cpp -*** openGauss-server-5.0.1/src/gausskernel/runtime/opfusion/opfusion_util.cpp 2024-05-07 20:16:39.780799949 +0800 ---- openGauss-server-5.0.1-edit/src/gausskernel/runtime/opfusion/opfusion_util.cpp 2024-05-07 20:17:59.041384427 +0800 -*************** -*** 424,430 **** - - /* check whether to have order by */ - if (node->aggstrategy != AGG_PLAIN || -! node->groupingSets > 0) { - return NOBYPASS_NOT_PLAIN_AGG; - } - ---- 424,430 ---- - - /* check whether to have order by */ - if (node->aggstrategy != AGG_PLAIN || -! node->groupingSets != NIL) { - return NOBYPASS_NOT_PLAIN_AGG; - } diff --git a/dmlc-core-v0.5.tar.gz b/dmlc-core-v0.5.tar.gz index 4ae14b2d186bef195e0c7162d0ac0ffd24da029a..c9a3dd5cde7372207f7e3213a2f863150e472965 100644 Binary files a/dmlc-core-v0.5.tar.gz and b/dmlc-core-v0.5.tar.gz differ diff --git a/krb-configure b/krb-configure new file mode 100644 index 0000000000000000000000000000000000000000..50e4bd874a433573eb662cbf35dcb0cfa6762be0 --- /dev/null +++ b/krb-configure @@ -0,0 +1,17358 @@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.71 for Kerberos 5 1.18.3. +# +# Report bugs to . +# +# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009 +# Massachusetts Institute of Technology. +# +# +# +# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation, +# Inc. +# +# +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +as_nop=: +if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 +then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else $as_nop + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + + +# Reset variables that may have inherited troublesome values from +# the environment. + +# IFS needs to be set, to space, tab, and newline, in precisely that order. +# (If _AS_PATH_WALK were called with IFS unset, it would have the +# side effect of setting IFS to empty, thus disabling word splitting.) +# Quoting is to prevent editors from complaining about space-tab. +as_nl=' +' +export as_nl +IFS=" "" $as_nl" + +PS1='$ ' +PS2='> ' +PS4='+ ' + +# Ensure predictable behavior from utilities with locale-dependent output. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# We cannot yet rely on "unset" to work, but we need these variables +# to be unset--not just set to an empty or harmless value--now, to +# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct +# also avoids known problems related to "unset" and subshell syntax +# in other old shells (e.g. bash 2.01 and pdksh 5.2.14). +for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH +do eval test \${$as_var+y} \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done + +# Ensure that fds 0, 1, and 2 are open. +if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi +if (exec 3>&2) ; then :; else exec 2>/dev/null; fi + +# The user is always right. +if ${PATH_SEPARATOR+false} :; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + test -r "$as_dir$0" && as_myself=$as_dir$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + + +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} +if test "x$CONFIG_SHELL" = x; then + as_bourne_compatible="as_nop=: +if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 +then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else \$as_nop + case \`(set -o) 2>/dev/null\` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi +" + as_required="as_fn_return () { (exit \$1); } +as_fn_success () { as_fn_return 0; } +as_fn_failure () { as_fn_return 1; } +as_fn_ret_success () { return 0; } +as_fn_ret_failure () { return 1; } + +exitcode=0 +as_fn_success || { exitcode=1; echo as_fn_success failed.; } +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } +if ( set x; as_fn_ret_success y && test x = \"\$1\" ) +then : + +else \$as_nop + exitcode=1; echo positional parameters were not saved. +fi +test x\$exitcode = x0 || exit 1 +blah=\$(echo \$(echo blah)) +test x\"\$blah\" = xblah || exit 1 +test -x / || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1" + if (eval "$as_required") 2>/dev/null +then : + as_have_required=yes +else $as_nop + as_have_required=no +fi + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null +then : + +else $as_nop + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + as_found=: + case $as_dir in #( + /*) + for as_base in sh bash ksh sh5; do + # Try only shells that exist, to save several forks. + as_shell=$as_dir$as_base + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null +then : + CONFIG_SHELL=$as_shell as_have_required=yes + if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null +then : + break 2 +fi +fi + done;; + esac + as_found=false +done +IFS=$as_save_IFS +if $as_found +then : + +else $as_nop + if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null +then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi +fi + + + if test "x$CONFIG_SHELL" != x +then : + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 +fi + + if test x$as_have_required = xno +then : + printf "%s\n" "$0: This script requires a shell more modern than all" + printf "%s\n" "$0: the shells that I found on your system." + if test ${ZSH_VERSION+y} ; then + printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should" + printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later." + else + printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and krb5-bugs@mit.edu +$0: about your system, including any error possibly output +$0: before this message. Then install a modern shell, or +$0: manually run the script under such a shell if you do +$0: have one." + fi + exit 1 +fi +fi +fi +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS + +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset + + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit +# as_fn_nop +# --------- +# Do nothing but, unlike ":", preserve the value of $?. +as_fn_nop () +{ + return $? +} +as_nop=as_fn_nop + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +printf "%s\n" X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null +then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else $as_nop + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null +then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else $as_nop + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + +# as_fn_nop +# --------- +# Do nothing but, unlike ":", preserve the value of $?. +as_fn_nop () +{ + return $? +} +as_nop=as_fn_nop + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + printf "%s\n" "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +printf "%s\n" X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + + + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + + +# Determine whether it's possible to make 'echo' print without a newline. +# These variables are no longer used directly by Autoconf, but are AC_SUBSTed +# for compatibility with existing Makefiles. +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +# For backward compatibility with old third-party macros, we provide +# the shell variables $as_echo and $as_echo_n. New code should use +# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. +as_echo='printf %s\n' +as_echo_n='printf %s' + + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -pR'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -pR' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -pR' + fi +else + as_ln_s='cp -pR' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +as_test_x='test -x' +as_executable_p=as_fn_executable_p + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +test -n "$DJDIR" || exec 7<&0 &1 + +# Name of the host. +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_clean_files= +ac_config_libobj_dir=. +LIBOBJS= +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= + +# Identity of this package. +PACKAGE_NAME='Kerberos 5' +PACKAGE_TARNAME='krb5' +PACKAGE_VERSION='1.18.3' +PACKAGE_STRING='Kerberos 5 1.18.3' +PACKAGE_BUGREPORT='krb5-bugs@mit.edu' +PACKAGE_URL='' + +ac_unique_file="aclocal.m4" +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#ifdef HAVE_STDIO_H +# include +#endif +#ifdef HAVE_STDLIB_H +# include +#endif +#ifdef HAVE_STRING_H +# include +#endif +#ifdef HAVE_INTTYPES_H +# include +#endif +#ifdef HAVE_STDINT_H +# include +#endif +#ifdef HAVE_STRINGS_H +# include +#endif +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_STAT_H +# include +#endif +#ifdef HAVE_UNISTD_H +# include +#endif" + +ac_header_c_list= +ac_subst_vars='LTLIBOBJS +DEFCKTNAME +DEFKTNAME +DEFCCNAME +OSX +GROFF +VERTO_VERSION +VERTO_LIBS +VERTO_CFLAGS +RL_LIBS +RL_CFLAGS +LIBEDIT_LIBS +LIBEDIT_CFLAGS +lmdb_plugin_dir +LMDB_LIBS +HAVE_LMDB +sam2_plugin +LDAP +ldap_plugin_dir +HAVE_SASL +LDAP_LIBS +SUPPORTLIB_MAJOR +DB_EXTRA_LIBS +HAVE_RESOLV_WRAPPER +CMOCKA_LIBS +HAVE_CMOCKA +HAVE_PYTHON +PYTHON +PYTHON_MINVERSION +HAVE_RUNTEST +LIBOBJS +PKINIT +PASS +GSSRPC__BSD_TYPEALIASES +GSSRPC__NETDB_H +GSSRPC__SYS_PARAM_H +GSSRPC__UNISTD_H +GSSRPC__SYS_TIME_H +GSSRPC__SYS_SELECT_H +rpcent_define +include_xom +RUNTEST +PRIOCNTL_HACK +DO_ALL +EXPECT +S_TOP +RBUILD +DO_TEST +have_PERL +have_RUNTEST +YFLAGS +YACC +NSLOOKUP +DIG +FCTSH +BASH +SH5 +SH +DO_TCL +KRB5_RCTMPDIR +SIZEOF_TIME_T +SETENVOBJ +KSU_LIBS +EXTRA_SUPPORT_SYMS +GETTIMEOFDAY_ST_OBJ +GETTIMEOFDAY_OBJ +MKSTEMP_ST_OBJ +MKSTEMP_OBJ +LEXLIB +LEX_OUTPUT_ROOT +LEX +ASAN +ASAN_FLAGS +KRB5_RUN_VARS +KRB5_RUN_ENV +AESNI_FLAGS +AESNI_OBJ +YASM +SPAKE_OPENSSL_LIBS +HAVE_SPAKE_OPENSSL +TLS_IMPL_LIBS +TLS_IMPL_CFLAGS +TLS_IMPL +PRNG_ALG +CRYPTO_IMPL_LIBS +CRYPTO_IMPL_CFLAGS +CRYPTO_IMPL +audit_plugin +AUDIT_IMPL_LIBS +AWK +SECURE_GETENV_INIT +SECURE_GETENV_ST_OBJ +SECURE_GETENV_OBJ +PRINTF_ST_OBJ +PRINTF_OBJ +FNMATCH_ST_OBJ +FNMATCH_OBJ +GETOPT_LONG_ST_OBJ +GETOPT_LONG_OBJ +GETOPT_ST_OBJ +GETOPT_OBJ +STRLCPY_ST_OBJ +STRLCPY_OBJ +po +MSGFMT +LIBUTIL +PROG_RPATH_FLAGS +RPATH_FLAG +CXX_LINK +CC_LINK +GEN_LIB +UNDEF_CHECK +MAKE_DYNOBJ_COMMAND +DYNOBJEXT +LIBINSTLIST +PFLIBEXT +DEPLIBEXT +SHLIBSEXT +SHLIBVEXT +SHLIBEXT +STLIBEXT +INSTALL_SHLIB +DYNOBJ_EXPFLAGS +DYNOBJ_EXPDEPS +SHLIB_EXPORT_FILE_DEP +SHLIB_EXPFLAGS +SHLIB_RPATH_FLAGS +MAKE_SHLIB_COMMAND +KDB5_PLUGIN_LIBS +KDB5_PLUGIN_DEPLIBS +PLUGININST +PLUGINLINK +PLUGIN +LIBLINKS +LIBLIST +PERL +AR +INSTALL_DATA +INSTALL_SCRIPT +INSTALL_PROGRAM +ARADD +ARCHIVE +RANLIB +LN_S +PROFFLAGS +PICFLAGS +PFOBJEXT +SHOBJEXT +STOBJEXT +OBJLISTS +TCL_MAYBE_RPATH +TCL_RPATH +TCL_LIBPATH +TCL_LIBS +TCL_INCLUDES +PKG_CONFIG_LIBDIR +PKG_CONFIG_PATH +PKG_CONFIG +KRB5_VERSION +DL_LIB +THREAD_SUPPORT +PTHREAD_CFLAGS +PTHREAD_LIBS +PTHREAD_CC +ax_pthread_config +EGREP +GREP +SED +krb5_cv_host +host_os +host_vendor +host_cpu +host +build_os +build_vendor +build_cpu +build +CONFIG_RELTOPDIR +MAINT +MAINTAINER_MODE_FALSE +MAINTAINER_MODE_TRUE +HESIOD_LIBS +HESIOD_DEFS +KDB5_DB_LIB +DB_HEADER_VERSION +DB_VERSION +DB_LIB +DB_HEADER +SS_VERSION +SS_LIB +COM_ERR_VERSION +compile_et +LD +CPP +WARN_CXXFLAGS +WARN_CFLAGS +HAVE_GCC +ac_ct_CXX +CXXFLAGS +CXX +OBJEXT +EXEEXT +ac_ct_CC +CPPFLAGS +LDFLAGS +CFLAGS +CC +EXTRA_FILES +SYSCONFCONF +target_alias +host_alias +build_alias +LIBS +ECHO_T +ECHO_N +ECHO_C +DEFS +mandir +localedir +libdir +psdir +pdfdir +dvidir +htmldir +infodir +docdir +oldincludedir +includedir +runstatedir +localstatedir +sharedstatedir +sysconfdir +datadir +datarootdir +libexecdir +sbindir +bindir +program_transform_name +prefix +exec_prefix +PACKAGE_URL +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL' +ac_subst_files='lib_frag +libobj_frag +libnover_frag +libpriv_frag +libnodeps_frag' +ac_user_opts=' +enable_option_checking +with_size_optimizations +with_system_et +with_system_ss +with_system_db +with_netlib +enable_dns_for_realm +with_hesiod +enable_maintainer_mode +with_ldap +enable_delayed_initialization +enable_thread_support +enable_static +enable_shared +enable_rpath +enable_profiled +with_tcl +enable_athena +enable_nls +with_vague_errors +enable_audit_plugin +with_crypto_impl +with_prng_alg +with_tls_impl +with_keyutils +with_spake_openssl +enable_aesni +enable_kdc_lookaside_cache +enable_asan +enable_pkinit +with_lmdb +with_libedit +with_readline +with_system_verto +with_krb5_config +' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +CXX +CXXFLAGS +CCC +CPP +LD +SS_LIB +DB_HEADER +DB_LIB +PKG_CONFIG +PKG_CONFIG_PATH +PKG_CONFIG_LIBDIR +YACC +YFLAGS +LIBEDIT_CFLAGS +LIBEDIT_LIBS +VERTO_CFLAGS +VERTO_LIBS +DEFCCNAME +DEFKTNAME +DEFCKTNAME' + + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +ac_unrecognized_opts= +ac_unrecognized_sep= +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datarootdir='${prefix}/share' +datadir='${datarootdir}' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +runstatedir='${localstatedir}/run' +includedir='${prefix}/include' +oldincludedir='/usr/include' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' + +ac_prev= +ac_dashdash= +for ac_option +do + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval $ac_prev=\$ac_option + ac_prev= + continue + fi + + case $ac_option in + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; + esac + + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir=$ac_optarg ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build_alias ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build_alias=$ac_optarg ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=*) + datadir=$ac_optarg ;; + + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + + -disable-* | --disable-*) + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: \`$ac_useropt'" + ac_useropt_orig=$ac_useropt + ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; + + -enable-* | --enable-*) + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: \`$ac_useropt'" + ac_useropt_orig=$ac_useropt + ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=\$ac_optarg ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix=$ac_optarg ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; + + -host | --host | --hos | --ho) + ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir=$ac_optarg ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir=$ac_optarg ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir=$ac_optarg ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir=$ac_optarg ;; + + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst | --locals) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + localstatedir=$ac_optarg ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir=$ac_optarg ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c | -n) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir=$ac_optarg ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix=$ac_optarg ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix=$ac_optarg ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix=$ac_optarg ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name=$ac_optarg ;; + + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -runstatedir | --runstatedir | --runstatedi | --runstated \ + | --runstate | --runstat | --runsta | --runst | --runs \ + | --run | --ru | --r) + ac_prev=runstatedir ;; + -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ + | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ + | --run=* | --ru=* | --r=*) + runstatedir=$ac_optarg ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir=$ac_optarg ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir=$ac_optarg ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site=$ac_optarg ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir=$ac_optarg ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir=$ac_optarg ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; + + -with-* | --with-*) + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: \`$ac_useropt'" + ac_useropt_orig=$ac_useropt + ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=\$ac_optarg ;; + + -without-* | --without-*) + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: \`$ac_useropt'" + ac_useropt_orig=$ac_useropt + ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=no ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes=$ac_optarg ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + case $ac_envvar in #( + '' | [0-9]* | *[!_$as_cr_alnum]* ) + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; + esac + eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2 + : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" + ;; + + esac +done + +if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + as_fn_error $? "missing argument to $ac_option" +fi + +if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; + *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + esac +fi + +# Check all directory arguments for consistency. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir runstatedir +do + eval ac_val=\$$ac_var + # Remove trailing slashes. + case $ac_val in + */ ) + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` + eval $ac_var=\$ac_val;; + esac + # Be sure to have absolute directory names. + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" +done + +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null + + +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + as_fn_error $? "working directory cannot be determined" +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + as_fn_error $? "pwd does not report name of working directory" + + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$as_myself" || +$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_myself" : 'X\(//\)[^/]' \| \ + X"$as_myself" : 'X\(//\)$' \| \ + X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || +printf "%s\n" X"$as_myself" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + srcdir=$ac_confdir + if test ! -r "$srcdir/$ac_unique_file"; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" +fi +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done + +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures Kerberos 5 1.18.3 to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking ...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] + +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. + +For better control, use the options below. + +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/krb5] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] +_ACEOF + + cat <<\_ACEOF + +Program names: + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM run sed PROGRAM on installed program names + +System types: + --build=BUILD configure for building on BUILD [guessed] + --host=HOST cross-compile to build programs to run on HOST [BUILD] +_ACEOF +fi + +if test -n "$ac_init_help"; then + case $ac_init_help in + short | recursive ) echo "Configuration of Kerberos 5 1.18.3:";; + esac + cat <<\_ACEOF + +Optional Features: + --disable-option-checking ignore unrecognized --enable/--with options + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --enable-dns-for-realm enable DNS lookups of Kerberos realm names + --enable-maintainer-mode + enable rebuilding of source files, Makefiles, etc + --disable-delayed-initialization + initialize library code when loaded [delay until + first use] + --disable-thread-support + don't enable thread support [enabled] + + --disable-rpath suppress run path flags in link lines + --enable-athena build with MIT Project Athena configuration + --disable-nls disable native language support + --enable-audit-plugin=IMPL + use audit plugin [ do not use audit ] + --disable-aesni Do not build with AES-NI support + --disable-kdc-lookaside-cache + Disable the cache which detects client retransmits + --enable-asan Build with asan memory checking + --disable-pkinit disable PKINIT plugin support + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-size-optimizations enable a few optimizations to reduce code size + possibly at some run-time cost + --with-system-et use system compile_et and -lcom_err [default: build + and install a local version] + --with-system-ss use system -lss and mk_cmds [private version] + --with-system-db use system Berkeley db [private version] + --with-netlib=LIBS use user defined resolver library + --with-hesiod=path compile with hesiod support [omitted] + --with-ldap compile OpenLDAP database backend module + --with-tcl=path where Tcl resides + --with-vague-errors Do not [do] send helpful errors to client + --with-crypto-impl=IMPL use specified crypto implementation [builtin] + --with-prng-alg=ALG use specified PRNG algorithm. [fortuna] + --with-tls-impl=IMPL use specified TLS implementation [auto] + --without-keyutils do not link with libkeyutils + --with-spake-openssl use OpenSSL for SPAKE preauth [auto] + --with-lmdb compile LMDB database backend module [auto] + --without-libedit do not compile with libedit + --with-readline compile with GNU Readline + --with-system-verto always use system verto library + --with-krb5-config=PATH path to existing krb5-config program for defaults + +Some influential environment variables: + CC C compiler command + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory + LIBS libraries to pass to the linker, e.g. -l + CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if + you have headers in a nonstandard directory + CXX C++ compiler command + CXXFLAGS C++ compiler flags + CPP C preprocessor + LD linker command [CC] + SS_LIB system libraries for 'ss' package [-lss] + DB_HEADER header file for system Berkeley db package [db.h] + DB_LIB library for system Berkeley db package [-ldb] + PKG_CONFIG path to pkg-config utility + PKG_CONFIG_PATH + directories to add to pkg-config's search path + PKG_CONFIG_LIBDIR + path overriding pkg-config's built-in search path + YACC The `Yet Another Compiler Compiler' implementation to use. + Defaults to the first program found out of: `bison -y', `byacc', + `yacc'. + YFLAGS The list of arguments that will be passed by default to $YACC. + This script will default YFLAGS to the empty string to avoid a + default value of `-d' given by some make applications. + LIBEDIT_CFLAGS + C compiler flags for LIBEDIT, overriding pkg-config + LIBEDIT_LIBS + linker flags for LIBEDIT, overriding pkg-config + VERTO_CFLAGS + C compiler flags for VERTO, overriding pkg-config + VERTO_LIBS linker flags for VERTO, overriding pkg-config + DEFCCNAME Default ccache name + DEFKTNAME Default keytab name + DEFCKTNAME Default client keytab name + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +Report bugs to . +_ACEOF +ac_status=$? +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d "$ac_dir" || + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || + continue + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for configure.gnu first; this name is used for a wrapper for + # Metaconfig's "Configure" on case-insensitive file systems. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive + else + printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } + done +fi + +test -n "$ac_init_help" && exit $ac_status +if $ac_init_version; then + cat <<\_ACEOF +Kerberos 5 configure 1.18.3 +generated by GNU Autoconf 2.71 + +Copyright (C) 2021 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. + +Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009 +Massachusetts Institute of Technology. + +_ACEOF + exit +fi + +## ------------------------ ## +## Autoconf initialization. ## +## ------------------------ ## + +# ac_fn_c_try_compile LINENO +# -------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest.beam + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +printf "%s\n" "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext +then : + ac_retval=0 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_compile + +# ac_fn_cxx_try_compile LINENO +# ---------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_cxx_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest.beam + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +printf "%s\n" "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext +then : + ac_retval=0 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_cxx_try_compile + +# ac_fn_c_try_cpp LINENO +# ---------------------- +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +printf "%s\n" "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } > conftest.i && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + } +then : + ac_retval=0 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_cpp + +# ac_fn_c_try_link LINENO +# ----------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +printf "%s\n" "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + test -x conftest$ac_exeext + } +then : + ac_retval=0 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_link + +# ac_fn_c_try_run LINENO +# ---------------------- +# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that +# executables *can* be run. +ac_fn_c_try_run () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +printf "%s\n" "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +printf "%s\n" "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; } +then : + ac_retval=0 +else $as_nop + printf "%s\n" "$as_me: program exited with status $ac_status" >&5 + printf "%s\n" "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=$ac_status +fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_run + +# ac_fn_c_check_func LINENO FUNC VAR +# ---------------------------------- +# Tests whether FUNC exists, setting the cache variable VAR accordingly +ac_fn_c_check_func () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +printf %s "checking for $2... " >&6; } +if eval test \${$3+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Define $2 to an innocuous variant, in case declares $2. + For example, HP-UX 11i declares gettimeofday. */ +#define $2 innocuous_$2 + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $2 (); below. */ + +#include +#undef $2 + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $2 (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$2 || defined __stub___$2 +choke me +#endif + +int +main (void) +{ +return $2 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + eval "$3=yes" +else $as_nop + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +fi +eval ac_res=\$$3 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_func + +# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists and can be compiled using the include files in +# INCLUDES, setting the cache variable VAR accordingly. +ac_fn_c_check_header_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +printf %s "checking for $2... " >&6; } +if eval test \${$3+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + eval "$3=yes" +else $as_nop + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +eval ac_res=\$$3 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_compile + +# ac_fn_c_check_type LINENO TYPE VAR INCLUDES +# ------------------------------------------- +# Tests whether TYPE exists after having included INCLUDES, setting cache +# variable VAR accordingly. +ac_fn_c_check_type () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +printf %s "checking for $2... " >&6; } +if eval test \${$3+y} +then : + printf %s "(cached) " >&6 +else $as_nop + eval "$3=no" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main (void) +{ +if (sizeof ($2)) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main (void) +{ +if (sizeof (($2))) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + +else $as_nop + eval "$3=yes" +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +eval ac_res=\$$3 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_type + +# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES +# ---------------------------------------------------- +# Tries to find if the field MEMBER exists in type AGGR, after including +# INCLUDES, setting cache variable VAR accordingly. +ac_fn_c_check_member () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 +printf %s "checking for $2.$3... " >&6; } +if eval test \${$4+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$5 +int +main (void) +{ +static $2 ac_aggr; +if (ac_aggr.$3) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + eval "$4=yes" +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$5 +int +main (void) +{ +static $2 ac_aggr; +if (sizeof ac_aggr.$3) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + eval "$4=yes" +else $as_nop + eval "$4=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +eval ac_res=\$$4 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_member + +# ac_fn_check_decl LINENO SYMBOL VAR INCLUDES EXTRA-OPTIONS FLAG-VAR +# ------------------------------------------------------------------ +# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR +# accordingly. Pass EXTRA-OPTIONS to the compiler, using FLAG-VAR. +ac_fn_check_decl () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + as_decl_name=`echo $2|sed 's/ *(.*//'` + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 +printf %s "checking whether $as_decl_name is declared... " >&6; } +if eval test \${$3+y} +then : + printf %s "(cached) " >&6 +else $as_nop + as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` + eval ac_save_FLAGS=\$$6 + as_fn_append $6 " $5" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main (void) +{ +#ifndef $as_decl_name +#ifdef __cplusplus + (void) $as_decl_use; +#else + (void) $as_decl_name; +#endif +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + eval "$3=yes" +else $as_nop + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + eval $6=\$ac_save_FLAGS + +fi +eval ac_res=\$$3 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_check_decl + +# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES +# -------------------------------------------- +# Tries to find the compile-time value of EXPR in a program that includes +# INCLUDES, setting VAR accordingly. Returns whether the value could be +# computed +ac_fn_c_compute_int () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main (void) +{ +static int test_array [1 - 2 * !(($2) >= 0)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_lo=0 ac_mid=0 + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main (void) +{ +static int test_array [1 - 2 * !(($2) <= $ac_mid)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_hi=$ac_mid; break +else $as_nop + as_fn_arith $ac_mid + 1 && ac_lo=$as_val + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + done +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main (void) +{ +static int test_array [1 - 2 * !(($2) < 0)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_hi=-1 ac_mid=-1 + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main (void) +{ +static int test_array [1 - 2 * !(($2) >= $ac_mid)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_lo=$ac_mid; break +else $as_nop + as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + done +else $as_nop + ac_lo= ac_hi= +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main (void) +{ +static int test_array [1 - 2 * !(($2) <= $ac_mid)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_hi=$ac_mid +else $as_nop + as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +done +case $ac_lo in #(( +?*) eval "$3=\$ac_lo"; ac_retval=0 ;; +'') ac_retval=1 ;; +esac + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +static long int longval (void) { return $2; } +static unsigned long int ulongval (void) { return $2; } +#include +#include +int +main (void) +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (($2) < 0) + { + long int i = longval (); + if (i != ($2)) + return 1; + fprintf (f, "%ld", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ($2)) + return 1; + fprintf (f, "%lu", i); + } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + echo >>conftest.val; read $3 config.log <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by Kerberos 5 $as_me 1.18.3, which was +generated by GNU Autoconf 2.71. Invocation command line was + + $ $0$ac_configure_args_raw + +_ACEOF +exec 5>>config.log +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + printf "%s\n" "PATH: $as_dir" + done +IFS=$as_save_IFS + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *\'*) + ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; + 2) + as_fn_append ac_configure_args1 " '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + as_fn_append ac_configure_args " '$ac_arg'" + ;; + esac + done +done +{ ac_configure_args0=; unset ac_configure_args0;} +{ ac_configure_args1=; unset ac_configure_args1;} + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +trap 'exit_status=$? + # Sanitize IFS. + IFS=" "" $as_nl" + # Save into config.log some information that might help in debugging. + { + echo + + printf "%s\n" "## ---------------- ## +## Cache variables. ## +## ---------------- ##" + echo + # The following way of writing the cache mishandles newlines in values, +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + (set) 2>&1 | + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + sed -n \ + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( + *) + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) + echo + + printf "%s\n" "## ----------------- ## +## Output variables. ## +## ----------------- ##" + echo + for ac_var in $ac_subst_vars + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + printf "%s\n" "$ac_var='\''$ac_val'\''" + done | sort + echo + + if test -n "$ac_subst_files"; then + printf "%s\n" "## ------------------- ## +## File substitutions. ## +## ------------------- ##" + echo + for ac_var in $ac_subst_files + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + printf "%s\n" "$ac_var='\''$ac_val'\''" + done | sort + echo + fi + + if test -s confdefs.h; then + printf "%s\n" "## ----------- ## +## confdefs.h. ## +## ----------- ##" + echo + cat confdefs.h + echo + fi + test "$ac_signal" != 0 && + printf "%s\n" "$as_me: caught signal $ac_signal" + printf "%s\n" "$as_me: exit $exit_status" + } >&5 + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status +' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -f -r conftest* confdefs.h + +printf "%s\n" "/* confdefs.h */" > confdefs.h + +# Predefined preprocessor variables. + +printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h + +printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h + +printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h + +printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h + +printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h + +printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h + + +# Let the site file select an alternate cache file if it wants to. +# Prefer an explicitly selected file to automatically selected ones. +if test -n "$CONFIG_SITE"; then + ac_site_files="$CONFIG_SITE" +elif test "x$prefix" != xNONE; then + ac_site_files="$prefix/share/config.site $prefix/etc/config.site" +else + ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" +fi + +for ac_site_file in $ac_site_files +do + case $ac_site_file in #( + */*) : + ;; #( + *) : + ac_site_file=./$ac_site_file ;; +esac + if test -f "$ac_site_file" && test -r "$ac_site_file"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" \ + || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5; } + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special files + # actually), so we avoid doing that. DJGPP emulates it as a regular file. + if test /dev/null != "$cache_file" && test -f "$cache_file"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +printf "%s\n" "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; + esac + fi +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +printf "%s\n" "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Test code for whether the C compiler supports C89 (global declarations) +ac_c_conftest_c89_globals=' +/* Does the compiler advertise C89 conformance? + Do not test the value of __STDC__, because some compilers set it to 0 + while being otherwise adequately conformant. */ +#if !defined __STDC__ +# error "Compiler does not advertise C89 conformance" +#endif + +#include +#include +struct stat; +/* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */ +struct buf { int x; }; +struct buf * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not \xHH hex character constants. + These do not provoke an error unfortunately, instead are silently treated + as an "x". The following induces an error, until -std is added to get + proper ANSI mode. Curiously \x00 != x always comes out true, for an + array size at least. It is necessary to write \x00 == 0 to get something + that is true only with -std. */ +int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) '\''x'\'' +int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int), + int, int);' + +# Test code for whether the C compiler supports C89 (body of main). +ac_c_conftest_c89_main=' +ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]); +' + +# Test code for whether the C compiler supports C99 (global declarations) +ac_c_conftest_c99_globals=' +// Does the compiler advertise C99 conformance? +#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L +# error "Compiler does not advertise C99 conformance" +#endif + +#include +extern int puts (const char *); +extern int printf (const char *, ...); +extern int dprintf (int, const char *, ...); +extern void *malloc (size_t); + +// Check varargs macros. These examples are taken from C99 6.10.3.5. +// dprintf is used instead of fprintf to avoid needing to declare +// FILE and stderr. +#define debug(...) dprintf (2, __VA_ARGS__) +#define showlist(...) puts (#__VA_ARGS__) +#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) +static void +test_varargs_macros (void) +{ + int x = 1234; + int y = 5678; + debug ("Flag"); + debug ("X = %d\n", x); + showlist (The first, second, and third items.); + report (x>y, "x is %d but y is %d", x, y); +} + +// Check long long types. +#define BIG64 18446744073709551615ull +#define BIG32 4294967295ul +#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) +#if !BIG_OK + #error "your preprocessor is broken" +#endif +#if BIG_OK +#else + #error "your preprocessor is broken" +#endif +static long long int bignum = -9223372036854775807LL; +static unsigned long long int ubignum = BIG64; + +struct incomplete_array +{ + int datasize; + double data[]; +}; + +struct named_init { + int number; + const wchar_t *name; + double average; +}; + +typedef const char *ccp; + +static inline int +test_restrict (ccp restrict text) +{ + // See if C++-style comments work. + // Iterate through items via the restricted pointer. + // Also check for declarations in for loops. + for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i) + continue; + return 0; +} + +// Check varargs and va_copy. +static bool +test_varargs (const char *format, ...) +{ + va_list args; + va_start (args, format); + va_list args_copy; + va_copy (args_copy, args); + + const char *str = ""; + int number = 0; + float fnumber = 0; + + while (*format) + { + switch (*format++) + { + case '\''s'\'': // string + str = va_arg (args_copy, const char *); + break; + case '\''d'\'': // int + number = va_arg (args_copy, int); + break; + case '\''f'\'': // float + fnumber = va_arg (args_copy, double); + break; + default: + break; + } + } + va_end (args_copy); + va_end (args); + + return *str && number && fnumber; +} +' + +# Test code for whether the C compiler supports C99 (body of main). +ac_c_conftest_c99_main=' + // Check bool. + _Bool success = false; + success |= (argc != 0); + + // Check restrict. + if (test_restrict ("String literal") == 0) + success = true; + char *restrict newvar = "Another string"; + + // Check varargs. + success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234); + test_varargs_macros (); + + // Check flexible array members. + struct incomplete_array *ia = + malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); + ia->datasize = 10; + for (int i = 0; i < ia->datasize; ++i) + ia->data[i] = i * 1.234; + + // Check named initializers. + struct named_init ni = { + .number = 34, + .name = L"Test wide string", + .average = 543.34343, + }; + + ni.number = 58; + + int dynamic_array[ni.number]; + dynamic_array[0] = argv[0][0]; + dynamic_array[ni.number - 1] = 543; + + // work around unused variable warnings + ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\'' + || dynamic_array[ni.number - 1] != 543); +' + +# Test code for whether the C compiler supports C11 (global declarations) +ac_c_conftest_c11_globals=' +// Does the compiler advertise C11 conformance? +#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L +# error "Compiler does not advertise C11 conformance" +#endif + +// Check _Alignas. +char _Alignas (double) aligned_as_double; +char _Alignas (0) no_special_alignment; +extern char aligned_as_int; +char _Alignas (0) _Alignas (int) aligned_as_int; + +// Check _Alignof. +enum +{ + int_alignment = _Alignof (int), + int_array_alignment = _Alignof (int[100]), + char_alignment = _Alignof (char) +}; +_Static_assert (0 < -_Alignof (int), "_Alignof is signed"); + +// Check _Noreturn. +int _Noreturn does_not_return (void) { for (;;) continue; } + +// Check _Static_assert. +struct test_static_assert +{ + int x; + _Static_assert (sizeof (int) <= sizeof (long int), + "_Static_assert does not work in struct"); + long int y; +}; + +// Check UTF-8 literals. +#define u8 syntax error! +char const utf8_literal[] = u8"happens to be ASCII" "another string"; + +// Check duplicate typedefs. +typedef long *long_ptr; +typedef long int *long_ptr; +typedef long_ptr long_ptr; + +// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1. +struct anonymous +{ + union { + struct { int i; int j; }; + struct { int k; long int l; } w; + }; + int m; +} v1; +' + +# Test code for whether the C compiler supports C11 (body of main). +ac_c_conftest_c11_main=' + _Static_assert ((offsetof (struct anonymous, i) + == offsetof (struct anonymous, w.k)), + "Anonymous union alignment botch"); + v1.i = 2; + v1.w.k = 5; + ok |= v1.i != 5; +' + +# Test code for whether the C compiler supports C11 (complete). +ac_c_conftest_c11_program="${ac_c_conftest_c89_globals} +${ac_c_conftest_c99_globals} +${ac_c_conftest_c11_globals} + +int +main (int argc, char **argv) +{ + int ok = 0; + ${ac_c_conftest_c89_main} + ${ac_c_conftest_c99_main} + ${ac_c_conftest_c11_main} + return ok; +} +" + +# Test code for whether the C compiler supports C99 (complete). +ac_c_conftest_c99_program="${ac_c_conftest_c89_globals} +${ac_c_conftest_c99_globals} + +int +main (int argc, char **argv) +{ + int ok = 0; + ${ac_c_conftest_c89_main} + ${ac_c_conftest_c99_main} + return ok; +} +" + +# Test code for whether the C compiler supports C89 (complete). +ac_c_conftest_c89_program="${ac_c_conftest_c89_globals} + +int +main (int argc, char **argv) +{ + int ok = 0; + ${ac_c_conftest_c89_main} + return ok; +} +" + +# Test code for whether the C++ compiler supports C++98 (global declarations) +ac_cxx_conftest_cxx98_globals=' +// Does the compiler advertise C++98 conformance? +#if !defined __cplusplus || __cplusplus < 199711L +# error "Compiler does not advertise C++98 conformance" +#endif + +// These inclusions are to reject old compilers that +// lack the unsuffixed header files. +#include +#include + +// and are *not* freestanding headers in C++98. +extern void assert (int); +namespace std { + extern int strcmp (const char *, const char *); +} + +// Namespaces, exceptions, and templates were all added after "C++ 2.0". +using std::exception; +using std::strcmp; + +namespace { + +void test_exception_syntax() +{ + try { + throw "test"; + } catch (const char *s) { + // Extra parentheses suppress a warning when building autoconf itself, + // due to lint rules shared with more typical C programs. + assert (!(strcmp) (s, "test")); + } +} + +template struct test_template +{ + T const val; + explicit test_template(T t) : val(t) {} + template T add(U u) { return static_cast(u) + val; } +}; + +} // anonymous namespace +' + +# Test code for whether the C++ compiler supports C++98 (body of main) +ac_cxx_conftest_cxx98_main=' + assert (argc); + assert (! argv[0]); +{ + test_exception_syntax (); + test_template tt (2.0); + assert (tt.add (4) == 6.0); + assert (true && !false); +} +' + +# Test code for whether the C++ compiler supports C++11 (global declarations) +ac_cxx_conftest_cxx11_globals=' +// Does the compiler advertise C++ 2011 conformance? +#if !defined __cplusplus || __cplusplus < 201103L +# error "Compiler does not advertise C++11 conformance" +#endif + +namespace cxx11test +{ + constexpr int get_val() { return 20; } + + struct testinit + { + int i; + double d; + }; + + class delegate + { + public: + delegate(int n) : n(n) {} + delegate(): delegate(2354) {} + + virtual int getval() { return this->n; }; + protected: + int n; + }; + + class overridden : public delegate + { + public: + overridden(int n): delegate(n) {} + virtual int getval() override final { return this->n * 2; } + }; + + class nocopy + { + public: + nocopy(int i): i(i) {} + nocopy() = default; + nocopy(const nocopy&) = delete; + nocopy & operator=(const nocopy&) = delete; + private: + int i; + }; + + // for testing lambda expressions + template Ret eval(Fn f, Ret v) + { + return f(v); + } + + // for testing variadic templates and trailing return types + template auto sum(V first) -> V + { + return first; + } + template auto sum(V first, Args... rest) -> V + { + return first + sum(rest...); + } +} +' + +# Test code for whether the C++ compiler supports C++11 (body of main) +ac_cxx_conftest_cxx11_main=' +{ + // Test auto and decltype + auto a1 = 6538; + auto a2 = 48573953.4; + auto a3 = "String literal"; + + int total = 0; + for (auto i = a3; *i; ++i) { total += *i; } + + decltype(a2) a4 = 34895.034; +} +{ + // Test constexpr + short sa[cxx11test::get_val()] = { 0 }; +} +{ + // Test initializer lists + cxx11test::testinit il = { 4323, 435234.23544 }; +} +{ + // Test range-based for + int array[] = {9, 7, 13, 15, 4, 18, 12, 10, 5, 3, + 14, 19, 17, 8, 6, 20, 16, 2, 11, 1}; + for (auto &x : array) { x += 23; } +} +{ + // Test lambda expressions + using cxx11test::eval; + assert (eval ([](int x) { return x*2; }, 21) == 42); + double d = 2.0; + assert (eval ([&](double x) { return d += x; }, 3.0) == 5.0); + assert (d == 5.0); + assert (eval ([=](double x) mutable { return d += x; }, 4.0) == 9.0); + assert (d == 5.0); +} +{ + // Test use of variadic templates + using cxx11test::sum; + auto a = sum(1); + auto b = sum(1, 2); + auto c = sum(1.0, 2.0, 3.0); +} +{ + // Test constructor delegation + cxx11test::delegate d1; + cxx11test::delegate d2(); + cxx11test::delegate d3(45); +} +{ + // Test override and final + cxx11test::overridden o1(55464); +} +{ + // Test nullptr + char *c = nullptr; +} +{ + // Test template brackets + test_template<::test_template> v(test_template(12)); +} +{ + // Unicode literals + char const *utf8 = u8"UTF-8 string \u2500"; + char16_t const *utf16 = u"UTF-8 string \u2500"; + char32_t const *utf32 = U"UTF-32 string \u2500"; +} +' + +# Test code for whether the C compiler supports C++11 (complete). +ac_cxx_conftest_cxx11_program="${ac_cxx_conftest_cxx98_globals} +${ac_cxx_conftest_cxx11_globals} + +int +main (int argc, char **argv) +{ + int ok = 0; + ${ac_cxx_conftest_cxx98_main} + ${ac_cxx_conftest_cxx11_main} + return ok; +} +" + +# Test code for whether the C compiler supports C++98 (complete). +ac_cxx_conftest_cxx98_program="${ac_cxx_conftest_cxx98_globals} +int +main (int argc, char **argv) +{ + int ok = 0; + ${ac_cxx_conftest_cxx98_main} + return ok; +} +" + +as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H" +as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H" +as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H" +as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H" +as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H" +as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H" +as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H" +as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H" +as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H" +as_fn_append ac_header_c_list " sys/time.h sys_time_h HAVE_SYS_TIME_H" + +# Auxiliary files required by this configure script. +ac_aux_files="install-sh config.guess config.sub" + +# Locations in which to look for auxiliary files. +ac_aux_dir_candidates="${srcdir}/./config" + +# Search for a directory containing all of the required auxiliary files, +# $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates. +# If we don't find one directory that contains all the files we need, +# we report the set of missing files from the *first* directory in +# $ac_aux_dir_candidates and give up. +ac_missing_aux_files="" +ac_first_candidate=: +printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in $ac_aux_dir_candidates +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + as_found=: + + printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying $as_dir" >&5 + ac_aux_dir_found=yes + ac_install_sh= + for ac_aux in $ac_aux_files + do + # As a special case, if "install-sh" is required, that requirement + # can be satisfied by any of "install-sh", "install.sh", or "shtool", + # and $ac_install_sh is set appropriately for whichever one is found. + if test x"$ac_aux" = x"install-sh" + then + if test -f "${as_dir}install-sh"; then + printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install-sh found" >&5 + ac_install_sh="${as_dir}install-sh -c" + elif test -f "${as_dir}install.sh"; then + printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install.sh found" >&5 + ac_install_sh="${as_dir}install.sh -c" + elif test -f "${as_dir}shtool"; then + printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}shtool found" >&5 + ac_install_sh="${as_dir}shtool install -c" + else + ac_aux_dir_found=no + if $ac_first_candidate; then + ac_missing_aux_files="${ac_missing_aux_files} install-sh" + else + break + fi + fi + else + if test -f "${as_dir}${ac_aux}"; then + printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}${ac_aux} found" >&5 + else + ac_aux_dir_found=no + if $ac_first_candidate; then + ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}" + else + break + fi + fi + fi + done + if test "$ac_aux_dir_found" = yes; then + ac_aux_dir="$as_dir" + break + fi + ac_first_candidate=false + + as_found=false +done +IFS=$as_save_IFS +if $as_found +then : + +else $as_nop + as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5 +fi + + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +if test -f "${ac_aux_dir}config.guess"; then + ac_config_guess="$SHELL ${ac_aux_dir}config.guess" +fi +if test -f "${ac_aux_dir}config.sub"; then + ac_config_sub="$SHELL ${ac_aux_dir}config.sub" +fi +if test -f "$ac_aux_dir/configure"; then + ac_configure="$SHELL ${ac_aux_dir}configure" +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;} + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) as_fn_append ac_configure_args " '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file' + and start over" "$LINENO" 5 +fi +## -------------------- ## +## Main body of script. ## +## -------------------- ## + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + +build_dynobj=no + +# If $runstatedir isn't set by autoconf (<2.70), set it manually. +if test x"$runstatedir" = x; then + runstatedir=$localstatedir/run +fi + + +# Don't make duplicate profile path entries for /etc/krb5.conf if +# $sysconfdir is /etc +if test "$sysconfdir" = /etc; then + SYSCONFCONF="" +else + SYSCONFCONF=":${sysconfdir}/krb5.conf" +fi + + +ac_reltopdir="." +if test ! -r "$srcdir/./aclocal.m4"; then + as_fn_error $? "Configure could not determine the relative topdir" "$LINENO" 5 +fi +ac_topdir=$srcdir/$ac_reltopdir +ac_config_fragdir=$ac_reltopdir/config +# echo "Looking for $srcdir/$ac_config_fragdir" + + + + + +krb5_ac_cflags_set=${CFLAGS+set} +krb5_ac_cxxflags_set=${CXXFLAGS+set} +krb5_ac_warn_cflags_set=${WARN_CFLAGS+set} +krb5_ac_warn_cxxflags_set=${WARN_CXXFLAGS+set} + + + + + + + + + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="gcc" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +printf "%s\n" "$ac_ct_CC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + + fi +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl.exe +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="$ac_prog" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +printf "%s\n" "$ac_ct_CC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + + test -n "$ac_ct_CC" && break +done + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args. +set dummy ${ac_tool_prefix}clang; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}clang" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "clang", so it can be a program name with args. +set dummy clang; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="clang" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +printf "%s\n" "$ac_ct_CC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +fi + + +test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } + +# Provide some information about the compiler. +printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion -version; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +printf "%s\n" "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done + +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +printf %s "checking whether the C compiler works... " >&6; } +ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'` + +# The possible output files: +ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" + +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { { ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +printf "%s\n" "$ac_try_echo"; } >&5 + (eval "$ac_link_default") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +then : + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files '' +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. + break;; + * ) + break;; + esac +done +test "$ac_cv_exeext" = no && ac_cv_exeext= + +else $as_nop + ac_file='' +fi +if test -z "$ac_file" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +printf "%s\n" "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "C compiler cannot create executables +See \`config.log' for more details" "$LINENO" 5; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +printf %s "checking for C compiler default output file name... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +printf "%s\n" "$ac_file" >&6; } +ac_exeext=$ac_cv_exeext + +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 +printf %s "checking for suffix of executables... " >&6; } +if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +printf "%s\n" "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +then : + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + break;; + * ) break;; + esac +done +else $as_nop + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details" "$LINENO" 5; } +fi +rm -f conftest conftest$ac_cv_exeext +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 +printf "%s\n" "$ac_cv_exeext" >&6; } + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main (void) +{ +FILE *f = fopen ("conftest.out", "w"); + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +ac_clean_files="$ac_clean_files conftest.out" +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +printf %s "checking whether we are cross compiling... " >&6; } +if test "$cross_compiling" != yes; then + { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +printf "%s\n" "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if { ac_try='./conftest$ac_cv_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +printf "%s\n" "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details" "$LINENO" 5; } + fi + fi +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +printf "%s\n" "$cross_compiling" >&6; } + +rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out +ac_clean_files=$ac_clean_files_save +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 +printf %s "checking for suffix of object files... " >&6; } +if test ${ac_cv_objext+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +printf "%s\n" "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +then : + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of object files: cannot compile +See \`config.log' for more details" "$LINENO" 5; } +fi +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 +printf "%s\n" "$ac_cv_objext" >&6; } +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5 +printf %s "checking whether the compiler supports GNU C... " >&6; } +if test ${ac_cv_c_compiler_gnu+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_compiler_gnu=yes +else $as_nop + ac_compiler_gnu=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi +ac_test_CFLAGS=${CFLAGS+y} +ac_save_CFLAGS=$CFLAGS +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +printf %s "checking whether $CC accepts -g... " >&6; } +if test ${ac_cv_prog_cc_g+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_prog_cc_g=yes +else $as_nop + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + +else $as_nop + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_prog_cc_g=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +printf "%s\n" "$ac_cv_prog_cc_g" >&6; } +if test $ac_test_CFLAGS; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +ac_prog_cc_stdc=no +if test x$ac_prog_cc_stdc = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5 +printf %s "checking for $CC option to enable C11 features... " >&6; } +if test ${ac_cv_prog_cc_c11+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_prog_cc_c11=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_c_conftest_c11_program +_ACEOF +for ac_arg in '' -std=gnu11 +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_prog_cc_c11=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam + test "x$ac_cv_prog_cc_c11" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC +fi + +if test "x$ac_cv_prog_cc_c11" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else $as_nop + if test "x$ac_cv_prog_cc_c11" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 +printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } + CC="$CC $ac_cv_prog_cc_c11" +fi + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 + ac_prog_cc_stdc=c11 +fi +fi +if test x$ac_prog_cc_stdc = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5 +printf %s "checking for $CC option to enable C99 features... " >&6; } +if test ${ac_cv_prog_cc_c99+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_prog_cc_c99=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_c_conftest_c99_program +_ACEOF +for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99= +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_prog_cc_c99=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam + test "x$ac_cv_prog_cc_c99" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC +fi + +if test "x$ac_cv_prog_cc_c99" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else $as_nop + if test "x$ac_cv_prog_cc_c99" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 +printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } + CC="$CC $ac_cv_prog_cc_c99" +fi + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 + ac_prog_cc_stdc=c99 +fi +fi +if test x$ac_prog_cc_stdc = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5 +printf %s "checking for $CC option to enable C89 features... " >&6; } +if test ${ac_cv_prog_cc_c89+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_c_conftest_c89_program +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_prog_cc_c89=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC +fi + +if test "x$ac_cv_prog_cc_c89" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else $as_nop + if test "x$ac_cv_prog_cc_c89" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } + CC="$CC $ac_cv_prog_cc_c89" +fi + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 + ac_prog_cc_stdc=c89 +fi +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + + + + +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +if test -z "$CXX"; then + if test -n "$CCC"; then + CXX=$CCC + else + if test -n "$ac_tool_prefix"; then + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC clang++ + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CXX+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$CXX"; then + ac_cv_prog_CXX="$CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CXX=$ac_cv_prog_CXX +if test -n "$CXX"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 +printf "%s\n" "$CXX" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + + test -n "$CXX" && break + done +fi +if test -z "$CXX"; then + ac_ct_CXX=$CXX + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC clang++ +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_CXX+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$ac_ct_CXX"; then + ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CXX="$ac_prog" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CXX=$ac_cv_prog_ac_ct_CXX +if test -n "$ac_ct_CXX"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 +printf "%s\n" "$ac_ct_CXX" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + + test -n "$ac_ct_CXX" && break +done + + if test "x$ac_ct_CXX" = x; then + CXX="g++" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CXX=$ac_ct_CXX + fi +fi + + fi +fi +# Provide some information about the compiler. +printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +printf "%s\n" "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C++" >&5 +printf %s "checking whether the compiler supports GNU C++... " >&6; } +if test ${ac_cv_cxx_compiler_gnu+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO" +then : + ac_compiler_gnu=yes +else $as_nop + ac_compiler_gnu=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +ac_cv_cxx_compiler_gnu=$ac_compiler_gnu + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 +printf "%s\n" "$ac_cv_cxx_compiler_gnu" >&6; } +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + +if test $ac_compiler_gnu = yes; then + GXX=yes +else + GXX= +fi +ac_test_CXXFLAGS=${CXXFLAGS+y} +ac_save_CXXFLAGS=$CXXFLAGS +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 +printf %s "checking whether $CXX accepts -g... " >&6; } +if test ${ac_cv_prog_cxx_g+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_save_cxx_werror_flag=$ac_cxx_werror_flag + ac_cxx_werror_flag=yes + ac_cv_prog_cxx_g=no + CXXFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO" +then : + ac_cv_prog_cxx_g=yes +else $as_nop + CXXFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO" +then : + +else $as_nop + ac_cxx_werror_flag=$ac_save_cxx_werror_flag + CXXFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO" +then : + ac_cv_prog_cxx_g=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + ac_cxx_werror_flag=$ac_save_cxx_werror_flag +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 +printf "%s\n" "$ac_cv_prog_cxx_g" >&6; } +if test $ac_test_CXXFLAGS; then + CXXFLAGS=$ac_save_CXXFLAGS +elif test $ac_cv_prog_cxx_g = yes; then + if test "$GXX" = yes; then + CXXFLAGS="-g -O2" + else + CXXFLAGS="-g" + fi +else + if test "$GXX" = yes; then + CXXFLAGS="-O2" + else + CXXFLAGS= + fi +fi +ac_prog_cxx_stdcxx=no +if test x$ac_prog_cxx_stdcxx = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++11 features" >&5 +printf %s "checking for $CXX option to enable C++11 features... " >&6; } +if test ${ac_cv_prog_cxx_cxx11+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_prog_cxx_cxx11=no +ac_save_CXX=$CXX +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_cxx_conftest_cxx11_program +_ACEOF +for ac_arg in '' -std=gnu++11 -std=gnu++0x -std=c++11 -std=c++0x -qlanglvl=extended0x -AA +do + CXX="$ac_save_CXX $ac_arg" + if ac_fn_cxx_try_compile "$LINENO" +then : + ac_cv_prog_cxx_cxx11=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam + test "x$ac_cv_prog_cxx_cxx11" != "xno" && break +done +rm -f conftest.$ac_ext +CXX=$ac_save_CXX +fi + +if test "x$ac_cv_prog_cxx_cxx11" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else $as_nop + if test "x$ac_cv_prog_cxx_cxx11" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx11" >&5 +printf "%s\n" "$ac_cv_prog_cxx_cxx11" >&6; } + CXX="$CXX $ac_cv_prog_cxx_cxx11" +fi + ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx11 + ac_prog_cxx_stdcxx=cxx11 +fi +fi +if test x$ac_prog_cxx_stdcxx = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++98 features" >&5 +printf %s "checking for $CXX option to enable C++98 features... " >&6; } +if test ${ac_cv_prog_cxx_cxx98+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_prog_cxx_cxx98=no +ac_save_CXX=$CXX +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_cxx_conftest_cxx98_program +_ACEOF +for ac_arg in '' -std=gnu++98 -std=c++98 -qlanglvl=extended -AA +do + CXX="$ac_save_CXX $ac_arg" + if ac_fn_cxx_try_compile "$LINENO" +then : + ac_cv_prog_cxx_cxx98=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam + test "x$ac_cv_prog_cxx_cxx98" != "xno" && break +done +rm -f conftest.$ac_ext +CXX=$ac_save_CXX +fi + +if test "x$ac_cv_prog_cxx_cxx98" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else $as_nop + if test "x$ac_cv_prog_cxx_cxx98" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx98" >&5 +printf "%s\n" "$ac_cv_prog_cxx_cxx98" >&6; } + CXX="$CXX $ac_cv_prog_cxx_cxx98" +fi + ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx98 + ac_prog_cxx_stdcxx=cxx98 +fi +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + cflags_warning_test_flags= + cachevar=`echo "krb5_cv_cc_flag_-Werror=unknown-warning-option" | sed -e s/=/_eq_/g -e s/-/_dash_/g -e s/[^a-zA-Z0-9_]/_/g` + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if C compiler supports -Werror=unknown-warning-option" >&5 +printf %s "checking if C compiler supports -Werror=unknown-warning-option... " >&6; } +if eval test \${$cachevar+y} +then : + printf %s "(cached) " >&6 +else $as_nop + # first try without, then with + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ +1; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + old_cflags="$CFLAGS" + CFLAGS="$CFLAGS $cflags_warning_test_flags -Werror=unknown-warning-option" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ +1; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + eval $cachevar=yes +else $as_nop + eval $cachevar=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + CFLAGS="$old_cflags" +else $as_nop + as_fn_error $? "compiling simple test program with $CFLAGS failed" "$LINENO" 5 +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +eval ac_res=\$$cachevar + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } + if eval test '"${'$cachevar'}"' = yes; then + WARN_CFLAGS="$WARN_CFLAGS -Werror=unknown-warning-option" + fi + eval flag_supported='${'$cachevar'}' + + if test $flag_supported = yes; then + cflags_warning_test_flags=-Werror=unknown-warning-option + fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +printf %s "checking how to run the C preprocessor... " >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if test ${ac_cv_prog_CPP+y} +then : + printf %s "(cached) " >&6 +else $as_nop + # Double quotes because $CC needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO" +then : + +else $as_nop + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO" +then : + # Broken: success on invalid input. +continue +else $as_nop + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok +then : + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +printf "%s\n" "$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO" +then : + +else $as_nop + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO" +then : + # Broken: success on invalid input. +continue +else $as_nop + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok +then : + +else $as_nop + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +test "$program_prefix" != NONE && + program_transform_name="s&^&$program_prefix&;$program_transform_name" +# Use a double $ so make ignores it. +test "$program_suffix" != NONE && + program_transform_name="s&\$&$program_suffix&;$program_transform_name" +# Double any \ or $. +# By default was `s,x,x', remove it if useless. +ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' +program_transform_name=`printf "%s\n" "$program_transform_name" | sed "$ac_script"` + + + + + # Make sure we can run config.sub. +$SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 || + as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5 + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +printf %s "checking build system type... " >&6; } +if test ${ac_cv_build+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"` +test "x$ac_build_alias" = x && + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 +ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` || + as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5 + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +printf "%s\n" "$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; +esac +build=$ac_cv_build +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +printf %s "checking host system type... " >&6; } +if test ${ac_cv_host+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build +else + ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` || + as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5 +fi + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +printf "%s\n" "$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 +printf %s "checking for a sed that does not truncate output... " >&6; } +if test ${ac_cv_path_SED+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ + for ac_i in 1 2 3 4 5 6 7; do + ac_script="$ac_script$as_nl$ac_script" + done + echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed + { ac_script=; unset ac_script;} + if test -z "$SED"; then + ac_path_SED_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_prog in sed gsed + do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_SED="$as_dir$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_SED" || continue +# Check for GNU ac_path_SED and select it if it is found. + # Check for GNU $ac_path_SED +case `"$ac_path_SED" --version 2>&1` in +*GNU*) + ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; +*) + ac_count=0 + printf %s 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + printf "%s\n" '' >> "conftest.nl" + "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_SED_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_SED="$ac_path_SED" + ac_path_SED_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_SED_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_SED"; then + as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 + fi +else + ac_cv_path_SED=$SED +fi + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 +printf "%s\n" "$ac_cv_path_SED" >&6; } + SED="$ac_cv_path_SED" + rm -f conftest.sed + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +printf %s "checking for grep that handles long lines and -e... " >&6; } +if test ${ac_cv_path_GREP+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_prog in grep ggrep + do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_GREP" || continue +# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + printf %s 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + printf "%s\n" 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_GREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_GREP=$GREP +fi + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +printf "%s\n" "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +printf %s "checking for egrep... " >&6; } +if test ${ac_cv_path_EGREP+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + if test -z "$EGREP"; then + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_prog in egrep + do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_EGREP" || continue +# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + printf %s 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + printf "%s\n" 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_EGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_EGREP=$EGREP +fi + + fi +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +printf "%s\n" "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + + EXTRA_FILES="" + + +printf "%s\n" "#define _GNU_SOURCE 1" >>confdefs.h + + +printf "%s\n" "#define __STDC_WANT_LIB_EXT1__ 1" >>confdefs.h + + +if test $ac_cv_c_compiler_gnu = yes ; then + HAVE_GCC=yes + else HAVE_GCC= +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU linker" >&5 +printf %s "checking for GNU linker... " >&6; } +if test ${krb5_cv_prog_gnu_ld+y} +then : + printf %s "(cached) " >&6 +else $as_nop + krb5_cv_prog_gnu_ld=no +if test "$GCC" = yes; then + if { ac_try='$CC -Wl,-v 2>&1 | grep "GNU ld" > /dev/null' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 + (eval $ac_try) 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + krb5_cv_prog_gnu_ld=yes + fi +fi +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $krb5_cv_prog_gnu_ld" >&5 +printf "%s\n" "$krb5_cv_prog_gnu_ld" >&6; } + +# Check whether --with-size-optimizations was given. +if test ${with_size_optimizations+y} +then : + withval=$with_size_optimizations; +else $as_nop + withval=no +fi + +if test "$withval" = yes; then + +printf "%s\n" "#define CONFIG_SMALL 1" >>confdefs.h + +fi +# -Wno-long-long, if needed, for k5-platform.h without inttypes.h etc. +extra_gcc_warn_opts="-Wall -Wcast-align -Wshadow" +# -Wmissing-prototypes +if test "$GCC" = yes ; then + # Putting this here means we get -Os after -O2, which works. + if test "$with_size_optimizations" = yes && test "x$krb5_ac_cflags_set" != xset; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: adding -Os optimization option" >&5 +printf "%s\n" "$as_me: adding -Os optimization option" >&6;} + case "$CFLAGS" in + "-g -O2") CFLAGS="-g -Os" ;; + "-O2") CFLAGS="-Os" ;; + *) CFLAGS="$CFLAGS -Os" ;; + esac + fi + if test "x$krb5_ac_warn_cflags_set" = xset ; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not adding extra gcc warning flags because WARN_CFLAGS was set" >&5 +printf "%s\n" "$as_me: not adding extra gcc warning flags because WARN_CFLAGS was set" >&6;} + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: adding extra warning flags for gcc" >&5 +printf "%s\n" "$as_me: adding extra warning flags for gcc" >&6;} + WARN_CFLAGS="$WARN_CFLAGS $extra_gcc_warn_opts -Wmissing-prototypes" + if test "`uname -s`" = Darwin ; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: skipping pedantic warnings on Darwin" >&5 +printf "%s\n" "$as_me: skipping pedantic warnings on Darwin" >&6;} + elif test "`uname -s`" = Linux ; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: skipping pedantic warnings on Linux" >&5 +printf "%s\n" "$as_me: skipping pedantic warnings on Linux" >&6;} + else + WARN_CFLAGS="$WARN_CFLAGS -pedantic" + fi + if test "$ac_cv_cxx_compiler_gnu" = yes; then + if test "x$krb5_ac_warn_cxxflags_set" = xset ; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not adding extra g++ warnings because WARN_CXXFLAGS was set" >&5 +printf "%s\n" "$as_me: not adding extra g++ warnings because WARN_CXXFLAGS was set" >&6;} + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: adding extra warning flags for g++" >&5 +printf "%s\n" "$as_me: adding extra warning flags for g++" >&6;} + WARN_CXXFLAGS="$WARN_CXXFLAGS $extra_gcc_warn_opts" + fi + fi + # Currently, G++ does not support -Wno-format-zero-length. + cachevar=`echo "krb5_cv_cc_flag_-Wno-format-zero-length" | sed -e s/=/_eq_/g -e s/-/_dash_/g -e s/[^a-zA-Z0-9_]/_/g` + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if C compiler supports -Wno-format-zero-length" >&5 +printf %s "checking if C compiler supports -Wno-format-zero-length... " >&6; } +if eval test \${$cachevar+y} +then : + printf %s "(cached) " >&6 +else $as_nop + # first try without, then with + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ +1; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + old_cflags="$CFLAGS" + CFLAGS="$CFLAGS $cflags_warning_test_flags -Wno-format-zero-length" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ +1; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + eval $cachevar=yes +else $as_nop + eval $cachevar=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + CFLAGS="$old_cflags" +else $as_nop + as_fn_error $? "compiling simple test program with $CFLAGS failed" "$LINENO" 5 +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +eval ac_res=\$$cachevar + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } + if eval test '"${'$cachevar'}"' = yes; then + WARN_CFLAGS="$WARN_CFLAGS -Wno-format-zero-length" + fi + eval flag_supported='${'$cachevar'}' + + # Other flags here may not be supported on some versions of + # gcc that people want to use. + for flag in overflow strict-overflow missing-format-attribute missing-prototypes return-type missing-braces parentheses switch unused-function unused-label unused-variable unused-value unknown-pragmas sign-compare newline-eof error=uninitialized no-maybe-uninitialized error=pointer-arith error=int-conversion error=incompatible-pointer-types error=discarded-qualifiers error=implicit-int ; do + cachevar=`echo "krb5_cv_cc_flag_-W$flag" | sed -e s/=/_eq_/g -e s/-/_dash_/g -e s/[^a-zA-Z0-9_]/_/g` + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if C compiler supports -W$flag" >&5 +printf %s "checking if C compiler supports -W$flag... " >&6; } +if eval test \${$cachevar+y} +then : + printf %s "(cached) " >&6 +else $as_nop + # first try without, then with + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ +1; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + old_cflags="$CFLAGS" + CFLAGS="$CFLAGS $cflags_warning_test_flags -W$flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ +1; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + eval $cachevar=yes +else $as_nop + eval $cachevar=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + CFLAGS="$old_cflags" +else $as_nop + as_fn_error $? "compiling simple test program with $CFLAGS failed" "$LINENO" 5 +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +eval ac_res=\$$cachevar + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } + if eval test '"${'$cachevar'}"' = yes; then + WARN_CFLAGS="$WARN_CFLAGS -W$flag" + fi + eval flag_supported='${'$cachevar'}' + + done + # old-style-definition? generates many, many warnings + # + # Warnings that we'd like to turn into errors on versions of gcc + # that support promoting only specific warnings to errors, but + # we'll take as warnings on older compilers. (If such a warning + # is added after the -Werror=foo feature, you can just put + # error=foo in the above list, and skip the test for the + # warning-only form.) At least in some versions, -Werror= doesn't + # seem to make the conditions actual errors, but still issues + # warnings; I guess we'll take what we can get. + # + # We're currently targeting C89+, not C99, so disallow some + # constructs. + for flag in declaration-after-statement ; do + cachevar=`echo "krb5_cv_cc_flag_-Werror=$flag" | sed -e s/=/_eq_/g -e s/-/_dash_/g -e s/[^a-zA-Z0-9_]/_/g` + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if C compiler supports -Werror=$flag" >&5 +printf %s "checking if C compiler supports -Werror=$flag... " >&6; } +if eval test \${$cachevar+y} +then : + printf %s "(cached) " >&6 +else $as_nop + # first try without, then with + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ +1; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + old_cflags="$CFLAGS" + CFLAGS="$CFLAGS $cflags_warning_test_flags -Werror=$flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ +1; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + eval $cachevar=yes +else $as_nop + eval $cachevar=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + CFLAGS="$old_cflags" +else $as_nop + as_fn_error $? "compiling simple test program with $CFLAGS failed" "$LINENO" 5 +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +eval ac_res=\$$cachevar + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } + if eval test '"${'$cachevar'}"' = yes; then + WARN_CFLAGS="$WARN_CFLAGS -Werror=$flag" + fi + eval flag_supported='${'$cachevar'}' + + if test "$flag_supported" = no; then + cachevar=`echo "krb5_cv_cc_flag_-W$flag" | sed -e s/=/_eq_/g -e s/-/_dash_/g -e s/[^a-zA-Z0-9_]/_/g` + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if C compiler supports -W$flag" >&5 +printf %s "checking if C compiler supports -W$flag... " >&6; } +if eval test \${$cachevar+y} +then : + printf %s "(cached) " >&6 +else $as_nop + # first try without, then with + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ +1; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + old_cflags="$CFLAGS" + CFLAGS="$CFLAGS $cflags_warning_test_flags -W$flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ +1; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + eval $cachevar=yes +else $as_nop + eval $cachevar=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + CFLAGS="$old_cflags" +else $as_nop + as_fn_error $? "compiling simple test program with $CFLAGS failed" "$LINENO" 5 +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +eval ac_res=\$$cachevar + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } + if eval test '"${'$cachevar'}"' = yes; then + WARN_CFLAGS="$WARN_CFLAGS -W$flag" + fi + eval flag_supported='${'$cachevar'}' + + fi + done + # We require function declarations now. + # + # In some compiler versions -- e.g., "gcc version 4.2.1 (Apple + # Inc. build 5664)" -- the -Werror- option works, but the -Werror= + # version doesn't cause implicitly declared functions to be + # flagged as errors. If neither works, -Wall implies + # -Wimplicit-function-declaration so don't bother. + cachevar=`echo "krb5_cv_cc_flag_-Werror-implicit-function-declaration" | sed -e s/=/_eq_/g -e s/-/_dash_/g -e s/[^a-zA-Z0-9_]/_/g` + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if C compiler supports -Werror-implicit-function-declaration" >&5 +printf %s "checking if C compiler supports -Werror-implicit-function-declaration... " >&6; } +if eval test \${$cachevar+y} +then : + printf %s "(cached) " >&6 +else $as_nop + # first try without, then with + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ +1; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + old_cflags="$CFLAGS" + CFLAGS="$CFLAGS $cflags_warning_test_flags -Werror-implicit-function-declaration" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ +1; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + eval $cachevar=yes +else $as_nop + eval $cachevar=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + CFLAGS="$old_cflags" +else $as_nop + as_fn_error $? "compiling simple test program with $CFLAGS failed" "$LINENO" 5 +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +eval ac_res=\$$cachevar + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } + if eval test '"${'$cachevar'}"' = yes; then + WARN_CFLAGS="$WARN_CFLAGS -Werror-implicit-function-declaration" + fi + eval flag_supported='${'$cachevar'}' + + if test "implicit-function-declaration_supported" = no; then + cachevar=`echo "krb5_cv_cc_flag_-Werror=implicit-function-declaration" | sed -e s/=/_eq_/g -e s/-/_dash_/g -e s/[^a-zA-Z0-9_]/_/g` + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if C compiler supports -Werror=implicit-function-declaration" >&5 +printf %s "checking if C compiler supports -Werror=implicit-function-declaration... " >&6; } +if eval test \${$cachevar+y} +then : + printf %s "(cached) " >&6 +else $as_nop + # first try without, then with + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ +1; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + old_cflags="$CFLAGS" + CFLAGS="$CFLAGS $cflags_warning_test_flags -Werror=implicit-function-declaration" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ +1; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + eval $cachevar=yes +else $as_nop + eval $cachevar=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + CFLAGS="$old_cflags" +else $as_nop + as_fn_error $? "compiling simple test program with $CFLAGS failed" "$LINENO" 5 +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +eval ac_res=\$$cachevar + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } + if eval test '"${'$cachevar'}"' = yes; then + WARN_CFLAGS="$WARN_CFLAGS -Werror=implicit-function-declaration" + fi + eval flag_supported='${'$cachevar'}' + + fi + # + fi + if test "`uname -s`" = Darwin ; then + # Someday this should be a feature test. + # One current (Jaguar = OS 10.2) problem: + # Archive library with foo.o undef sym X and bar.o common sym X, + # if foo.o is pulled in at link time, bar.o may not be, causing + # the linker to complain. + # Dynamic library problems too? + case "$CC $CFLAGS" in + *-fcommon*) ;; # why someone would do this, I don't know + *-fno-common*) ;; # okay, they're already doing the right thing + *) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: disabling the use of common storage on Darwin" >&5 +printf "%s\n" "$as_me: disabling the use of common storage on Darwin" >&6;} + CFLAGS="$CFLAGS -fno-common" + ;; + esac + case "$LD $LDFLAGS" in + *-Wl,-search_paths_first*) ;; + *) LDFLAGS="${LDFLAGS} -Wl,-search_paths_first" ;; + esac + fi +else + if test "`uname -s`" = AIX ; then + # Using AIX but not GCC, assume native compiler. + # The native compiler appears not to give a nonzero exit + # status for certain classes of errors, like missing arguments + # in function calls. Let's try to fix that with -qhalt=e. + case "$CC $CFLAGS" in + *-qhalt=*) ;; + *) + CFLAGS="$CFLAGS -qhalt=e" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: adding -qhalt=e for better error reporting" >&5 +printf "%s\n" "$as_me: adding -qhalt=e for better error reporting" >&6;} + ;; + esac + # Also, the optimizer isn't turned on by default, which means + # the static inline functions get left in random object files, + # leading to references to pthread_mutex_lock from anything that + # includes k5-int.h whether it uses threads or not. + case "$CC $CFLAGS" in + *-O*) ;; + *) + CFLAGS="$CFLAGS -O" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: adding -O for inline thread-support function elimination" >&5 +printf "%s\n" "$as_me: adding -O for inline thread-support function elimination" >&6;} + ;; + esac + fi + if test "`uname -s`" = SunOS ; then + # Using Solaris but not GCC, assume Sunsoft compiler. + # We have some error-out-on-warning options available. + # Sunsoft 12 compiler defaults to -xc99=all, it appears, so "inline" + # works, but it also means that declaration-in-code warnings won't + # be issued. + # -v -fd -errwarn=E_DECLARATION_IN_CODE ... + if test "x$krb5_ac_warn_cflags_set" = xset ; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not adding extra warning flags because WARN_CFLAGS was set" >&5 +printf "%s\n" "$as_me: not adding extra warning flags because WARN_CFLAGS was set" >&6;} + else + WARN_CFLAGS="-errtags=yes -errwarn=E_BAD_PTR_INT_COMBINATION,E_BAD_PTR_INT_COMB_ARG,E_PTR_TO_VOID_IN_ARITHMETIC,E_NO_IMPLICIT_DECL_ALLOWED,E_ATTRIBUTE_PARAM_UNDEFINED" + fi + if test "x$krb5_ac_warn_cxxflags_set" = xset ; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not adding extra warning flags because WARN_CXXFLAGS was set" >&5 +printf "%s\n" "$as_me: not adding extra warning flags because WARN_CXXFLAGS was set" >&6;} + else + WARN_CXXFLAGS="-errtags=yes +w +w2 -xport64" + fi + fi +fi + + + +if test -z "$LD" ; then LD=$CC; fi + + + +# Check whether --with-system-et was given. +if test ${with_system_et+y} +then : + withval=$with_system_et; +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which version of com_err to use" >&5 +printf %s "checking which version of com_err to use... " >&6; } +if test "x$with_system_et" = xyes ; then + # This will be changed to "intlsys" if textdomain support is present. + COM_ERR_VERSION=sys + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: system" >&5 +printf "%s\n" "system" >&6; } +else + COM_ERR_VERSION=k5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: krb5" >&5 +printf "%s\n" "krb5" >&6; } +fi +if test $COM_ERR_VERSION = sys; then + # check for various functions we need + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for add_error_table in -lcom_err" >&5 +printf %s "checking for add_error_table in -lcom_err... " >&6; } +if test ${ac_cv_lib_com_err_add_error_table+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcom_err $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char add_error_table (); +int +main (void) +{ +return add_error_table (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_com_err_add_error_table=yes +else $as_nop + ac_cv_lib_com_err_add_error_table=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_com_err_add_error_table" >&5 +printf "%s\n" "$ac_cv_lib_com_err_add_error_table" >&6; } +if test "x$ac_cv_lib_com_err_add_error_table" = xyes +then : + : +else $as_nop + as_fn_error $? "cannot find add_error_table in com_err library" "$LINENO" 5 +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for remove_error_table in -lcom_err" >&5 +printf %s "checking for remove_error_table in -lcom_err... " >&6; } +if test ${ac_cv_lib_com_err_remove_error_table+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcom_err $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char remove_error_table (); +int +main (void) +{ +return remove_error_table (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_com_err_remove_error_table=yes +else $as_nop + ac_cv_lib_com_err_remove_error_table=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_com_err_remove_error_table" >&5 +printf "%s\n" "$ac_cv_lib_com_err_remove_error_table" >&6; } +if test "x$ac_cv_lib_com_err_remove_error_table" = xyes +then : + : +else $as_nop + as_fn_error $? "cannot find remove_error_table in com_err library" "$LINENO" 5 +fi + + # make sure compile_et provides "et_foo" name + cat >> conf$$e.et <&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_compile_et+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$compile_et"; then + ac_cv_prog_compile_et="$compile_et" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_compile_et="$ac_prog" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +compile_et=$ac_cv_prog_compile_et +if test -n "$compile_et"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $compile_et" >&5 +printf "%s\n" "$compile_et" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + + test -n "$compile_et" && break +done +test -n "$compile_et" || compile_et="false" + + if test "$compile_et" = false; then + as_fn_error $? "cannot find compile_et" "$LINENO" 5 + fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether compile_et is useful" >&5 +printf %s "checking whether compile_et is useful... " >&6; } +if test ${krb5_cv_compile_et_useful+y} +then : + printf %s "(cached) " >&6 +else $as_nop + + if compile_et conf$$e.et >/dev/null 2>&1 ; then true ; else + as_fn_error $? "execution failed" "$LINENO" 5 + fi + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include "conf$$e.h" + +int +main (void) +{ + &et_foo_error_table; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + : +else $as_nop + as_fn_error $? "cannot use et_foo_error_table" "$LINENO" 5 +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + # Anything else we need to test for? + rm -f conf$$e.c conf$$e.h + krb5_cv_compile_et_useful=yes + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $krb5_cv_compile_et_useful" >&5 +printf "%s\n" "$krb5_cv_compile_et_useful" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether compile_et supports --textdomain" >&5 +printf %s "checking whether compile_et supports --textdomain... " >&6; } +if test ${krb5_cv_compile_et_textdomain+y} +then : + printf %s "(cached) " >&6 +else $as_nop + + krb5_cv_compile_et_textdomain=no + if compile_et --textdomain=xyzw conf$$e.et >/dev/null 2>&1 ; then + if grep -q xyzw conf$$e.c; then + krb5_cv_compile_et_textdomain=yes + fi + fi + rm -f conf$$e.c conf$$e.h + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $krb5_cv_compile_et_textdomain" >&5 +printf "%s\n" "$krb5_cv_compile_et_textdomain" >&6; } + if test "$krb5_cv_compile_et_textdomain" = yes; then + COM_ERR_VERSION=intlsys + fi + rm -f conf$$e.et +fi + +if test "$COM_ERR_VERSION" = k5 -o "$COM_ERR_VERSION" = intlsys; then + +printf "%s\n" "#define HAVE_COM_ERR_INTL 1" >>confdefs.h + +fi + + +# Check whether --with-system-ss was given. +if test ${with_system_ss+y} +then : + withval=$with_system_ss; +fi + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which version of subsystem package to use" >&5 +printf %s "checking which version of subsystem package to use... " >&6; } +if test "x$with_system_ss" = xyes ; then + SS_VERSION=sys + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: system" >&5 +printf "%s\n" "system" >&6; } + # todo: check for various libraries we might need + # in the meantime... + test "x${SS_LIB+set}" = xset || SS_LIB=-lss + old_LIBS="$LIBS" + LIBS="$LIBS $SS_LIB" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether system ss package works" >&5 +printf %s "checking whether system ss package works... " >&6; } +if test ${krb5_cv_system_ss_okay+y} +then : + printf %s "(cached) " >&6 +else $as_nop + + if test "$cross_compiling" = yes +then : + krb5_cv_system_ss_okay="assumed" +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +int main(int argc, char *argv[]) { + if (argc == 42) { + int i, err; + i = ss_create_invocation("foo","foo","",0,&err); + ss_listen(i); + } + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + krb5_cv_system_ss_okay=yes +else $as_nop + as_fn_error $? "cannot run test program" "$LINENO" 5 +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $krb5_cv_system_ss_okay" >&5 +printf "%s\n" "$krb5_cv_system_ss_okay" >&6; } + LIBS="$old_LIBS" + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if ss_execute_command needs a prototype provided" >&5 +printf %s "checking if ss_execute_command needs a prototype provided... " >&6; } +if test ${krb5_cv_func_ss_execute_command_noproto+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main (void) +{ +#undef ss_execute_command +struct k5foo {int foo; } xx; +extern int ss_execute_command (struct k5foo*); +ss_execute_command(&xx); + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + krb5_cv_func_ss_execute_command_noproto=yes +else $as_nop + krb5_cv_func_ss_execute_command_noproto=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $krb5_cv_func_ss_execute_command_noproto" >&5 +printf "%s\n" "$krb5_cv_func_ss_execute_command_noproto" >&6; } +if test $krb5_cv_func_ss_execute_command_noproto = yes; then + +printf "%s\n" "#define NEED_SS_EXECUTE_COMMAND_PROTO 1" >>confdefs.h + +fi + + +else + SS_VERSION=k5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: krb5" >&5 +printf "%s\n" "krb5" >&6; } +fi + + + + +# Check whether --with-system-db was given. +if test ${with_system_db+y} +then : + withval=$with_system_db; +fi + + + +if test "x$with_system_db" = xyes ; then + DB_VERSION=sys + # TODO: Do we have specific routines we should check for? + # How about known, easily recognizable bugs? + # We want to use bt_rseq in some cases, but no other version but + # ours has it right now. + # + # Okay, check the variables. + test "x${DB_HEADER+set}" = xset || DB_HEADER=db.h + test "x${DB_LIB+set}" = xset || DB_LIB=-ldb + # + if test "x${DB_HEADER}" = xdb.h ; then + DB_HEADER_VERSION=sys + else + DB_HEADER_VERSION=redirect + fi + KDB5_DB_LIB="$DB_LIB" +else + DB_VERSION=k5 + +printf "%s\n" "#define HAVE_BT_RSEQ 1" >>confdefs.h + + DB_HEADER=db.h + DB_HEADER_VERSION=k5 + # libdb gets sucked into libkdb + KDB5_DB_LIB= + # needed for a couple of things that need libdb for its own sake + DB_LIB=-ldb +fi + + + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 +printf %s "checking for an ANSI C-conforming const... " >&6; } +if test ${ac_cv_c_const+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + +#ifndef __cplusplus + /* Ultrix mips cc rejects this sort of thing. */ + typedef int charset[2]; + const charset cs = { 0, 0 }; + /* SunOS 4.1.1 cc rejects this. */ + char const *const *pcpcc; + char **ppc; + /* NEC SVR4.0.2 mips cc rejects this. */ + struct point {int x, y;}; + static struct point const zero = {0,0}; + /* IBM XL C 1.02.0.0 rejects this. + It does not let you subtract one const X* pointer from another in + an arm of an if-expression whose if-part is not a constant + expression */ + const char *g = "string"; + pcpcc = &g + (g ? g-g : 0); + /* HPUX 7.0 cc rejects these. */ + ++pcpcc; + ppc = (char**) pcpcc; + pcpcc = (char const *const *) ppc; + { /* SCO 3.2v4 cc rejects this sort of thing. */ + char tx; + char *t = &tx; + char const *s = 0 ? (char *) 0 : (char const *) 0; + + *t++ = 0; + if (s) return 0; + } + { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ + int x[] = {25, 17}; + const int *foo = &x[0]; + ++foo; + } + { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ + typedef const int *iptr; + iptr p = 0; + ++p; + } + { /* IBM XL C 1.02.0.0 rejects this sort of thing, saying + "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ + struct s { int j; const int *ap[3]; } bx; + struct s *b = &bx; b->j = 5; + } + { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; + if (!foo) return 0; + } + return !cs[0] && !zero.x; +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_c_const=yes +else $as_nop + ac_cv_c_const=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 +printf "%s\n" "$ac_cv_c_const" >&6; } +if test $ac_cv_c_const = no; then + +printf "%s\n" "#define const /**/" >>confdefs.h + +fi + + +# Check whether --with-netlib was given. +if test ${with_netlib+y} +then : + withval=$with_netlib; if test "$withval" = yes -o "$withval" = no ; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: \"netlib will link with C library resolver only\"" >&5 +printf "%s\n" "\"netlib will link with C library resolver only\"" >&6; } + else + LIBS="$LIBS $withval" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: \"netlib will use \'$withval\'\"" >&5 +printf "%s\n" "\"netlib will use \'$withval\'\"" >&6; } + fi + +else $as_nop + + # Most operating systems have gethostbyname() in the default searched + # libraries (i.e. libc): + ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" +if test "x$ac_cv_func_gethostbyname" = xyes +then : + +else $as_nop + + # Some OSes (eg. Solaris) place it in libnsl: + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5 +printf %s "checking for gethostbyname in -lnsl... " >&6; } +if test ${ac_cv_lib_nsl_gethostbyname+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lnsl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char gethostbyname (); +int +main (void) +{ +return gethostbyname (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_nsl_gethostbyname=yes +else $as_nop + ac_cv_lib_nsl_gethostbyname=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5 +printf "%s\n" "$ac_cv_lib_nsl_gethostbyname" >&6; } +if test "x$ac_cv_lib_nsl_gethostbyname" = xyes +then : + printf "%s\n" "#define HAVE_LIBNSL 1" >>confdefs.h + + LIBS="-lnsl $LIBS" + +else $as_nop + + # Some strange OSes (SINIX) have it in libsocket: + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lsocket" >&5 +printf %s "checking for gethostbyname in -lsocket... " >&6; } +if test ${ac_cv_lib_socket_gethostbyname+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsocket $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char gethostbyname (); +int +main (void) +{ +return gethostbyname (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_socket_gethostbyname=yes +else $as_nop + ac_cv_lib_socket_gethostbyname=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_gethostbyname" >&5 +printf "%s\n" "$ac_cv_lib_socket_gethostbyname" >&6; } +if test "x$ac_cv_lib_socket_gethostbyname" = xyes +then : + printf "%s\n" "#define HAVE_LIBSOCKET 1" >>confdefs.h + + LIBS="-lsocket $LIBS" + +else $as_nop + + # Unfortunately libsocket sometimes depends on libnsl. + # AC_CHECK_LIB's API is essentially broken so the following + # ugliness is necessary: + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lsocket" >&5 +printf %s "checking for gethostbyname in -lsocket... " >&6; } +if test ${ac_cv_lib_socket_gethostbyname+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsocket -lnsl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char gethostbyname (); +int +main (void) +{ +return gethostbyname (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_socket_gethostbyname=yes +else $as_nop + ac_cv_lib_socket_gethostbyname=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_gethostbyname" >&5 +printf "%s\n" "$ac_cv_lib_socket_gethostbyname" >&6; } +if test "x$ac_cv_lib_socket_gethostbyname" = xyes +then : + LIBS="-lsocket -lnsl $LIBS" +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lresolv" >&5 +printf %s "checking for gethostbyname in -lresolv... " >&6; } +if test ${ac_cv_lib_resolv_gethostbyname+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lresolv $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char gethostbyname (); +int +main (void) +{ +return gethostbyname (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_resolv_gethostbyname=yes +else $as_nop + ac_cv_lib_resolv_gethostbyname=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_gethostbyname" >&5 +printf "%s\n" "$ac_cv_lib_resolv_gethostbyname" >&6; } +if test "x$ac_cv_lib_resolv_gethostbyname" = xyes +then : + LIBS="-lresolv $LIBS" +fi + +fi + + +fi + + +fi + + +fi + + ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket" +if test "x$ac_cv_func_socket" = xyes +then : + +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5 +printf %s "checking for socket in -lsocket... " >&6; } +if test ${ac_cv_lib_socket_socket+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsocket $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char socket (); +int +main (void) +{ +return socket (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_socket_socket=yes +else $as_nop + ac_cv_lib_socket_socket=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5 +printf "%s\n" "$ac_cv_lib_socket_socket" >&6; } +if test "x$ac_cv_lib_socket_socket" = xyes +then : + printf "%s\n" "#define HAVE_LIBSOCKET 1" >>confdefs.h + + LIBS="-lsocket $LIBS" + +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5 +printf %s "checking for socket in -lsocket... " >&6; } +if test ${ac_cv_lib_socket_socket+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsocket -lnsl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char socket (); +int +main (void) +{ +return socket (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_socket_socket=yes +else $as_nop + ac_cv_lib_socket_socket=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5 +printf "%s\n" "$ac_cv_lib_socket_socket" >&6; } +if test "x$ac_cv_lib_socket_socket" = xyes +then : + LIBS="-lsocket -lnsl $LIBS" +fi + +fi + +fi + + +enable_dns=yes + # Check whether --enable-dns-for-realm was given. +if test ${enable_dns_for_realm+y} +then : + enableval=$enable_dns_for_realm; +else $as_nop + enable_dns_for_realm=no +fi + + if test "$enable_dns_for_realm" = yes; then + +printf "%s\n" "#define KRB5_DNS_LOOKUP_REALM 1" >>confdefs.h + + fi + + +printf "%s\n" "#define KRB5_DNS_LOOKUP 1" >>confdefs.h + + + + if test "$enable_dns" = yes ; then + # We assume that if libresolv exists we can link against it. + # This may get us a gethostby* that doesn't respect nsswitch. + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for main in -lresolv" >&5 +printf %s "checking for main in -lresolv... " >&6; } +if test ${ac_cv_lib_resolv_main+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lresolv $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +int +main (void) +{ +return main (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_resolv_main=yes +else $as_nop + ac_cv_lib_resolv_main=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_main" >&5 +printf "%s\n" "$ac_cv_lib_resolv_main" >&6; } +if test "x$ac_cv_lib_resolv_main" = xyes +then : + printf "%s\n" "#define HAVE_LIBRESOLV 1" >>confdefs.h + + LIBS="-lresolv $LIBS" + +fi + + +for krb5_func in res_ninit res_nclose res_ndestroy res_nsearch ns_initparse ns_name_uncompress dn_skipname res_search; do + +# Solaris 9 prototypes ns_name_uncompress() in arpa/nameser.h, but +# doesn't export it from libresolv.so, so we use extreme paranoia here +# and check both for the declaration and that we can link against the +# function. +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $krb5_func" >&5 +printf %s "checking for $krb5_func... " >&6; } +if eval test \${krb5_cv_func_$krb5_func+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include +int +main (void) +{ +/* + * Use volatile, or else optimization can cause false positives. + */ +void (* volatile p)() = (void (*)())$krb5_func; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + eval "krb5_cv_func_$krb5_func=yes" +else $as_nop + eval "krb5_cv_func_$krb5_func=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +fi +eval ac_res=\$krb5_cv_func_$krb5_func + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if test `eval 'as_val=${'krb5_cv_func_$krb5_func'};printf "%s\n" "$as_val"'` = yes +then : + +cat >>confdefs.h <<_ACEOF +#define `printf "%s\n" "HAVE_$krb5_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + if test $krb5_cv_func_res_nsearch = no \ + && test $krb5_cv_func_res_search = no; then + # Attempt to link with res_search(), in case it's not prototyped. + ac_fn_c_check_func "$LINENO" "res_search" "ac_cv_func_res_search" +if test "x$ac_cv_func_res_search" = xyes +then : + +printf "%s\n" "#define HAVE_RES_SEARCH 1" >>confdefs.h + +else $as_nop + as_fn_error $? "cannot find res_nsearch or res_search" "$LINENO" 5 +fi + + fi + fi + + +fi + +# Check whether --with-hesiod was given. +if test ${with_hesiod+y} +then : + withval=$with_hesiod; hesiod=$with_hesiod +else $as_nop + with_hesiod=no +fi + +if test "$with_hesiod" != "no"; then + HESIOD_DEFS=-DHESIOD + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for res_send in -lresolv" >&5 +printf %s "checking for res_send in -lresolv... " >&6; } +if test ${ac_cv_lib_resolv_res_send+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lresolv $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char res_send (); +int +main (void) +{ +return res_send (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_resolv_res_send=yes +else $as_nop + ac_cv_lib_resolv_res_send=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_send" >&5 +printf "%s\n" "$ac_cv_lib_resolv_res_send" >&6; } +if test "x$ac_cv_lib_resolv_res_send" = xyes +then : + res_lib=-lresolv +fi + + if test "$hesiod" != "yes"; then + HESIOD_LIBS="-L${hesiod}/lib -lhesiod $res_lib" + else + HESIOD_LIBS="-lhesiod $res_lib" + fi +else + HESIOD_DEFS= + HESIOD_LIBS= +fi + + # Check whether --enable-maintainer-mode was given. +if test ${enable_maintainer_mode+y} +then : + enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval +else $as_nop + USE_MAINTAINER_MODE=no +fi + +if test "$USE_MAINTAINER_MODE" = yes; then + MAINTAINER_MODE_TRUE= + MAINTAINER_MODE_FALSE='#' + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: enabling maintainer mode" >&5 +printf "%s\n" "$as_me: enabling maintainer mode" >&6;} +else + MAINTAINER_MODE_TRUE='#' + MAINTAINER_MODE_FALSE= +fi +MAINT=$MAINTAINER_MODE_TRUE + + + + CONFIG_RELTOPDIR=$ac_reltopdir + +lib_frag=$srcdir/$ac_config_fragdir/lib.in + +libobj_frag=$srcdir/$ac_config_fragdir/libobj.in + +libnover_frag=$srcdir/$ac_config_fragdir/libnover.in + +libpriv_frag=$srcdir/$ac_config_fragdir/libpriv.in + +libnodeps_frag=$srcdir/$ac_config_fragdir/libnodeps.in + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pragma weak references are supported" >&5 +printf %s "checking whether pragma weak references are supported... " >&6; } +if test ${krb5_cv_pragma_weak_ref+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#pragma weak flurbl +extern int flurbl(void); +int +main (void) +{ +if (&flurbl != 0) return flurbl(); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + krb5_cv_pragma_weak_ref=yes +else $as_nop + krb5_cv_pragma_weak_ref=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $krb5_cv_pragma_weak_ref" >&5 +printf "%s\n" "$krb5_cv_pragma_weak_ref" >&6; } +if test $krb5_cv_pragma_weak_ref = yes ; then + +printf "%s\n" "#define HAVE_PRAGMA_WEAK_REF 1" >>confdefs.h + +fi + + +# Check whether --with-ldap was given. +if test ${with_ldap+y} +then : + withval=$with_ldap; case "$withval" in + OPENLDAP) with_ldap=yes ;; + yes | no) ;; + *) as_fn_error $? "Invalid option value --with-ldap=\"$withval\"" "$LINENO" 5 ;; +esac +else $as_nop + with_ldap=no +fi + +if test "$with_ldap" = yes; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: enabling OpenLDAP database backend module support" >&5 +printf "%s\n" "$as_me: enabling OpenLDAP database backend module support" >&6;} + OPENLDAP_PLUGIN=yes +fi + +krb5_cv_host=$host + +. $ac_topdir/config/shlib.conf + +# Check whether --enable-delayed-initialization was given. +if test ${enable_delayed_initialization+y} +then : + enableval=$enable_delayed_initialization; +else $as_nop + enable_delayed_initialization=yes +fi + +case "$enable_delayed_initialization" in + yes) + +printf "%s\n" "#define DELAY_INITIALIZER 1" >>confdefs.h + ;; + no) ;; + *) as_fn_error $? "invalid option $enable_delayed_initialization for delayed-initialization" "$LINENO" 5 ;; +esac +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for constructor/destructor attribute support" >&5 +printf %s "checking for constructor/destructor attribute support... " >&6; } +if test ${krb5_cv_attr_constructor_destructor+y} +then : + printf %s "(cached) " >&6 +else $as_nop + rm -f conftest.1 conftest.2 +if test -r conftest.1 || test -r conftest.2 ; then + as_fn_error $? "write error in local file system?" "$LINENO" 5 +fi +true > conftest.1 +true > conftest.2 +if test -r conftest.1 && test -r conftest.2 ; then true ; else + as_fn_error $? "write error in local file system?" "$LINENO" 5 +fi +a=no +b=no +# blindly assume we have 'unlink'... +if test "$cross_compiling" = yes +then : + as_fn_error $? "Cannot test for constructor/destructor support when cross compiling" "$LINENO" 5 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +void foo1() __attribute__((constructor)); +void foo1() { unlink("conftest.1"); } +void foo2() __attribute__((destructor)); +void foo2() { unlink("conftest.2"); } +int main () { return 0; } +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + test -r conftest.1 || a=yes +test -r conftest.2 || b=yes +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +case $krb5_cv_host in +*-*-aix4.*) + # Under AIX 4.3.3, at least, shared library destructor functions + # appear to get executed in reverse link order (right to left), + # so that a library's destructor function may run after that of + # libraries it depends on, and may still have to access in the + # destructor. + # + # That counts as "not working", for me, but it's a much more + # complicated test case to set up. + b=no + ;; +esac +krb5_cv_attr_constructor_destructor="$a,$b" + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $krb5_cv_attr_constructor_destructor" >&5 +printf "%s\n" "$krb5_cv_attr_constructor_destructor" >&6; } +# Okay, krb5_cv_... should be set now. +case $krb5_cv_attr_constructor_destructor in + yes,*) + +printf "%s\n" "#define CONSTRUCTOR_ATTR_WORKS 1" >>confdefs.h + ;; +esac +case $krb5_cv_attr_constructor_destructor in + *,yes) + +printf "%s\n" "#define DESTRUCTOR_ATTR_WORKS 1" >>confdefs.h + ;; +esac + +if test -z "$use_linker_init_option" ; then + as_fn_error $? "ran INITFINI before checking shlib.conf?" "$LINENO" 5 +fi +if test "$use_linker_init_option" = yes; then + +printf "%s\n" "#define USE_LINKER_INIT_OPTION 1" >>confdefs.h + +fi +if test "$use_linker_fini_option" = yes; then + +printf "%s\n" "#define USE_LINKER_FINI_OPTION 1" >>confdefs.h + +fi + + +# Check whether --enable-thread-support was given. +if test ${enable_thread_support+y} +then : + enableval=$enable_thread_support; +else $as_nop + enable_thread_support=yes +fi + +if test "$enable_thread_support" = yes ; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: enabling thread support" >&5 +printf "%s\n" "$as_me: enabling thread support" >&6;} + +printf "%s\n" "#define ENABLE_THREADS 1" >>confdefs.h + +fi +if test "$enable_thread_support" = yes; then + + + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +ax_pthread_ok=no + +# We used to check for pthread.h first, but this fails if pthread.h +# requires special compiler flags (e.g. on Tru64 or Sequent). +# It gets checked for in the link test anyway. + +# First of all, check if the user has set any of the PTHREAD_LIBS, +# etcetera environment variables, and if threads linking works using +# them: +if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then + ax_pthread_save_CC="$CC" + ax_pthread_save_CFLAGS="$CFLAGS" + ax_pthread_save_LIBS="$LIBS" + if test "x$PTHREAD_CC" != "x" +then : + CC="$PTHREAD_CC" +fi + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + LIBS="$PTHREAD_LIBS $LIBS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5 +printf %s "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char pthread_join (); +int +main (void) +{ +return pthread_join (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ax_pthread_ok=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5 +printf "%s\n" "$ax_pthread_ok" >&6; } + if test "x$ax_pthread_ok" = "xno"; then + PTHREAD_LIBS="" + PTHREAD_CFLAGS="" + fi + CC="$ax_pthread_save_CC" + CFLAGS="$ax_pthread_save_CFLAGS" + LIBS="$ax_pthread_save_LIBS" +fi + +# We must check for the threads library under a number of different +# names; the ordering is very important because some systems +# (e.g. DEC) have both -lpthread and -lpthreads, where one of the +# libraries is broken (non-POSIX). + +# Create a list of thread flags to try. Items starting with a "-" are +# C compiler flags, and other items are library names, except for "none" +# which indicates that we try without any flags at all, and "pthread-config" +# which is a program returning the flags for the Pth emulation library. + +ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" + +# The ordering *is* (sometimes) important. Some notes on the +# individual items follow: + +# pthreads: AIX (must check this before -lpthread) +# none: in case threads are in libc; should be tried before -Kthread and +# other compiler flags to prevent continual compiler warnings +# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) +# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64 +# (Note: HP C rejects this with "bad form for `-t' option") +# -pthreads: Solaris/gcc (Note: HP C also rejects) +# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it +# doesn't hurt to check since this sometimes defines pthreads and +# -D_REENTRANT too), HP C (must be checked before -lpthread, which +# is present but should not be used directly; and before -mthreads, +# because the compiler interprets this as "-mt" + "-hreads") +# -mthreads: Mingw32/gcc, Lynx/gcc +# pthread: Linux, etcetera +# --thread-safe: KAI C++ +# pthread-config: use pthread-config program (for GNU Pth library) + +case $host_os in + + freebsd*) + + # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) + # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) + + ax_pthread_flags="-kthread lthread $ax_pthread_flags" + ;; + + hpux*) + + # From the cc(1) man page: "[-mt] Sets various -D flags to enable + # multi-threading and also sets -lpthread." + + ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags" + ;; + + openedition*) + + # IBM z/OS requires a feature-test macro to be defined in order to + # enable POSIX threads at all, so give the user a hint if this is + # not set. (We don't define these ourselves, as they can affect + # other portions of the system API in unpredictable ways.) + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +# if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS) + AX_PTHREAD_ZOS_MISSING +# endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1 +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5 +printf "%s\n" "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;} +fi +rm -rf conftest* + + ;; + + solaris*) + + # On Solaris (at least, for some versions), libc contains stubbed + # (non-functional) versions of the pthreads routines, so link-based + # tests will erroneously succeed. (N.B.: The stubs are missing + # pthread_cleanup_push, or rather a function called by this macro, + # so we could check for that, but who knows whether they'll stub + # that too in a future libc.) So we'll check first for the + # standard Solaris way of linking pthreads (-mt -lpthread). + + ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags" + ;; +esac + +# GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC) + +if test "x$GCC" = "xyes" +then : + ax_pthread_flags="-pthread -pthreads $ax_pthread_flags" +fi + +# The presence of a feature test macro requesting re-entrant function +# definitions is, on some systems, a strong hint that pthreads support is +# correctly enabled + +case $host_os in + darwin* | hpux* | linux* | osf* | solaris*) + ax_pthread_check_macro="_REENTRANT" + ;; + + aix*) + ax_pthread_check_macro="_THREAD_SAFE" + ;; + + *) + ax_pthread_check_macro="--" + ;; +esac +if test "x$ax_pthread_check_macro" = "x--" +then : + ax_pthread_check_cond=0 +else $as_nop + ax_pthread_check_cond="!defined($ax_pthread_check_macro)" +fi + +# Are we compiling with Clang? + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5 +printf %s "checking whether $CC is Clang... " >&6; } +if test ${ax_cv_PTHREAD_CLANG+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ax_cv_PTHREAD_CLANG=no + # Note that Autoconf sets GCC=yes for Clang as well as GCC + if test "x$GCC" = "xyes"; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Note: Clang 2.7 lacks __clang_[a-z]+__ */ +# if defined(__clang__) && defined(__llvm__) + AX_PTHREAD_CC_IS_CLANG +# endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1 +then : + ax_cv_PTHREAD_CLANG=yes +fi +rm -rf conftest* + + fi + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5 +printf "%s\n" "$ax_cv_PTHREAD_CLANG" >&6; } +ax_pthread_clang="$ax_cv_PTHREAD_CLANG" + +ax_pthread_clang_warning=no + +# Clang needs special handling, because older versions handle the -pthread +# option in a rather... idiosyncratic way + +if test "x$ax_pthread_clang" = "xyes"; then + + # Clang takes -pthread; it has never supported any other flag + + # (Note 1: This will need to be revisited if a system that Clang + # supports has POSIX threads in a separate library. This tends not + # to be the way of modern systems, but it's conceivable.) + + # (Note 2: On some systems, notably Darwin, -pthread is not needed + # to get POSIX threads support; the API is always present and + # active. We could reasonably leave PTHREAD_CFLAGS empty. But + # -pthread does define _REENTRANT, and while the Darwin headers + # ignore this macro, third-party headers might not.) + + PTHREAD_CFLAGS="-pthread" + PTHREAD_LIBS= + + ax_pthread_ok=yes + + # However, older versions of Clang make a point of warning the user + # that, in an invocation where only linking and no compilation is + # taking place, the -pthread option has no effect ("argument unused + # during compilation"). They expect -pthread to be passed in only + # when source code is being compiled. + # + # Problem is, this is at odds with the way Automake and most other + # C build frameworks function, which is that the same flags used in + # compilation (CFLAGS) are also used in linking. Many systems + # supported by AX_PTHREAD require exactly this for POSIX threads + # support, and in fact it is often not straightforward to specify a + # flag that is used only in the compilation phase and not in + # linking. Such a scenario is extremely rare in practice. + # + # Even though use of the -pthread flag in linking would only print + # a warning, this can be a nuisance for well-run software projects + # that build with -Werror. So if the active version of Clang has + # this misfeature, we search for an option to squash it. + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5 +printf %s "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; } +if test ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown + # Create an alternate version of $ac_link that compiles and + # links in two steps (.c -> .o, .o -> exe) instead of one + # (.c -> exe), because the warning occurs only in the second + # step + ax_pthread_save_ac_link="$ac_link" + ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g' + ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"` + ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)" + ax_pthread_save_CFLAGS="$CFLAGS" + for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do + if test "x$ax_pthread_try" = "xunknown" +then : + break +fi + CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS" + ac_link="$ax_pthread_save_ac_link" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int main(void){return 0;} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_link="$ax_pthread_2step_ac_link" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int main(void){return 0;} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + break +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + done + ac_link="$ax_pthread_save_ac_link" + CFLAGS="$ax_pthread_save_CFLAGS" + if test "x$ax_pthread_try" = "x" +then : + ax_pthread_try=no +fi + ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try" + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5 +printf "%s\n" "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; } + + case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in + no | unknown) ;; + *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;; + esac + +fi # $ax_pthread_clang = yes + +if test "x$ax_pthread_ok" = "xno"; then +for ax_pthread_try_flag in $ax_pthread_flags; do + + case $ax_pthread_try_flag in + none) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5 +printf %s "checking whether pthreads work without any flags... " >&6; } + ;; + + -mt,pthread) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5 +printf %s "checking whether pthreads work with -mt -lpthread... " >&6; } + PTHREAD_CFLAGS="-mt" + PTHREAD_LIBS="-lpthread" + ;; + + -*) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5 +printf %s "checking whether pthreads work with $ax_pthread_try_flag... " >&6; } + PTHREAD_CFLAGS="$ax_pthread_try_flag" + ;; + + pthread-config) + # Extract the first word of "pthread-config", so it can be a program name with args. +set dummy pthread-config; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ax_pthread_config+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$ax_pthread_config"; then + ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ax_pthread_config="yes" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no" +fi +fi +ax_pthread_config=$ac_cv_prog_ax_pthread_config +if test -n "$ax_pthread_config"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5 +printf "%s\n" "$ax_pthread_config" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + + if test "x$ax_pthread_config" = "xno" +then : + continue +fi + PTHREAD_CFLAGS="`pthread-config --cflags`" + PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" + ;; + + *) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5 +printf %s "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; } + PTHREAD_LIBS="-l$ax_pthread_try_flag" + ;; + esac + + ax_pthread_save_CFLAGS="$CFLAGS" + ax_pthread_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + LIBS="$PTHREAD_LIBS $LIBS" + + # Check for various functions. We must include pthread.h, + # since some functions may be macros. (On the Sequent, we + # need a special flag -Kthread to make this header compile.) + # We check for pthread_join because it is in -lpthread on IRIX + # while pthread_create is in libc. We check for pthread_attr_init + # due to DEC craziness with -lpthreads. We check for + # pthread_cleanup_push because it is one of the few pthread + # functions on Solaris that doesn't have a non-functional libc stub. + # We try pthread_create on general principles. + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +# if $ax_pthread_check_cond +# error "$ax_pthread_check_macro must be defined" +# endif + static void routine(void *a) { a = 0; } + static void *start_routine(void *a) { return a; } +int +main (void) +{ +pthread_t th; pthread_attr_t attr; + pthread_create(&th, 0, start_routine, 0); + pthread_join(th, 0); + pthread_attr_init(&attr); + pthread_cleanup_push(routine, 0); + pthread_cleanup_pop(0) /* ; */ + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ax_pthread_ok=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + + CFLAGS="$ax_pthread_save_CFLAGS" + LIBS="$ax_pthread_save_LIBS" + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5 +printf "%s\n" "$ax_pthread_ok" >&6; } + if test "x$ax_pthread_ok" = "xyes" +then : + break +fi + + PTHREAD_LIBS="" + PTHREAD_CFLAGS="" +done +fi + +# Various other checks: +if test "x$ax_pthread_ok" = "xyes"; then + ax_pthread_save_CFLAGS="$CFLAGS" + ax_pthread_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + LIBS="$PTHREAD_LIBS $LIBS" + + # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5 +printf %s "checking for joinable pthread attribute... " >&6; } +if test ${ax_cv_PTHREAD_JOINABLE_ATTR+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ax_cv_PTHREAD_JOINABLE_ATTR=unknown + for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main (void) +{ +int attr = $ax_pthread_attr; return attr /* ; */ + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + done + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5 +printf "%s\n" "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; } + if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \ + test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \ + test "x$ax_pthread_joinable_attr_defined" != "xyes" +then : + +printf "%s\n" "#define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR" >>confdefs.h + + ax_pthread_joinable_attr_defined=yes + +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5 +printf %s "checking whether more special flags are required for pthreads... " >&6; } +if test ${ax_cv_PTHREAD_SPECIAL_FLAGS+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ax_cv_PTHREAD_SPECIAL_FLAGS=no + case $host_os in + solaris*) + ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS" + ;; + esac + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5 +printf "%s\n" "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; } + if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \ + test "x$ax_pthread_special_flags_added" != "xyes" +then : + PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS" + ax_pthread_special_flags_added=yes +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5 +printf %s "checking for PTHREAD_PRIO_INHERIT... " >&6; } +if test ${ax_cv_PTHREAD_PRIO_INHERIT+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main (void) +{ +int i = PTHREAD_PRIO_INHERIT; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ax_cv_PTHREAD_PRIO_INHERIT=yes +else $as_nop + ax_cv_PTHREAD_PRIO_INHERIT=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5 +printf "%s\n" "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; } + if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \ + test "x$ax_pthread_prio_inherit_defined" != "xyes" +then : + +printf "%s\n" "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h + + ax_pthread_prio_inherit_defined=yes + +fi + + CFLAGS="$ax_pthread_save_CFLAGS" + LIBS="$ax_pthread_save_LIBS" + + # More AIX lossage: compile with *_r variant + if test "x$GCC" != "xyes"; then + case $host_os in + aix*) + case "x/$CC" in #( + x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) : + #handle absolute path differently from PATH based program lookup + case "x$CC" in #( + x/*) : + if as_fn_executable_p ${CC}_r +then : + PTHREAD_CC="${CC}_r" +fi ;; #( + *) : + for ac_prog in ${CC}_r +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_PTHREAD_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$PTHREAD_CC"; then + ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_PTHREAD_CC="$ac_prog" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +PTHREAD_CC=$ac_cv_prog_PTHREAD_CC +if test -n "$PTHREAD_CC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5 +printf "%s\n" "$PTHREAD_CC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + + test -n "$PTHREAD_CC" && break +done +test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" + ;; +esac ;; #( + *) : + ;; +esac + ;; + esac + fi +fi + +test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" + + + + + +# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: +if test "x$ax_pthread_ok" = "xyes"; then + +printf "%s\n" "#define HAVE_PTHREAD 1" >>confdefs.h + + : +else + ax_pthread_ok=no + as_fn_error $? "cannot determine options for enabling thread support; try --disable-thread-support" "$LINENO" 5 +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: PTHREAD_CC = $PTHREAD_CC" >&5 +printf "%s\n" "$as_me: PTHREAD_CC = $PTHREAD_CC" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: PTHREAD_CFLAGS = $PTHREAD_CFLAGS" >&5 +printf "%s\n" "$as_me: PTHREAD_CFLAGS = $PTHREAD_CFLAGS" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: PTHREAD_LIBS = $PTHREAD_LIBS" >&5 +printf "%s\n" "$as_me: PTHREAD_LIBS = $PTHREAD_LIBS" >&6;} + # AIX and Tru64 don't support weak references, and don't have + # stub versions of the pthread code in libc. + case "${host_os}" in + aix* | osf*) + # On these platforms, we'll always pull in the thread support. + LIBS="$LIBS $PTHREAD_LIBS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + # We don't need to sometimes add the flags we've just folded in... + PTHREAD_LIBS= + PTHREAD_CFLAGS= + ;; + hpux*) + # These are the flags that "gcc -pthread" adds. But we don't + # want "-pthread" because that has link-time effects, and we + # don't exclude CFLAGS when linking. *sigh* + PTHREAD_CFLAGS="-D_REENTRANT -D_THREAD_SAFE -D_POSIX_C_SOURCE=199506L" + ;; + solaris2.[1-9]) + # On Solaris 10 with gcc 3.4.3, the autoconf archive macro doesn't + # get the right result. XXX What about Solaris 9 and earlier? + if test "$GCC" = yes ; then + PTHREAD_CFLAGS="-D_REENTRANT -pthreads" + fi + ;; + solaris*) + # On Solaris 10 with gcc 3.4.3, the autoconf archive macro doesn't + # get the right result. + if test "$GCC" = yes ; then + PTHREAD_CFLAGS="-D_REENTRANT -pthreads" + fi + # On Solaris 10, the thread support is always available in libc. + +printf "%s\n" "#define NO_WEAK_PTHREADS 1" >>confdefs.h + + ;; + esac + THREAD_SUPPORT=1 +else + PTHREAD_CC="$CC" + PTHREAD_CFLAGS="" + PTHREAD_LIBS="" + THREAD_SUPPORT=0 +fi + +ac_fn_c_check_func "$LINENO" "pthread_once" "ac_cv_func_pthread_once" +if test "x$ac_cv_func_pthread_once" = xyes +then : + printf "%s\n" "#define HAVE_PTHREAD_ONCE 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "pthread_rwlock_init" "ac_cv_func_pthread_rwlock_init" +if test "x$ac_cv_func_pthread_rwlock_init" = xyes +then : + printf "%s\n" "#define HAVE_PTHREAD_RWLOCK_INIT 1" >>confdefs.h + +fi + +old_CC="$CC" +test "$PTHREAD_CC" != "" && test "$ac_cv_c_compiler_gnu" = no && CC=$PTHREAD_CC +old_CFLAGS="$CFLAGS" +# On Solaris, -pthreads is added to CFLAGS, no extra explicit libraries. +CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + +old_LIBS="$LIBS" +LIBS="$PTHREAD_LIBS $LIBS" +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: rechecking with PTHREAD_... options" >&5 +printf "%s\n" "$as_me: rechecking with PTHREAD_... options" >&6;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_rwlock_init in -lc" >&5 +printf %s "checking for pthread_rwlock_init in -lc... " >&6; } +if test ${ac_cv_lib_c_pthread_rwlock_init+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lc $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char pthread_rwlock_init (); +int +main (void) +{ +return pthread_rwlock_init (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_c_pthread_rwlock_init=yes +else $as_nop + ac_cv_lib_c_pthread_rwlock_init=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_pthread_rwlock_init" >&5 +printf "%s\n" "$ac_cv_lib_c_pthread_rwlock_init" >&6; } +if test "x$ac_cv_lib_c_pthread_rwlock_init" = xyes +then : + +printf "%s\n" "#define HAVE_PTHREAD_RWLOCK_INIT_IN_THREAD_LIB 1" >>confdefs.h + +fi + +LIBS="$old_LIBS" +CC="$old_CC" +CFLAGS="$old_CFLAGS" + + +old_LIBS="$LIBS" +DL_LIB= +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 +printf %s "checking for library containing dlopen... " >&6; } +if test ${ac_cv_search_dlopen+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char dlopen (); +int +main (void) +{ +return dlopen (); + ; + return 0; +} +_ACEOF +for ac_lib in '' dl +do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO" +then : + ac_cv_search_dlopen=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext + if test ${ac_cv_search_dlopen+y} +then : + break +fi +done +if test ${ac_cv_search_dlopen+y} +then : + +else $as_nop + ac_cv_search_dlopen=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 +printf "%s\n" "$ac_cv_search_dlopen" >&6; } +ac_res=$ac_cv_search_dlopen +if test "$ac_res" != no +then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +if test "$ac_cv_search_dlopen" != "none required"; then + DL_LIB=$ac_cv_search_dlopen +fi +LIBS="$old_LIBS" + +printf "%s\n" "#define USE_DLOPEN 1" >>confdefs.h + +fi + + + + +KRB5_VERSION=1.18.3 + + + + + + + + + + + + +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. +set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_PKG_CONFIG+y} +then : + printf %s "(cached) " >&6 +else $as_nop + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG +if test -n "$PKG_CONFIG"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +printf "%s\n" "$PKG_CONFIG" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + +fi +if test -z "$ac_cv_path_PKG_CONFIG"; then + ac_pt_PKG_CONFIG=$PKG_CONFIG + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_ac_pt_PKG_CONFIG+y} +then : + printf %s "(cached) " >&6 +else $as_nop + case $ac_pt_PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG +if test -n "$ac_pt_PKG_CONFIG"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 +printf "%s\n" "$ac_pt_PKG_CONFIG" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + if test "x$ac_pt_PKG_CONFIG" = x; then + PKG_CONFIG="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + PKG_CONFIG=$ac_pt_PKG_CONFIG + fi +else + PKG_CONFIG="$ac_cv_path_PKG_CONFIG" +fi + +fi +if test -n "$PKG_CONFIG"; then + _pkg_min_version=0.9.0 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 +printf %s "checking pkg-config is at least version $_pkg_min_version... " >&6; } + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + PKG_CONFIG="" + fi +fi + +ac_header= ac_cache= +for ac_item in $ac_header_c_list +do + if test $ac_cache; then + ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default" + if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then + printf "%s\n" "#define $ac_item 1" >> confdefs.h + fi + ac_header= ac_cache= + elif test $ac_header; then + ac_cache=$ac_item + else + ac_header=$ac_item + fi +done + + + + + + + + +if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes +then : + +printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default" +if test "x$ac_cv_header_stdint_h" = xyes +then : + +else $as_nop + as_fn_error $? "stdint.h is required" "$LINENO" 5 +fi + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether integers are two's complement" >&5 +printf %s "checking whether integers are two's complement... " >&6; } +if test ${krb5_cv_ints_twos_compl+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +int +main (void) +{ +static int test_array [1 - 2 * !(/* Basic two's complement check */ + ~(-1) == 0 && ~(-1L) == 0L && + /* Check that values with sign bit 1 and value bits 0 are valid */ + -(INT_MIN + 1) == INT_MAX && -(LONG_MIN + 1) == LONG_MAX && + /* Check that unsigned-to-signed conversions preserve bit patterns */ + (int)((unsigned int)INT_MAX + 1) == INT_MIN && + (long)((unsigned long)LONG_MAX + 1) == LONG_MIN)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + krb5_cv_ints_twos_compl=yes +else $as_nop + krb5_cv_ints_twos_compl=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $krb5_cv_ints_twos_compl" >&5 +printf "%s\n" "$krb5_cv_ints_twos_compl" >&6; } + +if test "$krb5_cv_ints_twos_compl" = "no"; then + as_fn_error $? "integers are not two's complement" "$LINENO" 5 +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether CHAR_BIT is 8" >&5 +printf %s "checking whether CHAR_BIT is 8... " >&6; } +if test ${krb5_cv_char_bit_8+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#if CHAR_BIT != 8 + #error CHAR_BIT != 8 +#endif + +_ACEOF +if ac_fn_c_try_cpp "$LINENO" +then : + krb5_cv_char_bit_8=yes +else $as_nop + krb5_cv_char_bit_8=no +fi +rm -f conftest.err conftest.i conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $krb5_cv_char_bit_8" >&5 +printf "%s\n" "$krb5_cv_char_bit_8" >&6; } + +if test "$krb5_cv_char_bit_8" = "no"; then + as_fn_error $? "CHAR_BIT is not 8" "$LINENO" 5 +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if va_copy is available" >&5 +printf %s "checking if va_copy is available... " >&6; } +if test ${krb5_cv_va_copy+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +void f(va_list ap) { + va_list ap2; + va_copy(ap2, ap); + va_end(ap2); +} +va_list x; +int main() +{ + f(x); + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + krb5_cv_va_copy=yes +else $as_nop + krb5_cv_va_copy=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $krb5_cv_va_copy" >&5 +printf "%s\n" "$krb5_cv_va_copy" >&6; } +if test "$krb5_cv_va_copy" = yes; then + +printf "%s\n" "#define HAS_VA_COPY 1" >>confdefs.h + +fi + +# Note that this isn't checking if the copied value *works*, just +# whether the C language constraints permit the copying. If +# va_list is defined as an array type, it can't be assigned. +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if va_list objects can be copied by assignment" >&5 +printf %s "checking if va_list objects can be copied by assignment... " >&6; } +if test ${krb5_cv_va_simple_copy+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +void f(va_list va2) { + va_list va1; + va1 = va2; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + krb5_cv_va_simple_copy=yes +else $as_nop + krb5_cv_va_simple_copy=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $krb5_cv_va_simple_copy" >&5 +printf "%s\n" "$krb5_cv_va_simple_copy" >&6; } +if test "$krb5_cv_va_simple_copy" = yes; then + +printf "%s\n" "#define CAN_COPY_VA_LIST 1" >>confdefs.h + +fi + +# The following lines are so that configure --help gives some global +# configuration options. + + +# Check whether --enable-static was given. +if test ${enable_static+y} +then : + enableval=$enable_static; +else $as_nop + enable_static=no +fi + +# Check whether --enable-shared was given. +if test ${enable_shared+y} +then : + enableval=$enable_shared; +else $as_nop + enable_shared=yes +fi + + +if test "x$enable_static" = "x$enable_shared"; then + as_fn_error $? "--enable-static must be specified with --disable-shared" "$LINENO" 5 +fi + +# Check whether --enable-rpath was given. +if test ${enable_rpath+y} +then : + enableval=$enable_rpath; +else $as_nop + enable_rpath=yes +fi + + +if test "x$enable_rpath" != xyes ; then + # Unset the rpath flag values set by shlib.conf + SHLIB_RPATH_FLAGS= + RPATH_FLAG= + PROG_RPATH_FLAGS= +fi + +if test "$SHLIBEXT" = ".so-nobuild"; then + as_fn_error $? "Shared libraries are not yet supported on this platform." "$LINENO" 5 +fi + +DEPLIBEXT=$SHLIBEXT + +if test "x$enable_static" = xyes; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: using static libraries" >&5 +printf "%s\n" "$as_me: using static libraries" >&6;} + LIBLIST='lib$(LIBBASE)$(STLIBEXT)' + LIBLINKS='$(TOPLIBD)/lib$(LIBBASE)$(STLIBEXT)' + PLUGIN='libkrb5_$(LIBBASE)$(STLIBEXT)' + PLUGINLINK='$(TOPLIBD)/libkrb5_$(LIBBASE)$(STLIBEXT)' + PLUGININST=install-static + OBJLISTS=OBJS.ST + LIBINSTLIST=install-static + DEPLIBEXT=$STLIBEXT + +printf "%s\n" "#define STATIC_PLUGINS 1" >>confdefs.h + + + KDB5_PLUGIN_DEPLIBS='$(TOPLIBD)/libkrb5_db2$(DEPLIBEXT)' + KDB5_PLUGIN_LIBS='-lkrb5_db2' + if test "x$OPENLDAP_PLUGIN" = xyes; then + KDB5_PLUGIN_DEBLIBS=$KDB5_PLUGIN_DEPLIBS' $(TOPLIBD)/libkrb5_ldap$(DEPLIBEXT) $(TOPLIBD)/libkdb_ldap$(DEPLIBEXT)' + KDB5_PLUGIN_LIBS=$KDB5_PLUGIN_LIBS' -lkrb5_kldap -lkdb_ldap $(LDAP_LIBS)' + fi + # kadm5srv_mit normally comes before kdb on the link line. Add it + # again after the KDB plugins, since they depend on it for XDR stuff. + KDB5_PLUGIN_DEPLIBS=$KDB5_PLUGIN_DEPLIBS' $(TOPLIBD)/libkadm5srv_mit$(DEPLIBEXT)' + KDB5_PLUGIN_LIBS=$KDB5_PLUGIN_LIBS' -lkadm5srv_mit' + + # avoid duplicate rules generation for AIX and such + SHLIBEXT=.so-nobuild + SHLIBVEXT=.so.v-nobuild + SHLIBSEXT=.so.s-nobuild +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: using shared libraries" >&5 +printf "%s\n" "$as_me: using shared libraries" >&6;} + + # Clear some stuff in case of AIX, etc. + if test "$STLIBEXT" = "$SHLIBEXT" ; then + STLIBEXT=.a-nobuild + fi + case "$SHLIBSEXT" in + .so.s-nobuild) + LIBLIST='lib$(LIBBASE)$(SHLIBEXT)' + LIBLINKS='$(TOPLIBD)/lib$(LIBBASE)$(SHLIBEXT) $(TOPLIBD)/lib$(LIBBASE)$(SHLIBVEXT)' + LIBINSTLIST="install-shared" + ;; + *) + LIBLIST='lib$(LIBBASE)$(SHLIBEXT) lib$(LIBBASE)$(SHLIBSEXT)' + LIBLINKS='$(TOPLIBD)/lib$(LIBBASE)$(SHLIBEXT) $(TOPLIBD)/lib$(LIBBASE)$(SHLIBVEXT) $(TOPLIBD)/lib$(LIBBASE)$(SHLIBSEXT)' + LIBINSTLIST="install-shlib-soname" + ;; + esac + OBJLISTS="OBJS.SH" + PLUGIN='$(LIBBASE)$(DYNOBJEXT)' + PLUGINLINK='../$(PLUGIN)' + PLUGININST=install-plugin + KDB5_PLUGIN_DEPLIBS= + KDB5_PLUGIN_LIBS= +fi +CC_LINK="$CC_LINK_SHARED" +CXX_LINK="$CXX_LINK_SHARED" + +if test -z "$LIBLIST"; then + as_fn_error $? "must enable one of shared or static libraries" "$LINENO" 5 +fi + +# Check whether to build profiled libraries. +# Check whether --enable-profiled was given. +if test ${enable_profiled+y} +then : + enableval=$enable_profiled; if test "$enableval" = yes; then + as_fn_error $? "Sorry, profiled libraries do not work in this release." "$LINENO" 5 +fi +fi + + +TCL_INCLUDES= +TCL_LIBPATH= +TCL_RPATH= +TCL_LIBS= +TCL_WITH= +tcl_dir= + +# Check whether --with-tcl was given. +if test ${with_tcl+y} +then : + withval=$with_tcl; +else $as_nop + with_tcl=try +fi + +if test "$with_tcl" = no ; then + true +elif test "$with_tcl" = yes -o "$with_tcl" = try ; then + tcl_dir=/usr + if test ! -r /usr/lib/tclConfig.sh; then + cat >> conftest <<\EOF +puts "tcl_dir=$tcl_library" +EOF + if tclsh conftest >conftest.out 2>/dev/null; then + if grep tcl_dir= conftest.out >/dev/null 2>&1; then + t=`sed s/tcl_dir=// conftest.out` + tcl_dir=$t + fi + fi # tclsh ran script okay + rm -f conftest conftest.out + fi # no /usr/lib/tclConfig.sh +else + tcl_dir=$with_tcl +fi +if test "$with_tcl" != no ; then + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tclConfig.sh" >&5 +printf %s "checking for tclConfig.sh... " >&6; } +if test -r "$tcl_dir/lib/tclConfig.sh" ; then + tcl_conf="$tcl_dir/lib/tclConfig.sh" +elif test -r "$tcl_dir/tclConfig.sh" ; then + tcl_conf="$tcl_dir/tclConfig.sh" +elif test -r "$tcl_dir/../tclConfig.sh" ; then + tcl_conf="$tcl_dir/../tclConfig.sh" +else + tcl_conf= + lib="$tcl_dir/lib" + for d in "$lib" "$lib"/tcl7.[0-9] "$lib"/tcl8.[0-9] ; do + if test -r "$d/tclConfig.sh" ; then + tcl_conf="$tcl_conf $d/tclConfig.sh" + fi + done + fi +if test -n "$tcl_conf" ; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_conf" >&5 +printf "%s\n" "$tcl_conf" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5 +printf "%s\n" "not found" >&6; } +fi +tcl_ok_conf= +tcl_vers_maj= +tcl_vers_min= +old_CPPFLAGS=$CPPFLAGS +old_LIBS=$LIBS +old_LDFLAGS=$LDFLAGS +if test -n "$tcl_conf" ; then + for file in $tcl_conf ; do + TCL_MAJOR_VERSION=x ; TCL_MINOR_VERSION=x + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Tcl info in $file" >&5 +printf %s "checking Tcl info in $file... " >&6; } + . $file + v=$TCL_MAJOR_VERSION.$TCL_MINOR_VERSION + if test -z "$tcl_vers_maj" \ + || test "$tcl_vers_maj" -lt "$TCL_MAJOR_VERSION" \ + || test "$tcl_vers_maj" = "$TCL_MAJOR_VERSION" -a "$tcl_vers_min" -lt "$TCL_MINOR_VERSION" ; then + for incdir in "$TCL_PREFIX/include/tcl$v" "$TCL_PREFIX/include" ; do + if test -r "$incdir/tcl.h" -o -r "$incdir/tcl/tcl.h" ; then + CPPFLAGS="$old_CPPFLAGS -I$incdir" + break + fi + done + LIBS="$old_LIBS `eval echo x $TCL_LIB_SPEC $TCL_LIBS | sed 's/^x//'`" + LDFLAGS="$old_LDFLAGS $TCL_LD_FLAGS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ +Tcl_CreateInterp (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + tcl_ok_conf=$file + tcl_vers_maj=$TCL_MAJOR_VERSION + tcl_vers_min=$TCL_MINOR_VERSION + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $v - working" >&5 +printf "%s\n" "$v - working" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $v - compilation failed" >&5 +printf "%s\n" "$v - compilation failed" >&6; } + +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: older version $v" >&5 +printf "%s\n" "older version $v" >&6; } + fi + done +fi +CPPFLAGS=$old_CPPFLAGS +LIBS=$old_LIBS +LDFLAGS=$old_LDFLAGS +tcl_header=no +tcl_lib=no +if test -n "$tcl_ok_conf" ; then + . $tcl_ok_conf + TCL_INCLUDES= + for incdir in "$TCL_PREFIX/include/tcl$v" "$TCL_PREFIX/include" ; do + if test -r "$incdir/tcl.h" -o -r "$incdir/tcl/tcl.h" ; then + if test "$incdir" != "/usr/include" ; then + TCL_INCLUDES=-I$incdir + fi + break + fi + done + # Need eval because the first-level expansion could reference + # variables like ${TCL_DBGX}. + eval TCL_LIBS='"'$TCL_LIB_SPEC $TCL_LIBS $TCL_DL_LIBS'"' + TCL_LIBPATH="-L$TCL_EXEC_PREFIX/lib" + TCL_RPATH=":$TCL_EXEC_PREFIX/lib" + if test "$DEPLIBEXT" != "$SHLIBEXT" && test -n "$RPATH_FLAG"; then + TCL_MAYBE_RPATH='$(RPATH_FLAG)'"$TCL_EXEC_PREFIX/lib$RPATH_TAIL" + else + TCL_MAYBE_RPATH= + fi + CPPFLAGS="$old_CPPFLAGS $TCL_INCLUDES" + ac_fn_c_check_header_compile "$LINENO" "tcl.h" "ac_cv_header_tcl_h" "$ac_includes_default" +if test "x$ac_cv_header_tcl_h" = xyes +then : + +printf "%s\n" "#define HAVE_TCL_H 1" >>confdefs.h + tcl_header=yes +fi + + if test $tcl_header=no; then + ac_fn_c_check_header_compile "$LINENO" "tcl/tcl.h" "ac_cv_header_tcl_tcl_h" "$ac_includes_default" +if test "x$ac_cv_header_tcl_tcl_h" = xyes +then : + +printf "%s\n" "#define HAVE_TCL_TCL_H 1" >>confdefs.h + tcl_header=yes +fi + + fi + CPPFLAGS="$old_CPPFLAGS" + tcl_lib=yes +else + # If we read a tclConfig.sh file, it probably set this. + TCL_LIBS= +fi + + + + + + + if test $tcl_lib = no ; then + if test "$with_tcl" != try ; then + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: trying old tcl search code" >&5 +printf "%s\n" "$as_me: WARNING: trying old tcl search code" >&2;} +if test "$with_tcl" != yes -a "$with_tcl" != no; then + TCL_INCLUDES=-I$with_tcl/include + TCL_LIBPATH=-L$with_tcl/lib + TCL_RPATH=:$with_tcl/lib +fi +if test "$with_tcl" != no ; then + krb5_save_CPPFLAGS="$CPPFLAGS" + krb5_save_LDFLAGS="$LDFLAGS" + CPPFLAGS="$CPPFLAGS $TCL_INCLUDES" + LDFLAGS="$LDFLAGS $TCL_LIBPATH" + tcl_header=no + ac_fn_c_check_header_compile "$LINENO" "tcl.h" "ac_cv_header_tcl_h" "$ac_includes_default" +if test "x$ac_cv_header_tcl_h" = xyes +then : + +printf "%s\n" "#define HAVE_TCL_H 1" >>confdefs.h + tcl_header=yes +fi + + if test $tcl_header=no; then + ac_fn_c_check_header_compile "$LINENO" "tcl/tcl.h" "ac_cv_header_tcl_tcl_h" "$ac_includes_default" +if test "x$ac_cv_header_tcl_tcl_h" = xyes +then : + +printf "%s\n" "#define HAVE_TCL_TCL_H 1" >>confdefs.h + tcl_header=yes +fi + + fi + + if test $tcl_header = yes ; then + tcl_lib=no + + if test $tcl_lib = no; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Tcl_CreateCommand in -ltcl8.0" >&5 +printf %s "checking for Tcl_CreateCommand in -ltcl8.0... " >&6; } +if test ${ac_cv_lib_tcl8_0_Tcl_CreateCommand+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-ltcl8.0 -lm $DL_LIB $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char Tcl_CreateCommand (); +int +main (void) +{ +return Tcl_CreateCommand (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_tcl8_0_Tcl_CreateCommand=yes +else $as_nop + ac_cv_lib_tcl8_0_Tcl_CreateCommand=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tcl8_0_Tcl_CreateCommand" >&5 +printf "%s\n" "$ac_cv_lib_tcl8_0_Tcl_CreateCommand" >&6; } +if test "x$ac_cv_lib_tcl8_0_Tcl_CreateCommand" = xyes +then : + TCL_LIBS="$TCL_LIBS -ltcl8.0 -lm $DL_LIB $LIBS" + tcl_lib=yes +fi + + fi + if test $tcl_lib = no; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Tcl_CreateCommand in -ltcl7.6" >&5 +printf %s "checking for Tcl_CreateCommand in -ltcl7.6... " >&6; } +if test ${ac_cv_lib_tcl7_6_Tcl_CreateCommand+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-ltcl7.6 -lm $DL_LIB $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char Tcl_CreateCommand (); +int +main (void) +{ +return Tcl_CreateCommand (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_tcl7_6_Tcl_CreateCommand=yes +else $as_nop + ac_cv_lib_tcl7_6_Tcl_CreateCommand=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tcl7_6_Tcl_CreateCommand" >&5 +printf "%s\n" "$ac_cv_lib_tcl7_6_Tcl_CreateCommand" >&6; } +if test "x$ac_cv_lib_tcl7_6_Tcl_CreateCommand" = xyes +then : + TCL_LIBS="$TCL_LIBS -ltcl7.6 -lm $DL_LIB $LIBS" + tcl_lib=yes +fi + + fi + if test $tcl_lib = no; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Tcl_CreateCommand in -ltcl7.5" >&5 +printf %s "checking for Tcl_CreateCommand in -ltcl7.5... " >&6; } +if test ${ac_cv_lib_tcl7_5_Tcl_CreateCommand+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-ltcl7.5 -lm $DL_LIB $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char Tcl_CreateCommand (); +int +main (void) +{ +return Tcl_CreateCommand (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_tcl7_5_Tcl_CreateCommand=yes +else $as_nop + ac_cv_lib_tcl7_5_Tcl_CreateCommand=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tcl7_5_Tcl_CreateCommand" >&5 +printf "%s\n" "$ac_cv_lib_tcl7_5_Tcl_CreateCommand" >&6; } +if test "x$ac_cv_lib_tcl7_5_Tcl_CreateCommand" = xyes +then : + TCL_LIBS="$TCL_LIBS -ltcl7.5 -lm $DL_LIB $LIBS" + tcl_lib=yes +fi + + + fi + if test $tcl_lib = no ; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Tcl_CreateCommand in -ltcl" >&5 +printf %s "checking for Tcl_CreateCommand in -ltcl... " >&6; } +if test ${ac_cv_lib_tcl_Tcl_CreateCommand+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-ltcl -lm $DL_LIB $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char Tcl_CreateCommand (); +int +main (void) +{ +return Tcl_CreateCommand (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_tcl_Tcl_CreateCommand=yes +else $as_nop + ac_cv_lib_tcl_Tcl_CreateCommand=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tcl_Tcl_CreateCommand" >&5 +printf "%s\n" "$ac_cv_lib_tcl_Tcl_CreateCommand" >&6; } +if test "x$ac_cv_lib_tcl_Tcl_CreateCommand" = xyes +then : + TCL_LIBS="$TCL_LIBS -ltcl -lm $DL_LIB $LIBS" + tcl_lib=yes +fi + + + fi + if test $tcl_lib = no ; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: \"tcl.h found but not library\"" >&5 +printf "%s\n" "$as_me: WARNING: \"tcl.h found but not library\"" >&2;} + fi + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Could not find Tcl which is needed for the kadm5 tests" >&5 +printf "%s\n" "$as_me: WARNING: Could not find Tcl which is needed for the kadm5 tests" >&2;} + TCL_LIBS= + fi + CPPFLAGS="$krb5_save_CPPFLAGS" + LDFLAGS="$krb5_save_LDFLAGS" + + + + +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: \"Not looking for Tcl library\"" >&5 +printf "%s\n" "\"Not looking for Tcl library\"" >&6; } +fi + + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Could not find Tcl which is needed for some tests" >&5 +printf "%s\n" "$as_me: WARNING: Could not find Tcl which is needed for some tests" >&2;} + fi + fi +fi +# If "yes" or pathname, error out if not found. +if test "$with_tcl" != no -a "$with_tcl" != try ; then + if test "$tcl_header $tcl_lib" != "yes yes" ; then + as_fn_error $? "Could not find Tcl" "$LINENO" 5 + fi +fi + +# Check whether --enable-athena was given. +if test ${enable_athena+y} +then : + enableval=$enable_athena; +fi + + +# Begin autoconf tests for the Makefiles generated out of the top-level +# configure.in... + + + + + + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 +printf %s "checking whether ln -s works... " >&6; } +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 +printf "%s\n" "no, using $LN_S" >&6; } +fi + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_RANLIB+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 +printf "%s\n" "$RANLIB" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_RANLIB+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 +printf "%s\n" "$ac_ct_RANLIB" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi +else + RANLIB="$ac_cv_prog_RANLIB" +fi + +# Extract the first word of "ar", so it can be a program name with args. +set dummy ar; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ARCHIVE+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$ARCHIVE"; then + ac_cv_prog_ARCHIVE="$ARCHIVE" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ARCHIVE="ar cqv" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_prog_ARCHIVE" && ac_cv_prog_ARCHIVE="false" +fi +fi +ARCHIVE=$ac_cv_prog_ARCHIVE +if test -n "$ARCHIVE"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ARCHIVE" >&5 +printf "%s\n" "$ARCHIVE" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + +# Extract the first word of "ar", so it can be a program name with args. +set dummy ar; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ARADD+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$ARADD"; then + ac_cv_prog_ARADD="$ARADD" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ARADD="ar cruv" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_prog_ARADD" && ac_cv_prog_ARADD="false" +fi +fi +ARADD=$ac_cv_prog_ARADD +if test -n "$ARADD"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ARADD" >&5 +printf "%s\n" "$ARADD" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + + + # Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +# Reject install programs that cannot install multiple files. +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 +printf %s "checking for a BSD-compatible install... " >&6; } +if test -z "$INSTALL"; then +if test ${ac_cv_path_install+y} +then : + printf %s "(cached) " >&6 +else $as_nop + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + # Account for fact that we put trailing slashes in our PATH walk. +case $as_dir in #(( + ./ | /[cC]/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then + if test $ac_prog = install && + grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + rm -rf conftest.one conftest.two conftest.dir + echo one > conftest.one + echo two > conftest.two + mkdir conftest.dir + if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir/" && + test -s conftest.one && test -s conftest.two && + test -s conftest.dir/conftest.one && + test -s conftest.dir/conftest.two + then + ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + fi + done + done + ;; +esac + + done +IFS=$as_save_IFS + +rm -rf conftest.one conftest.two conftest.dir + +fi + if test ${ac_cv_path_install+y}; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 +printf "%s\n" "$INSTALL" >&6; } + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +# Extract the first word of "ar", so it can be a program name with args. +set dummy ar; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_AR+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_AR="ar" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="false" +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +printf "%s\n" "$AR" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + +if test "$AR" = "false"; then + as_fn_error $? "ar not found in PATH" "$LINENO" 5 +fi +# Extract the first word of "perl", so it can be a program name with args. +set dummy perl; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_PERL+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$PERL"; then + ac_cv_prog_PERL="$PERL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_PERL="perl" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_prog_PERL" && ac_cv_prog_PERL="false" +fi +fi +PERL=$ac_cv_prog_PERL +if test -n "$PERL"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5 +printf "%s\n" "$PERL" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + +if test "$ac_cv_prog_PERL" = "false"; then + as_fn_error $? "Perl is now required for Kerberos builds." "$LINENO" 5 +fi + + + + + + + + + + + + + + + + + + + + + + + + + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working regcomp" >&5 +printf %s "checking for working regcomp... " >&6; } +if test ${ac_cv_func_regcomp+y} +then : + printf %s "(cached) " >&6 +else $as_nop + +if test "$cross_compiling" = yes +then : + as_fn_error $? "Cannot test regcomp when cross compiling" "$LINENO" 5 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +regex_t x; regmatch_t m; +int main() { return regcomp(&x,"pat.*",0) || regexec(&x,"pattern",1,&m,0); } + +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + ac_cv_func_regcomp=yes +else $as_nop + ac_cv_func_regcomp=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_regcomp" >&5 +printf "%s\n" "$ac_cv_func_regcomp" >&6; } +test $ac_cv_func_regcomp = yes && +printf "%s\n" "#define HAVE_REGCOMP 1" >>confdefs.h + +if test $ac_cv_func_regcomp = no; then + save_LIBS="$LIBS" + LIBS=-lgen + ac_fn_c_check_func "$LINENO" "compile" "ac_cv_func_compile" +if test "x$ac_cv_func_compile" = xyes +then : + printf "%s\n" "#define HAVE_COMPILE 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "step" "ac_cv_func_step" +if test "x$ac_cv_func_step" = xyes +then : + printf "%s\n" "#define HAVE_STEP 1" >>confdefs.h + +fi + + LIBS="$save_LIBS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for compile in -lgen" >&5 +printf %s "checking for compile in -lgen... " >&6; } +if test ${ac_cv_lib_gen_compile+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lgen $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char compile (); +int +main (void) +{ +return compile (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_gen_compile=yes +else $as_nop + ac_cv_lib_gen_compile=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gen_compile" >&5 +printf "%s\n" "$ac_cv_lib_gen_compile" >&6; } +if test "x$ac_cv_lib_gen_compile" = xyes +then : + GEN_LIB=-lgen +else $as_nop + GEN_LIB= +fi + + +fi + + + + + + +# for kprop +ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default" +if test "x$ac_cv_type_mode_t" = xyes +then : + +else $as_nop + +printf "%s\n" "#define mode_t int" >>confdefs.h + +fi + + + + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if daemon needs a prototype provided" >&5 +printf %s "checking if daemon needs a prototype provided... " >&6; } +if test ${krb5_cv_func_daemon_noproto+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef HAVE_UNISTD_H +#include +#endif +int +main (void) +{ +#undef daemon +struct k5foo {int foo; } xx; +extern int daemon (struct k5foo*); +daemon(&xx); + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + krb5_cv_func_daemon_noproto=yes +else $as_nop + krb5_cv_func_daemon_noproto=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $krb5_cv_func_daemon_noproto" >&5 +printf "%s\n" "$krb5_cv_func_daemon_noproto" >&6; } +if test $krb5_cv_func_daemon_noproto = yes; then + +printf "%s\n" "#define NEED_DAEMON_PROTO 1" >>confdefs.h + +fi + + + +sock_set=no +for sock_arg1 in "struct sockaddr *" "void *" +do + for sock_arg2 in "size_t *" "int *" "socklen_t *" + do + if test $sock_set = no; then + +krb5_lib_var=`echo "$sock_arg1 $sock_arg2" | sed 'y% ./+-*%___p_p%'` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if getsockname() takes arguments $sock_arg1 and $sock_arg2" >&5 +printf %s "checking if getsockname() takes arguments $sock_arg1 and $sock_arg2... " >&6; } +if eval test \${krb5_cv_getsockname_proto_$krb5_lib_var+y} +then : + printf %s "(cached) " >&6 +else $as_nop + +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +extern int getsockname(int, $sock_arg1, $sock_arg2); + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + eval "krb5_cv_getsockname_proto_$krb5_lib_var=yes" +else $as_nop + eval "krb5_cv_getsockname_proto_$krb5_lib_var=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +if eval "test \"`echo '$krb5_cv_getsockname_proto_'$krb5_lib_var`\" = yes"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + sock_set=yes; res1="$sock_arg1"; res2="$sock_arg2" +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + fi + done +done +if test "$sock_set" = no; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: assuming struct sockaddr and socklen_t for getsockname args" >&5 +printf "%s\n" "$as_me: assuming struct sockaddr and socklen_t for getsockname args" >&6;} + res1="struct sockaddr *" + res2="socklen_t *" +fi +res1=`echo "$res1" | tr -d '*' | sed -e 's/ *$//'` +res2=`echo "$res2" | tr -d '*' | sed -e 's/ *$//'` + +printf "%s\n" "#define GETSOCKNAME_ARG3_TYPE $res2" >>confdefs.h + + + + +printf "%s\n" "#define GETPEERNAME_ARG3_TYPE GETSOCKNAME_ARG3_TYPE" >>confdefs.h + + +LIBUTIL= +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for main in -lutil" >&5 +printf %s "checking for main in -lutil... " >&6; } +if test ${ac_cv_lib_util_main+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lutil $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +int +main (void) +{ +return main (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_util_main=yes +else $as_nop + ac_cv_lib_util_main=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_main" >&5 +printf "%s\n" "$ac_cv_lib_util_main" >&6; } +if test "x$ac_cv_lib_util_main" = xyes +then : + +printf "%s\n" "#define HAVE_LIBUTIL 1" >>confdefs.h + +LIBUTIL=-lutil + +fi + + + +# Determine if NLS is desired and supported. +po= +# Check whether --enable-nls was given. +if test ${enable_nls+y} +then : + enableval=$enable_nls; +else $as_nop + enable_nls=check +fi + +if test "$enable_nls" != no; then + ac_fn_c_check_header_compile "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default" +if test "x$ac_cv_header_libintl_h" = xyes +then : + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing dgettext" >&5 +printf %s "checking for library containing dgettext... " >&6; } +if test ${ac_cv_search_dgettext+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char dgettext (); +int +main (void) +{ +return dgettext (); + ; + return 0; +} +_ACEOF +for ac_lib in '' intl +do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO" +then : + ac_cv_search_dgettext=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext + if test ${ac_cv_search_dgettext+y} +then : + break +fi +done +if test ${ac_cv_search_dgettext+y} +then : + +else $as_nop + ac_cv_search_dgettext=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dgettext" >&5 +printf "%s\n" "$ac_cv_search_dgettext" >&6; } +ac_res=$ac_cv_search_dgettext +if test "$ac_res" != no +then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + + +printf "%s\n" "#define ENABLE_NLS 1" >>confdefs.h + + nls_enabled=yes +fi + +fi + + + # Extract the first word of "msgfmt", so it can be a program name with args. +set dummy msgfmt; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_MSGFMT+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$MSGFMT"; then + ac_cv_prog_MSGFMT="$MSGFMT" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_MSGFMT="msgfmt" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +MSGFMT=$ac_cv_prog_MSGFMT +if test -n "$MSGFMT"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5 +printf "%s\n" "$MSGFMT" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + + if test x"$MSGFMT" != x; then + ac_config_files="$ac_config_files po/Makefile:$srcdir/./config/pre.in:po/Makefile.in:po/deps:$srcdir/./config/post.in" + + + + po=po + fi + + # Error out if --enable-nls was explicitly requested but can't be enabled. + if test "$enable_nls" = yes; then + if test "$nls_enabled" != yes -o "x$po" = x; then + as_fn_error $? "NLS support requested but cannot be built" "$LINENO" 5 + fi + fi +fi + + +# for kdc +ac_fn_c_check_header_compile "$LINENO" "sys/sockio.h" "ac_cv_header_sys_sockio_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_sockio_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_SOCKIO_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "ifaddrs.h" "ac_cv_header_ifaddrs_h" "$ac_includes_default" +if test "x$ac_cv_header_ifaddrs_h" = xyes +then : + printf "%s\n" "#define HAVE_IFADDRS_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default" +if test "x$ac_cv_header_unistd_h" = xyes +then : + printf "%s\n" "#define HAVE_UNISTD_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "fnmatch.h" "ac_cv_header_fnmatch_h" "$ac_includes_default" +if test "x$ac_cv_header_fnmatch_h" = xyes +then : + printf "%s\n" "#define HAVE_FNMATCH_H 1" >>confdefs.h + +fi + +ac_fn_c_check_func "$LINENO" "vsprintf" "ac_cv_func_vsprintf" +if test "x$ac_cv_func_vsprintf" = xyes +then : + printf "%s\n" "#define HAVE_VSPRINTF 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "vasprintf" "ac_cv_func_vasprintf" +if test "x$ac_cv_func_vasprintf" = xyes +then : + printf "%s\n" "#define HAVE_VASPRINTF 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf" +if test "x$ac_cv_func_vsnprintf" = xyes +then : + printf "%s\n" "#define HAVE_VSNPRINTF 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy" +if test "x$ac_cv_func_strlcpy" = xyes +then : + printf "%s\n" "#define HAVE_STRLCPY 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "fnmatch" "ac_cv_func_fnmatch" +if test "x$ac_cv_func_fnmatch" = xyes +then : + printf "%s\n" "#define HAVE_FNMATCH 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "secure_getenv" "ac_cv_func_secure_getenv" +if test "x$ac_cv_func_secure_getenv" = xyes +then : + printf "%s\n" "#define HAVE_SECURE_GETENV 1" >>confdefs.h + +fi + + +EXTRA_SUPPORT_SYMS= +ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy" +if test "x$ac_cv_func_strlcpy" = xyes +then : + STRLCPY_ST_OBJ= +STRLCPY_OBJ= +else $as_nop + STRLCPY_ST_OBJ=strlcpy.o +STRLCPY_OBJ='$(OUTPRE)strlcpy.$(OBJEXT)' +EXTRA_SUPPORT_SYMS="$EXTRA_SUPPORT_SYMS krb5int_strlcpy krb5int_strlcat" +fi + + + + +ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt" +if test "x$ac_cv_func_getopt" = xyes +then : + GETOPT_ST_OBJ= +GETOPT_OBJ= + +printf "%s\n" "#define HAVE_GETOPT 1" >>confdefs.h + +else $as_nop + GETOPT_ST_OBJ='getopt.o' +GETOPT_OBJ='$(OUTPRE)getopt.$(OBJEXT)' +EXTRA_SUPPORT_SYMS="$EXTRA_SUPPORT_SYMS k5_optind k5_optarg k5_opterr k5_optopt k5_getopt" +fi + + + + +ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long" +if test "x$ac_cv_func_getopt_long" = xyes +then : + GETOPT_LONG_ST_OBJ= +GETOPT_LONG_OBJ= + +printf "%s\n" "#define HAVE_GETOPT_LONG 1" >>confdefs.h + +else $as_nop + GETOPT_LONG_ST_OBJ='getopt_long.o' +GETOPT_LONG_OBJ='$(OUTPRE)getopt_long.$(OBJEXT)' +EXTRA_SUPPORT_SYMS="$EXTRA_SUPPORT_SYMS k5_getopt_long" +fi + + + + +ac_fn_c_check_func "$LINENO" "fnmatch" "ac_cv_func_fnmatch" +if test "x$ac_cv_func_fnmatch" = xyes +then : + FNMATCH_ST_OBJ= +FNMATCH_OBJ= +else $as_nop + FNMATCH_ST_OBJ=fnmatch.o +FNMATCH_OBJ='$(OUTPRE)fnmatch.$(OBJEXT)' +EXTRA_SUPPORT_SYMS="$EXTRA_SUPPORT_SYMS k5_fnmatch" +fi + + + + +ac_fn_c_check_func "$LINENO" "vasprintf" "ac_cv_func_vasprintf" +if test "x$ac_cv_func_vasprintf" = xyes +then : + PRINTF_ST_OBJ= +PRINTF_OBJ= +else $as_nop + PRINTF_ST_OBJ=printf.o +PRINTF_OBJ='$(OUTPRE)printf.$(OBJEXT)' +EXTRA_SUPPORT_SYMS="$EXTRA_SUPPORT_SYMS krb5int_asprintf krb5int_vasprintf" +fi + + + + +if test "x$ac_cv_func_vasprintf" = xyes; then +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if vasprintf needs a prototype provided" >&5 +printf %s "checking if vasprintf needs a prototype provided... " >&6; } +if test ${krb5_cv_func_vasprintf_noproto+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include + +int +main (void) +{ +#undef vasprintf +struct k5foo {int foo; } xx; +extern int vasprintf (struct k5foo*); +vasprintf(&xx); + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + krb5_cv_func_vasprintf_noproto=yes +else $as_nop + krb5_cv_func_vasprintf_noproto=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $krb5_cv_func_vasprintf_noproto" >&5 +printf "%s\n" "$krb5_cv_func_vasprintf_noproto" >&6; } +if test $krb5_cv_func_vasprintf_noproto = yes; then + +printf "%s\n" "#define NEED_VASPRINTF_PROTO 1" >>confdefs.h + +fi +fi + + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if swab needs a prototype provided" >&5 +printf %s "checking if swab needs a prototype provided... " >&6; } +if test ${krb5_cv_func_swab_noproto+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#ifdef HAVE_UNISTD_H +#include +#endif +/* Solaris 8 declares swab in stdlib.h. */ +#include + +int +main (void) +{ +#undef swab +struct k5foo {int foo; } xx; +extern int swab (struct k5foo*); +swab(&xx); + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + krb5_cv_func_swab_noproto=yes +else $as_nop + krb5_cv_func_swab_noproto=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $krb5_cv_func_swab_noproto" >&5 +printf "%s\n" "$krb5_cv_func_swab_noproto" >&6; } +if test $krb5_cv_func_swab_noproto = yes; then + +printf "%s\n" "#define NEED_SWAB_PROTO 1" >>confdefs.h + +fi + + + +ac_fn_c_check_func "$LINENO" "secure_getenv" "ac_cv_func_secure_getenv" +if test "x$ac_cv_func_secure_getenv" = xyes +then : + SECURE_GETENV_ST_OBJ= +SECURE_GETENV_OBJ= +SECURE_GETENV_INIT= +else $as_nop + SECURE_GETENV_ST_OBJ=secure_getenv.o +SECURE_GETENV_OBJ='$(OUTPRE)secure_getenv.$(OBJEXT)' +SECURE_GETENV_INIT=k5_secure_getenv_init +EXTRA_SUPPORT_SYMS="$EXTRA_SUPPORT_SYMS k5_secure_getenv" +fi + + + + + +for ac_prog in gawk mawk nawk awk +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_AWK+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_AWK="$ac_prog" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 +printf "%s\n" "$AWK" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + + test -n "$AWK" && break +done + + ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include +#include +" +if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes +then : + +printf "%s\n" "#define HAVE_SA_LEN 1" >>confdefs.h + + +fi + + +ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_types_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_TYPES_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_socket_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_SOCKET_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default" +if test "x$ac_cv_header_netinet_in_h" = xyes +then : + printf "%s\n" "#define HAVE_NETINET_IN_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "netdb.h" "ac_cv_header_netdb_h" "$ac_includes_default" +if test "x$ac_cv_header_netdb_h" = xyes +then : + printf "%s\n" "#define HAVE_NETDB_H 1" >>confdefs.h + +fi + +ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop" +if test "x$ac_cv_func_inet_ntop" = xyes +then : + printf "%s\n" "#define HAVE_INET_NTOP 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton" +if test "x$ac_cv_func_inet_pton" = xyes +then : + printf "%s\n" "#define HAVE_INET_PTON 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo" +if test "x$ac_cv_func_getnameinfo" = xyes +then : + printf "%s\n" "#define HAVE_GETNAMEINFO 1" >>confdefs.h + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5 +printf %s "checking for getaddrinfo... " >&6; } +if test ${ac_cv_func_getaddrinfo+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef HAVE_NETDB_H +#include +#endif +int +main (void) +{ + +struct addrinfo *ai; +getaddrinfo("kerberos.mit.edu", "echo", 0, &ai); + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_func_getaddrinfo=yes +else $as_nop + ac_cv_func_getaddrinfo=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getaddrinfo" >&5 +printf "%s\n" "$ac_cv_func_getaddrinfo" >&6; } +if test $ac_cv_func_getaddrinfo = yes; then + +printf "%s\n" "#define HAVE_GETADDRINFO 1" >>confdefs.h + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IPv6 compile-time support without -DINET6" >&5 +printf %s "checking for IPv6 compile-time support without -DINET6... " >&6; } +if test ${krb5_cv_inet6+y} +then : + printf %s "(cached) " >&6 +else $as_nop + +if test "$ac_cv_func_inet_ntop" != "yes" ; then + krb5_cv_inet6=no +else +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#include +#include +#include + +int +main (void) +{ + + struct sockaddr_in6 in; + AF_INET6; + IN6_IS_ADDR_LINKLOCAL (&in.sin6_addr); + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + krb5_cv_inet6=yes +else $as_nop + krb5_cv_inet6=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $krb5_cv_inet6" >&5 +printf "%s\n" "$krb5_cv_inet6" >&6; } +if test "$krb5_cv_inet6" = no && test "$ac_cv_func_inet_ntop" = yes; then +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IPv6 compile-time support with -DINET6" >&5 +printf %s "checking for IPv6 compile-time support with -DINET6... " >&6; } +if test ${krb5_cv_inet6_with_dinet6+y} +then : + printf %s "(cached) " >&6 +else $as_nop + +old_CC="$CC" +CC="$CC -DINET6" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#include +#include +#include + +int +main (void) +{ + + struct sockaddr_in6 in; + AF_INET6; + IN6_IS_ADDR_LINKLOCAL (&in.sin6_addr); + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + krb5_cv_inet6_with_dinet6=yes +else $as_nop + krb5_cv_inet6_with_dinet6=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +CC="$old_CC" +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $krb5_cv_inet6_with_dinet6" >&5 +printf "%s\n" "$krb5_cv_inet6_with_dinet6" >&6; } +fi +if test $krb5_cv_inet6 = yes || test "$krb5_cv_inet6_with_dinet6" = yes; then + if test "$krb5_cv_inet6_with_dinet6" = yes; then + +printf "%s\n" "#define INET6 1" >>confdefs.h + + fi +fi + + ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include +#include +" +if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes +then : + +printf "%s\n" "#define HAVE_SA_LEN 1" >>confdefs.h + + +fi + + +ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask" +if test "x$ac_cv_func_sigprocmask" = xyes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sigset_t and POSIX_SIGNALS" >&5 +printf %s "checking for sigset_t and POSIX_SIGNALS... " >&6; } +if test ${krb5_cv_type_sigset_t+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main (void) +{ +sigset_t x + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + krb5_cv_type_sigset_t=yes +else $as_nop + krb5_cv_type_sigset_t=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $krb5_cv_type_sigset_t" >&5 +printf "%s\n" "$krb5_cv_type_sigset_t" >&6; } +if test $krb5_cv_type_sigset_t = yes; then + +printf "%s\n" "#define POSIX_SIGNALS 1" >>confdefs.h + +fi + +fi + + +# --with-vague-errors disables useful error messages. + + +# Check whether --with-vague-errors was given. +if test ${with_vague_errors+y} +then : + withval=$with_vague_errors; +else $as_nop + withval=no +fi + +if test "$withval" = yes; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Supplying vague error messages to KDC clients" >&5 +printf "%s\n" "$as_me: Supplying vague error messages to KDC clients" >&6;} + +printf "%s\n" "#define KRBCONF_VAGUE_ERRORS 1" >>confdefs.h + +fi + +# Check which (if any) audit plugin to build +audit_plugin="" +# Check whether --enable-audit-plugin was given. +if test ${enable_audit_plugin+y} +then : + enableval=$enable_audit_plugin; +else $as_nop + enableval=no +fi + +if test "$enableval" != no; then + case "$enableval" in + simple) + # if audit_log_user_message is found, we assume + # that audit_open and audit_close are also defined. + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for audit_log_user_message in -laudit" >&5 +printf %s "checking for audit_log_user_message in -laudit... " >&6; } +if test ${ac_cv_lib_audit_audit_log_user_message+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-laudit $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char audit_log_user_message (); +int +main (void) +{ +return audit_log_user_message (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_audit_audit_log_user_message=yes +else $as_nop + ac_cv_lib_audit_audit_log_user_message=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_audit_audit_log_user_message" >&5 +printf "%s\n" "$ac_cv_lib_audit_audit_log_user_message" >&6; } +if test "x$ac_cv_lib_audit_audit_log_user_message" = xyes +then : + AUDIT_IMPL_LIBS=-laudit + ac_config_files="$ac_config_files plugins/audit/simple/Makefile:$srcdir/./config/pre.in:plugins/audit/simple/Makefile.in:plugins/audit/simple/deps:$srcdir/./config/post.in" + + + + audit_plugin=plugins/audit/simple +else $as_nop + as_fn_error $? "libaudit not found or undefined symbol audit_log_user_message" "$LINENO" 5 +fi + + ;; + *) + as_fn_error $? "Unknown audit plugin implementation $enableval." "$LINENO" 5 + ;; + esac +fi + + + +# WITH_CRYPTO_IMPL + +CRYPTO_IMPL="builtin" + +# Check whether --with-crypto-impl was given. +if test ${with_crypto_impl+y} +then : + withval=$with_crypto_impl; CRYPTO_IMPL=$withval +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: k5crypto will use '$withval'" >&5 +printf "%s\n" "$as_me: k5crypto will use '$withval'" >&6;} + +else $as_nop + withval=builtin +fi + +case "$withval" in +builtin) + ;; +openssl) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PKCS7_get_signer_info in -lcrypto" >&5 +printf %s "checking for PKCS7_get_signer_info in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_PKCS7_get_signer_info+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcrypto $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char PKCS7_get_signer_info (); +int +main (void) +{ +return PKCS7_get_signer_info (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_crypto_PKCS7_get_signer_info=yes +else $as_nop + ac_cv_lib_crypto_PKCS7_get_signer_info=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_PKCS7_get_signer_info" >&5 +printf "%s\n" "$ac_cv_lib_crypto_PKCS7_get_signer_info" >&6; } +if test "x$ac_cv_lib_crypto_PKCS7_get_signer_info" = xyes +then : + printf "%s\n" "#define HAVE_LIBCRYPTO 1" >>confdefs.h + + LIBS="-lcrypto $LIBS" + +fi + + ;; +*) + as_fn_error $? "Unknown crypto implementation $withval" "$LINENO" 5 + ;; +esac +ac_config_commands="$ac_config_commands CRYPTO_IMPL" + + + + + + +# Check whether --with-prng-alg was given. +if test ${with_prng_alg+y} +then : + withval=$with_prng_alg; PRNG_ALG=$withval +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: k5crypto will use '$withval'" >&5 +printf "%s\n" "$as_me: k5crypto will use '$withval'" >&6;} + +else $as_nop + PRNG_ALG=fortuna +fi + +ac_config_commands="$ac_config_commands PRNG_ALG" + + +if test "$PRNG_ALG" = fortuna; then + +printf "%s\n" "#define FORTUNA 1" >>confdefs.h + +fi + +# WITH_TLS_IMPL + + +# Check whether --with-tls-impl was given. +if test ${with_tls_impl+y} +then : + withval=$with_tls_impl; TLS_IMPL=$withval +else $as_nop + TLS_IMPL=auto +fi + +case "$TLS_IMPL" in +openssl|auto) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SSL_CTX_new in -lssl" >&5 +printf %s "checking for SSL_CTX_new in -lssl... " >&6; } +if test ${ac_cv_lib_ssl_SSL_CTX_new+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lssl -lcrypto $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char SSL_CTX_new (); +int +main (void) +{ +return SSL_CTX_new (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_ssl_SSL_CTX_new=yes +else $as_nop + ac_cv_lib_ssl_SSL_CTX_new=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_CTX_new" >&5 +printf "%s\n" "$ac_cv_lib_ssl_SSL_CTX_new" >&6; } +if test "x$ac_cv_lib_ssl_SSL_CTX_new" = xyes +then : + have_lib_ssl=true +else $as_nop + have_lib_ssl=false +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for OpenSSL" >&5 +printf %s "checking for OpenSSL... " >&6; } + if test x$have_lib_ssl = xtrue ; then + +printf "%s\n" "#define TLS_IMPL_OPENSSL 1" >>confdefs.h + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + TLS_IMPL_LIBS="-lssl -lcrypto" + TLS_IMPL=openssl + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: TLS module will use OpenSSL" >&5 +printf "%s\n" "$as_me: TLS module will use OpenSSL" >&6;} + else + if test "$TLS_IMPL" = openssl ; then + as_fn_error $? "OpenSSL not found!" "$LINENO" 5 + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: OpenSSL not found!" >&5 +printf "%s\n" "$as_me: WARNING: OpenSSL not found!" >&2;} + fi + TLS_IMPL=no + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: building without TLS support" >&5 +printf "%s\n" "$as_me: building without TLS support" >&6;} + fi + ;; +no) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: building without TLS support" >&5 +printf "%s\n" "$as_me: building without TLS support" >&6;} + ;; +*) + as_fn_error $? "Unsupported TLS implementation $withval" "$LINENO" 5 + ;; +esac + +if test "$TLS_IMPL" = no; then + +printf "%s\n" "#define TLS_IMPL_NONE 1" >>confdefs.h + +fi + + + + + + +# Check whether --with-keyutils was given. +if test ${with_keyutils+y} +then : + withval=$with_keyutils; +else $as_nop + with_keyutils=check +fi + +if test "$with_keyutils" != no; then + have_keyutils=false + for ac_header in keyutils.h +do : + ac_fn_c_check_header_compile "$LINENO" "keyutils.h" "ac_cv_header_keyutils_h" "$ac_includes_default" +if test "x$ac_cv_header_keyutils_h" = xyes +then : + printf "%s\n" "#define HAVE_KEYUTILS_H 1" >>confdefs.h + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for add_key in -lkeyutils" >&5 +printf %s "checking for add_key in -lkeyutils... " >&6; } +if test ${ac_cv_lib_keyutils_add_key+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lkeyutils $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char add_key (); +int +main (void) +{ +return add_key (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_keyutils_add_key=yes +else $as_nop + ac_cv_lib_keyutils_add_key=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_keyutils_add_key" >&5 +printf "%s\n" "$ac_cv_lib_keyutils_add_key" >&6; } +if test "x$ac_cv_lib_keyutils_add_key" = xyes +then : + have_keyutils=true +fi + +fi + +done + if test "$have_keyutils" = true; then + +printf "%s\n" "#define USE_KEYRING_CCACHE 1" >>confdefs.h + + LIBS="-lkeyutils $LIBS" + # If libkeyutils supports persistent keyrings, use them. + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for keyctl_get_persistent in -lkeyutils" >&5 +printf %s "checking for keyctl_get_persistent in -lkeyutils... " >&6; } +if test ${ac_cv_lib_keyutils_keyctl_get_persistent+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lkeyutils $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char keyctl_get_persistent (); +int +main (void) +{ +return keyctl_get_persistent (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_keyutils_keyctl_get_persistent=yes +else $as_nop + ac_cv_lib_keyutils_keyctl_get_persistent=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_keyutils_keyctl_get_persistent" >&5 +printf "%s\n" "$ac_cv_lib_keyutils_keyctl_get_persistent" >&6; } +if test "x$ac_cv_lib_keyutils_keyctl_get_persistent" = xyes +then : + +printf "%s\n" "#define HAVE_PERSISTENT_KEYRING 1" >>confdefs.h + + +fi + + elif test "$with_keyutils" = yes; then + as_fn_error $? "libkeyutils not found" "$LINENO" 5 + fi +fi + +# The SPAKE preauth plugin currently supports edwards25519 natively, +# and can support three NIST groups using OpenSSL. +HAVE_SPAKE_OPENSSL=no + +# Check whether --with-spake-openssl was given. +if test ${with_spake_openssl+y} +then : + withval=$with_spake_openssl; +else $as_nop + withval=auto +fi + +if test "$withval" = auto -o "$withval" = yes; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EC_POINT_new in -lcrypto" >&5 +printf %s "checking for EC_POINT_new in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_EC_POINT_new+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcrypto $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char EC_POINT_new (); +int +main (void) +{ +return EC_POINT_new (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_crypto_EC_POINT_new=yes +else $as_nop + ac_cv_lib_crypto_EC_POINT_new=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EC_POINT_new" >&5 +printf "%s\n" "$ac_cv_lib_crypto_EC_POINT_new" >&6; } +if test "x$ac_cv_lib_crypto_EC_POINT_new" = xyes +then : + have_crypto=true +else $as_nop + have_crypto=false +fi + + if test "$have_crypto" = true; then + +printf "%s\n" "#define SPAKE_OPENSSL 1" >>confdefs.h + + SPAKE_OPENSSL_LIBS=-lcrypto + HAVE_SPAKE_OPENSSL=yes + elif test "$withval" = yes; then + as_fn_error $? "OpenSSL libcrypto not found" "$LINENO" 5 + fi +fi + + + +# Check whether --enable-aesni was given. +if test ${enable_aesni+y} +then : + enableval=$enable_aesni; +else $as_nop + enable_aesni=check +fi + +if test "$CRYPTO_IMPL" = builtin -a "x$enable_aesni" != xno; then + case "$host" in + i686-*) + aesni_obj=iaesx86.o + aesni_machine=x86 + ;; + x86_64-*) + aesni_obj=iaesx64.o + aesni_machine=amd64 + ;; + esac + case "$host" in + *-*-linux* | *-*-gnu* | *-*-*bsd* | *-*-solaris*) + # All Unix-like platforms need -D__linux__ for iaesx64.s to + # use the System V x86-64 calling convention. + aesni_flags="-D__linux__ -f elf -m $aesni_machine" + ;; + esac + if test "x$aesni_obj" != x && test "x$aesni_flags" != x; then + # Extract the first word of "yasm", so it can be a program name with args. +set dummy yasm; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_YASM+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$YASM"; then + ac_cv_prog_YASM="$YASM" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_YASM="yasm" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +YASM=$ac_cv_prog_YASM +if test -n "$YASM"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $YASM" >&5 +printf "%s\n" "$YASM" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + + ac_fn_c_check_header_compile "$LINENO" "cpuid.h" "ac_cv_header_cpuid_h" "$ac_includes_default" +if test "x$ac_cv_header_cpuid_h" = xyes +then : + printf "%s\n" "#define HAVE_CPUID_H 1" >>confdefs.h + +fi + + if test x"$YASM" != x -a "x$ac_cv_header_cpuid_h" = xyes; then + AESNI_OBJ=$aesni_obj + AESNI_FLAGS=$aesni_flags + +printf "%s\n" "#define AESNI 1" >>confdefs.h + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Building with AES-NI support" >&5 +printf "%s\n" "$as_me: Building with AES-NI support" >&6;} + fi + fi + if test "x$enable_aesni" = xyes -a "x$AESNI_OBJ" = x; then + as_fn_error $? "AES-NI support requested but cannot be built" "$LINENO" 5 + fi +fi + + + +# Check whether --enable-kdc-lookaside-cache was given. +if test ${enable_kdc_lookaside_cache+y} +then : + enableval=$enable_kdc_lookaside_cache; +else $as_nop + enableval=yes +fi + +if test "$enableval" = no ; then + +printf "%s\n" "#define NOCACHE 1" >>confdefs.h + +fi +KRB5_RUN_ENV="$RUN_ENV" +KRB5_RUN_VARS="$RUN_VARS" + + + +# asan is a gcc and clang facility to instrument the code with memory +# error checking. To use it, we compile C and C++ source files with +# -fsanitize=address, and set ASAN=yes to suppress the undefined +# symbols check when building shared libraries. +# Check whether --enable-asan was given. +if test ${enable_asan+y} +then : + enableval=$enable_asan; +else $as_nop + enable_asan=no +fi + +if test "$enable_asan" != no; then + if test "$enable_asan" = yes; then + enable_asan=address + fi + ASAN_FLAGS="$DEFS -fsanitize=$enable_asan" + ASAN=yes + UNDEF_CHECK= +else + ASAN_FLAGS= + ASAN=no +fi + + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 +printf %s "checking return type of signal handlers... " >&6; } +if test ${ac_cv_type_signal+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include + +int +main (void) +{ +return *(signal (0, 0)) (0) == 1; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_type_signal=int +else $as_nop + ac_cv_type_signal=void +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 +printf "%s\n" "$ac_cv_type_signal" >&6; } + +printf "%s\n" "#define RETSIGTYPE $ac_cv_type_signal" >>confdefs.h + + + +# from old include/configure.in + + +ac_config_headers="$ac_config_headers include/autoconf.h" + +for ac_prog in flex lex +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_LEX+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$LEX"; then + ac_cv_prog_LEX="$LEX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_LEX="$ac_prog" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +LEX=$ac_cv_prog_LEX +if test -n "$LEX"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5 +printf "%s\n" "$LEX" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + + test -n "$LEX" && break +done +test -n "$LEX" || LEX=":" + + if test "x$LEX" != "x:"; then + cat >conftest.l <<_ACEOF +%{ +#ifdef __cplusplus +extern "C" +#endif +int yywrap(void); +%} +%% +a { ECHO; } +b { REJECT; } +c { yymore (); } +d { yyless (1); } +e { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument. */ +#ifdef __cplusplus + yyless ((yyinput () != 0)); +#else + yyless ((input () != 0)); +#endif + } +f { unput (yytext[0]); } +. { BEGIN INITIAL; } +%% +#ifdef YYTEXT_POINTER +extern char *yytext; +#endif +int +yywrap (void) +{ + return 1; +} +int +main (void) +{ + return ! yylex (); +} +_ACEOF +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lex output file root" >&5 +printf %s "checking for lex output file root... " >&6; } +if test ${ac_cv_prog_lex_root+y} +then : + printf %s "(cached) " >&6 +else $as_nop + +ac_cv_prog_lex_root=unknown +{ { ac_try="$LEX conftest.l" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +printf "%s\n" "$ac_try_echo"; } >&5 + (eval "$LEX conftest.l") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && +if test -f lex.yy.c; then + ac_cv_prog_lex_root=lex.yy +elif test -f lexyy.c; then + ac_cv_prog_lex_root=lexyy +fi +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5 +printf "%s\n" "$ac_cv_prog_lex_root" >&6; } +if test "$ac_cv_prog_lex_root" = unknown +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot find output from $LEX; giving up on $LEX" >&5 +printf "%s\n" "$as_me: WARNING: cannot find output from $LEX; giving up on $LEX" >&2;} + LEX=: LEXLIB= +fi +LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root + +if test ${LEXLIB+y} +then : + +else $as_nop + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lex library" >&5 +printf %s "checking for lex library... " >&6; } +if test ${ac_cv_lib_lex+y} +then : + printf %s "(cached) " >&6 +else $as_nop + + ac_save_LIBS="$LIBS" + ac_found=false + for ac_cv_lib_lex in 'none needed' -lfl -ll 'not found'; do + case $ac_cv_lib_lex in #( + 'none needed') : + ;; #( + 'not found') : + break ;; #( + *) : + LIBS="$ac_cv_lib_lex $ac_save_LIBS" ;; #( + *) : + ;; +esac + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +`cat $LEX_OUTPUT_ROOT.c` +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_found=: +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + if $ac_found; then + break + fi + done + LIBS="$ac_save_LIBS" + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5 +printf "%s\n" "$ac_cv_lib_lex" >&6; } + if test "$ac_cv_lib_lex" = 'not found' +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: required lex library not found; giving up on $LEX" >&5 +printf "%s\n" "$as_me: WARNING: required lex library not found; giving up on $LEX" >&2;} + LEX=: LEXLIB= +elif test "$ac_cv_lib_lex" = 'none needed' +then : + LEXLIB='' +else $as_nop + LEXLIB=$ac_cv_lib_lex +fi + ac_save_LIBS="$LIBS" + LIBS= + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing yywrap" >&5 +printf %s "checking for library containing yywrap... " >&6; } +if test ${ac_cv_search_yywrap+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char yywrap (); +int +main (void) +{ +return yywrap (); + ; + return 0; +} +_ACEOF +for ac_lib in '' fl l +do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO" +then : + ac_cv_search_yywrap=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext + if test ${ac_cv_search_yywrap+y} +then : + break +fi +done +if test ${ac_cv_search_yywrap+y} +then : + +else $as_nop + ac_cv_search_yywrap=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_yywrap" >&5 +printf "%s\n" "$ac_cv_search_yywrap" >&6; } +ac_res=$ac_cv_search_yywrap +if test "$ac_res" != no +then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + LEXLIB="$LIBS" +fi + + LIBS="$ac_save_LIBS" +fi + + +if test "$LEX" != : +then : + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5 +printf %s "checking whether yytext is a pointer... " >&6; } +if test ${ac_cv_prog_lex_yytext_pointer+y} +then : + printf %s "(cached) " >&6 +else $as_nop + # POSIX says lex can declare yytext either as a pointer or an array; the +# default is implementation-dependent. Figure out which it is, since +# not all implementations provide the %pointer and %array declarations. +ac_cv_prog_lex_yytext_pointer=no +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #define YYTEXT_POINTER 1 +`cat $LEX_OUTPUT_ROOT.c` +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_prog_lex_yytext_pointer=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5 +printf "%s\n" "$ac_cv_prog_lex_yytext_pointer" >&6; } +if test $ac_cv_prog_lex_yytext_pointer = yes; then + +printf "%s\n" "#define YYTEXT_POINTER 1" >>confdefs.h + +fi + +fi +rm -f conftest.l $LEX_OUTPUT_ROOT.c + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 +printf %s "checking for an ANSI C-conforming const... " >&6; } +if test ${ac_cv_c_const+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + +#ifndef __cplusplus + /* Ultrix mips cc rejects this sort of thing. */ + typedef int charset[2]; + const charset cs = { 0, 0 }; + /* SunOS 4.1.1 cc rejects this. */ + char const *const *pcpcc; + char **ppc; + /* NEC SVR4.0.2 mips cc rejects this. */ + struct point {int x, y;}; + static struct point const zero = {0,0}; + /* IBM XL C 1.02.0.0 rejects this. + It does not let you subtract one const X* pointer from another in + an arm of an if-expression whose if-part is not a constant + expression */ + const char *g = "string"; + pcpcc = &g + (g ? g-g : 0); + /* HPUX 7.0 cc rejects these. */ + ++pcpcc; + ppc = (char**) pcpcc; + pcpcc = (char const *const *) ppc; + { /* SCO 3.2v4 cc rejects this sort of thing. */ + char tx; + char *t = &tx; + char const *s = 0 ? (char *) 0 : (char const *) 0; + + *t++ = 0; + if (s) return 0; + } + { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ + int x[] = {25, 17}; + const int *foo = &x[0]; + ++foo; + } + { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ + typedef const int *iptr; + iptr p = 0; + ++p; + } + { /* IBM XL C 1.02.0.0 rejects this sort of thing, saying + "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ + struct s { int j; const int *ap[3]; } bx; + struct s *b = &bx; b->j = 5; + } + { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; + if (!foo) return 0; + } + return !cs[0] && !zero.x; +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_c_const=yes +else $as_nop + ac_cv_c_const=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 +printf "%s\n" "$ac_cv_c_const" >&6; } +if test $ac_cv_c_const = no; then + +printf "%s\n" "#define const /**/" >>confdefs.h + +fi + +ac_header_dirent=no +for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do + as_ac_Header=`printf "%s\n" "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 +printf %s "checking for $ac_hdr that defines DIR... " >&6; } +if eval test \${$as_ac_Header+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include <$ac_hdr> + +int +main (void) +{ +if ((DIR *) 0) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + eval "$as_ac_Header=yes" +else $as_nop + eval "$as_ac_Header=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +eval ac_res=\$$as_ac_Header + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Header"\" = x"yes" +then : + cat >>confdefs.h <<_ACEOF +#define `printf "%s\n" "HAVE_$ac_hdr" | $as_tr_cpp` 1 +_ACEOF + +ac_header_dirent=$ac_hdr; break +fi + +done +# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. +if test $ac_header_dirent = dirent.h; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 +printf %s "checking for library containing opendir... " >&6; } +if test ${ac_cv_search_opendir+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char opendir (); +int +main (void) +{ +return opendir (); + ; + return 0; +} +_ACEOF +for ac_lib in '' dir +do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO" +then : + ac_cv_search_opendir=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext + if test ${ac_cv_search_opendir+y} +then : + break +fi +done +if test ${ac_cv_search_opendir+y} +then : + +else $as_nop + ac_cv_search_opendir=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 +printf "%s\n" "$ac_cv_search_opendir" >&6; } +ac_res=$ac_cv_search_opendir +if test "$ac_res" != no +then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 +printf %s "checking for library containing opendir... " >&6; } +if test ${ac_cv_search_opendir+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char opendir (); +int +main (void) +{ +return opendir (); + ; + return 0; +} +_ACEOF +for ac_lib in '' x +do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO" +then : + ac_cv_search_opendir=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext + if test ${ac_cv_search_opendir+y} +then : + break +fi +done +if test ${ac_cv_search_opendir+y} +then : + +else $as_nop + ac_cv_search_opendir=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 +printf "%s\n" "$ac_cv_search_opendir" >&6; } +ac_res=$ac_cv_search_opendir +if test "$ac_res" != no +then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5 +printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; } +if test ${ac_cv_c_undeclared_builtin_options+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_save_CFLAGS=$CFLAGS + ac_cv_c_undeclared_builtin_options='cannot detect' + for ac_arg in '' -fno-builtin; do + CFLAGS="$ac_save_CFLAGS $ac_arg" + # This test program should *not* compile successfully. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ +(void) strchr; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + +else $as_nop + # This test program should compile successfully. + # No library function is consistently available on + # freestanding implementations, so test against a dummy + # declaration. Include always-available headers on the + # off chance that they somehow elicit warnings. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include +extern void ac_decl (int, char *); + +int +main (void) +{ +(void) ac_decl (0, (char *) 0); + (void) ac_decl; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + if test x"$ac_arg" = x +then : + ac_cv_c_undeclared_builtin_options='none needed' +else $as_nop + ac_cv_c_undeclared_builtin_options=$ac_arg +fi + break +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + done + CFLAGS=$ac_save_CFLAGS + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_undeclared_builtin_options" >&5 +printf "%s\n" "$ac_cv_c_undeclared_builtin_options" >&6; } + case $ac_cv_c_undeclared_builtin_options in #( + 'cannot detect') : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot make $CC report undeclared builtins +See \`config.log' for more details" "$LINENO" 5; } ;; #( + 'none needed') : + ac_c_undeclared_builtin_options='' ;; #( + *) : + ac_c_undeclared_builtin_options=$ac_cv_c_undeclared_builtin_options ;; +esac + +ac_fn_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_strerror_r" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 +fi +printf "%s\n" "#define HAVE_DECL_STRERROR_R $ac_have_decl" >>confdefs.h + + +if test $ac_cv_have_decl_strerror_r = yes; then + # For backward compatibility's sake, define HAVE_STRERROR_R. + # (We used to run AC_CHECK_FUNCS_ONCE for strerror_r, as well + # as AC_CHECK_DECLS_ONCE.) + +printf "%s\n" "#define HAVE_STRERROR_R 1" >>confdefs.h + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5 +printf %s "checking whether strerror_r returns char *... " >&6; } +if test ${ac_cv_func_strerror_r_char_p+y} +then : + printf %s "(cached) " >&6 +else $as_nop + + ac_cv_func_strerror_r_char_p=no + if test $ac_cv_have_decl_strerror_r = yes; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main (void) +{ + + char buf[100]; + char x = *strerror_r (0, buf, sizeof buf); + char *p = strerror_r (0, buf, sizeof buf); + return !p || x; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_func_strerror_r_char_p=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + + fi + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5 +printf "%s\n" "$ac_cv_func_strerror_r_char_p" >&6; } +if test $ac_cv_func_strerror_r_char_p = yes; then + +printf "%s\n" "#define STRERROR_R_CHAR_P 1" >>confdefs.h + +fi + +ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup" +if test "x$ac_cv_func_strdup" = xyes +then : + printf "%s\n" "#define HAVE_STRDUP 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "setvbuf" "ac_cv_func_setvbuf" +if test "x$ac_cv_func_setvbuf" = xyes +then : + printf "%s\n" "#define HAVE_SETVBUF 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "seteuid" "ac_cv_func_seteuid" +if test "x$ac_cv_func_seteuid" = xyes +then : + printf "%s\n" "#define HAVE_SETEUID 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "setresuid" "ac_cv_func_setresuid" +if test "x$ac_cv_func_setresuid" = xyes +then : + printf "%s\n" "#define HAVE_SETRESUID 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "setreuid" "ac_cv_func_setreuid" +if test "x$ac_cv_func_setreuid" = xyes +then : + printf "%s\n" "#define HAVE_SETREUID 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "setegid" "ac_cv_func_setegid" +if test "x$ac_cv_func_setegid" = xyes +then : + printf "%s\n" "#define HAVE_SETEGID 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "setresgid" "ac_cv_func_setresgid" +if test "x$ac_cv_func_setresgid" = xyes +then : + printf "%s\n" "#define HAVE_SETRESGID 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "setregid" "ac_cv_func_setregid" +if test "x$ac_cv_func_setregid" = xyes +then : + printf "%s\n" "#define HAVE_SETREGID 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "setsid" "ac_cv_func_setsid" +if test "x$ac_cv_func_setsid" = xyes +then : + printf "%s\n" "#define HAVE_SETSID 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock" +if test "x$ac_cv_func_flock" = xyes +then : + printf "%s\n" "#define HAVE_FLOCK 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "fchmod" "ac_cv_func_fchmod" +if test "x$ac_cv_func_fchmod" = xyes +then : + printf "%s\n" "#define HAVE_FCHMOD 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "chmod" "ac_cv_func_chmod" +if test "x$ac_cv_func_chmod" = xyes +then : + printf "%s\n" "#define HAVE_CHMOD 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "strptime" "ac_cv_func_strptime" +if test "x$ac_cv_func_strptime" = xyes +then : + printf "%s\n" "#define HAVE_STRPTIME 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "geteuid" "ac_cv_func_geteuid" +if test "x$ac_cv_func_geteuid" = xyes +then : + printf "%s\n" "#define HAVE_GETEUID 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "setenv" "ac_cv_func_setenv" +if test "x$ac_cv_func_setenv" = xyes +then : + printf "%s\n" "#define HAVE_SETENV 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv" +if test "x$ac_cv_func_unsetenv" = xyes +then : + printf "%s\n" "#define HAVE_UNSETENV 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "getenv" "ac_cv_func_getenv" +if test "x$ac_cv_func_getenv" = xyes +then : + printf "%s\n" "#define HAVE_GETENV 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "gmtime_r" "ac_cv_func_gmtime_r" +if test "x$ac_cv_func_gmtime_r" = xyes +then : + printf "%s\n" "#define HAVE_GMTIME_R 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "localtime_r" "ac_cv_func_localtime_r" +if test "x$ac_cv_func_localtime_r" = xyes +then : + printf "%s\n" "#define HAVE_LOCALTIME_R 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "bswap16" "ac_cv_func_bswap16" +if test "x$ac_cv_func_bswap16" = xyes +then : + printf "%s\n" "#define HAVE_BSWAP16 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "bswap64" "ac_cv_func_bswap64" +if test "x$ac_cv_func_bswap64" = xyes +then : + printf "%s\n" "#define HAVE_BSWAP64 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "mkstemp" "ac_cv_func_mkstemp" +if test "x$ac_cv_func_mkstemp" = xyes +then : + printf "%s\n" "#define HAVE_MKSTEMP 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "getusershell" "ac_cv_func_getusershell" +if test "x$ac_cv_func_getusershell" = xyes +then : + printf "%s\n" "#define HAVE_GETUSERSHELL 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "access" "ac_cv_func_access" +if test "x$ac_cv_func_access" = xyes +then : + printf "%s\n" "#define HAVE_ACCESS 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd" +if test "x$ac_cv_func_getcwd" = xyes +then : + printf "%s\n" "#define HAVE_GETCWD 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "srand48" "ac_cv_func_srand48" +if test "x$ac_cv_func_srand48" = xyes +then : + printf "%s\n" "#define HAVE_SRAND48 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "srand" "ac_cv_func_srand" +if test "x$ac_cv_func_srand" = xyes +then : + printf "%s\n" "#define HAVE_SRAND 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "srandom" "ac_cv_func_srandom" +if test "x$ac_cv_func_srandom" = xyes +then : + printf "%s\n" "#define HAVE_SRANDOM 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "stat" "ac_cv_func_stat" +if test "x$ac_cv_func_stat" = xyes +then : + printf "%s\n" "#define HAVE_STAT 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "strchr" "ac_cv_func_strchr" +if test "x$ac_cv_func_strchr" = xyes +then : + printf "%s\n" "#define HAVE_STRCHR 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror" +if test "x$ac_cv_func_strerror" = xyes +then : + printf "%s\n" "#define HAVE_STRERROR 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "timegm" "ac_cv_func_timegm" +if test "x$ac_cv_func_timegm" = xyes +then : + printf "%s\n" "#define HAVE_TIMEGM 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "explicit_bzero" "ac_cv_func_explicit_bzero" +if test "x$ac_cv_func_explicit_bzero" = xyes +then : + printf "%s\n" "#define HAVE_EXPLICIT_BZERO 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "explicit_memset" "ac_cv_func_explicit_memset" +if test "x$ac_cv_func_explicit_memset" = xyes +then : + printf "%s\n" "#define HAVE_EXPLICIT_MEMSET 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "getresuid" "ac_cv_func_getresuid" +if test "x$ac_cv_func_getresuid" = xyes +then : + printf "%s\n" "#define HAVE_GETRESUID 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "getresgid" "ac_cv_func_getresgid" +if test "x$ac_cv_func_getresgid" = xyes +then : + printf "%s\n" "#define HAVE_GETRESGID 1" >>confdefs.h + +fi + + +ac_fn_c_check_func "$LINENO" "mkstemp" "ac_cv_func_mkstemp" +if test "x$ac_cv_func_mkstemp" = xyes +then : + MKSTEMP_ST_OBJ= +MKSTEMP_OBJ= +else $as_nop + MKSTEMP_ST_OBJ='mkstemp.o' +MKSTEMP_OBJ='$(OUTPRE)mkstemp.$(OBJEXT)' +EXTRA_SUPPORT_SYMS="$EXTRA_SUPPORT_SYMS krb5int_mkstemp" +fi + + + + +ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday" +if test "x$ac_cv_func_gettimeofday" = xyes +then : + GETTIMEOFDAY_ST_OBJ= + GETTIMEOFDAY_OBJ= + +printf "%s\n" "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h + + +else $as_nop + GETTIMEOFDAY_ST_OBJ='gettimeofday.o' + GETTIMEOFDAY_OBJ='$(OUTPRE)gettimeofday.$(OBJEXT)' + EXTRA_SUPPORT_SYMS="$EXTRA_SUPPORT_SYMS krb5int_gettimeofday" +fi + + + + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sys_errlist declaration" >&5 +printf %s "checking for sys_errlist declaration... " >&6; } +if test ${krb5_cv_decl_sys_errlist+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +int +main (void) +{ +1+sys_nerr; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + krb5_cv_decl_sys_errlist=yes +else $as_nop + krb5_cv_decl_sys_errlist=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $krb5_cv_decl_sys_errlist" >&5 +printf "%s\n" "$krb5_cv_decl_sys_errlist" >&6; } +# assume sys_nerr won't be declared w/o being in libc +if test $krb5_cv_decl_sys_errlist = yes; then + +printf "%s\n" "#define SYS_ERRLIST_DECLARED 1" >>confdefs.h + + +printf "%s\n" "#define HAVE_SYS_ERRLIST 1" >>confdefs.h + +else + # This means that sys_errlist is not declared in errno.h, but may still + # be in libc. + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sys_errlist in libc" >&5 +printf %s "checking for sys_errlist in libc... " >&6; } +if test ${krb5_cv_var_sys_errlist+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +extern int sys_nerr; +int +main (void) +{ +if (1+sys_nerr < 0) return 1; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + krb5_cv_var_sys_errlist=yes +else $as_nop + krb5_cv_var_sys_errlist=no; +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $krb5_cv_var_sys_errlist" >&5 +printf "%s\n" "$krb5_cv_var_sys_errlist" >&6; } + if test $krb5_cv_var_sys_errlist = yes; then + +printf "%s\n" "#define HAVE_SYS_ERRLIST 1" >>confdefs.h + + # Do this cruft for backwards compatibility for now. + +printf "%s\n" "#define NEED_SYS_ERRLIST 1" >>confdefs.h + + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: sys_errlist is neither in errno.h nor in libc" >&5 +printf "%s\n" "$as_me: WARNING: sys_errlist is neither in errno.h nor in libc" >&2;} + fi +fi +ac_fn_c_check_header_compile "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default" +if test "x$ac_cv_header_unistd_h" = xyes +then : + printf "%s\n" "#define HAVE_UNISTD_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "paths.h" "ac_cv_header_paths_h" "$ac_includes_default" +if test "x$ac_cv_header_paths_h" = xyes +then : + printf "%s\n" "#define HAVE_PATHS_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "regex.h" "ac_cv_header_regex_h" "$ac_includes_default" +if test "x$ac_cv_header_regex_h" = xyes +then : + printf "%s\n" "#define HAVE_REGEX_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "regexpr.h" "ac_cv_header_regexpr_h" "$ac_includes_default" +if test "x$ac_cv_header_regexpr_h" = xyes +then : + printf "%s\n" "#define HAVE_REGEXPR_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "fcntl.h" "ac_cv_header_fcntl_h" "$ac_includes_default" +if test "x$ac_cv_header_fcntl_h" = xyes +then : + printf "%s\n" "#define HAVE_FCNTL_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "memory.h" "ac_cv_header_memory_h" "$ac_includes_default" +if test "x$ac_cv_header_memory_h" = xyes +then : + printf "%s\n" "#define HAVE_MEMORY_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "ifaddrs.h" "ac_cv_header_ifaddrs_h" "$ac_includes_default" +if test "x$ac_cv_header_ifaddrs_h" = xyes +then : + printf "%s\n" "#define HAVE_IFADDRS_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/filio.h" "ac_cv_header_sys_filio_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_filio_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_FILIO_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "byteswap.h" "ac_cv_header_byteswap_h" "$ac_includes_default" +if test "x$ac_cv_header_byteswap_h" = xyes +then : + printf "%s\n" "#define HAVE_BYTESWAP_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "machine/endian.h" "ac_cv_header_machine_endian_h" "$ac_includes_default" +if test "x$ac_cv_header_machine_endian_h" = xyes +then : + printf "%s\n" "#define HAVE_MACHINE_ENDIAN_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "machine/byte_order.h" "ac_cv_header_machine_byte_order_h" "$ac_includes_default" +if test "x$ac_cv_header_machine_byte_order_h" = xyes +then : + printf "%s\n" "#define HAVE_MACHINE_BYTE_ORDER_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/bswap.h" "ac_cv_header_sys_bswap_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_bswap_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_BSWAP_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "endian.h" "ac_cv_header_endian_h" "$ac_includes_default" +if test "x$ac_cv_header_endian_h" = xyes +then : + printf "%s\n" "#define HAVE_ENDIAN_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "pwd.h" "ac_cv_header_pwd_h" "$ac_includes_default" +if test "x$ac_cv_header_pwd_h" = xyes +then : + printf "%s\n" "#define HAVE_PWD_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default" +if test "x$ac_cv_header_arpa_inet_h" = xyes +then : + printf "%s\n" "#define HAVE_ARPA_INET_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "alloca.h" "ac_cv_header_alloca_h" "$ac_includes_default" +if test "x$ac_cv_header_alloca_h" = xyes +then : + printf "%s\n" "#define HAVE_ALLOCA_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default" +if test "x$ac_cv_header_dlfcn_h" = xyes +then : + printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "limits.h" "ac_cv_header_limits_h" "$ac_includes_default" +if test "x$ac_cv_header_limits_h" = xyes +then : + printf "%s\n" "#define HAVE_LIMITS_H 1" >>confdefs.h + +fi + +ac_fn_c_check_header_compile "$LINENO" "regexp.h" "ac_cv_header_regexp_h" "#define INIT char *sp = instring; +#define GETC() (*sp++) +#define PEEKC() (*sp) +#define UNGETC(c) (--sp) +#define RETURN(c) return(c) +#define ERROR(c) + +" +if test "x$ac_cv_header_regexp_h" = xyes +then : + +fi + +ac_fn_c_check_member "$LINENO" "struct stat" "st_mtimensec" "ac_cv_member_struct_stat_st_mtimensec" "#include +#include +" +if test "x$ac_cv_member_struct_stat_st_mtimensec" = xyes +then : + +printf "%s\n" "#define HAVE_STRUCT_STAT_ST_MTIMENSEC 1" >>confdefs.h + + +fi +ac_fn_c_check_member "$LINENO" "struct stat" "st_mtimespec.tv_nsec" "ac_cv_member_struct_stat_st_mtimespec_tv_nsec" "#include +#include +" +if test "x$ac_cv_member_struct_stat_st_mtimespec_tv_nsec" = xyes +then : + +printf "%s\n" "#define HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC 1" >>confdefs.h + + +fi +ac_fn_c_check_member "$LINENO" "struct stat" "st_mtim.tv_nsec" "ac_cv_member_struct_stat_st_mtim_tv_nsec" "#include +#include +" +if test "x$ac_cv_member_struct_stat_st_mtim_tv_nsec" = xyes +then : + +printf "%s\n" "#define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1" >>confdefs.h + + +fi + + +ac_fn_c_check_func "$LINENO" "re_comp" "ac_cv_func_re_comp" +if test "x$ac_cv_func_re_comp" = xyes +then : + printf "%s\n" "#define HAVE_RE_COMP 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "re_exec" "ac_cv_func_re_exec" +if test "x$ac_cv_func_re_exec" = xyes +then : + printf "%s\n" "#define HAVE_RE_EXEC 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "regexec" "ac_cv_func_regexec" +if test "x$ac_cv_func_regexec" = xyes +then : + printf "%s\n" "#define HAVE_REGEXEC 1" >>confdefs.h + +fi + + +ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default" +if test "x$ac_cv_type_off_t" = xyes +then : + +else $as_nop + +printf "%s\n" "#define off_t long int" >>confdefs.h + +fi + + +# Fancy caching of perror result... +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for perror declaration" >&5 +printf %s "checking for perror declaration... " >&6; } +if test ${krb5_cv_decl_perror+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "perror" >/dev/null 2>&1 +then : + krb5_cv_decl_perror=yes +else $as_nop + krb5_cv_decl_perror=no +fi +rm -rf conftest* + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $krb5_cv_decl_perror" >&5 +printf "%s\n" "$krb5_cv_decl_perror" >&6; } +if test $krb5_cv_decl_perror = yes; then + +printf "%s\n" "#define HDR_HAS_PERROR 1" >>confdefs.h + +fi + + +if test "x$ac_cv_func_strptime" = xyes; then +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if strptime needs a prototype provided" >&5 +printf %s "checking if strptime needs a prototype provided... " >&6; } +if test ${krb5_cv_func_strptime_noproto+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main (void) +{ +#undef strptime +struct k5foo {int foo; } xx; +extern int strptime (struct k5foo*); +strptime(&xx); + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + krb5_cv_func_strptime_noproto=yes +else $as_nop + krb5_cv_func_strptime_noproto=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $krb5_cv_func_strptime_noproto" >&5 +printf "%s\n" "$krb5_cv_func_strptime_noproto" >&6; } +if test $krb5_cv_func_strptime_noproto = yes; then + +printf "%s\n" "#define NEED_STRPTIME_PROTO 1" >>confdefs.h + +fi +fi + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if argument to wait is int *" >&5 +printf %s "checking if argument to wait is int *... " >&6; } +if test ${krb5_cv_struct_wait+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +extern pid_t wait(int *); +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + krb5_cv_struct_wait=no +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main (void) +{ +union wait i; +#ifdef WEXITSTATUS + WEXITSTATUS (i); +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + krb5_cv_struct_wait=yes +else $as_nop + krb5_cv_struct_wait=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $krb5_cv_struct_wait" >&5 +printf "%s\n" "$krb5_cv_struct_wait" >&6; } +if test $krb5_cv_struct_wait = no; then + +printf "%s\n" "#define WAIT_USES_INT 1" >>confdefs.h + +fi + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for use of sigprocmask" >&5 +printf %s "checking for use of sigprocmask... " >&6; } +if test ${krb5_cv_func_sigprocmask_use+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main (void) +{ +sigprocmask(SIG_SETMASK,0,0); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + krb5_cv_func_sigprocmask_use=yes +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main (void) +{ +sigmask(1); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + krb5_cv_func_sigprocmask_use=no +else $as_nop + krb5_cv_func_sigprocmask_use=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $krb5_cv_func_sigprocmask_use" >&5 +printf "%s\n" "$krb5_cv_func_sigprocmask_use" >&6; } +if test $krb5_cv_func_sigprocmask_use = yes; then + +printf "%s\n" "#define USE_SIGPROCMASK 1" >>confdefs.h + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5 +printf %s "checking for uid_t in sys/types.h... " >&6; } +if test ${ac_cv_type_uid_t+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "uid_t" >/dev/null 2>&1 +then : + ac_cv_type_uid_t=yes +else $as_nop + ac_cv_type_uid_t=no +fi +rm -rf conftest* + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5 +printf "%s\n" "$ac_cv_type_uid_t" >&6; } +if test $ac_cv_type_uid_t = no; then + +printf "%s\n" "#define uid_t int" >>confdefs.h + + +printf "%s\n" "#define gid_t int" >>confdefs.h + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking type of array argument to getgroups" >&5 +printf %s "checking type of array argument to getgroups... " >&6; } +if test ${ac_cv_type_getgroups+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : + ac_cv_type_getgroups=cross +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Thanks to Mike Rendell for this test. */ +$ac_includes_default +#define NGID 256 +#undef MAX +#define MAX(x, y) ((x) > (y) ? (x) : (y)) + +int +main (void) +{ + gid_t gidset[NGID]; + int i, n; + union { gid_t gval; long int lval; } val; + + val.lval = -1; + for (i = 0; i < NGID; i++) + gidset[i] = val.gval; + n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1, + gidset); + /* Exit non-zero if getgroups seems to require an array of ints. This + happens when gid_t is short int but getgroups modifies an array + of ints. */ + return n > 0 && gidset[n] != val.gval; +} +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + ac_cv_type_getgroups=gid_t +else $as_nop + ac_cv_type_getgroups=int +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +if test $ac_cv_type_getgroups = cross; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1 +then : + ac_cv_type_getgroups=gid_t +else $as_nop + ac_cv_type_getgroups=int +fi +rm -rf conftest* + +fi +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_getgroups" >&5 +printf "%s\n" "$ac_cv_type_getgroups" >&6; } + +printf "%s\n" "#define GETGROUPS_T $ac_cv_type_getgroups" >>confdefs.h + + + +ac_fn_c_check_func "$LINENO" "sigsetjmp" "ac_cv_func_sigsetjmp" +if test "x$ac_cv_func_sigsetjmp" = xyes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sigjmp_buf" >&5 +printf %s "checking for sigjmp_buf... " >&6; } +if test ${krb5_cv_struct_sigjmp_buf+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main (void) +{ +sigjmp_buf x + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + krb5_cv_struct_sigjmp_buf=yes +else $as_nop + krb5_cv_struct_sigjmp_buf=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $krb5_cv_struct_sigjmp_buf" >&5 +printf "%s\n" "$krb5_cv_struct_sigjmp_buf" >&6; } +if test $krb5_cv_struct_sigjmp_buf = yes; then + +printf "%s\n" "#define POSIX_SETJMP 1" >>confdefs.h + +fi + +fi + + +# *rpcent return types needed for lib/rpc + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking return type of setrpcent" >&5 +printf %s "checking return type of setrpcent... " >&6; } +if test ${k5_cv_type_setrpcent+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#ifdef __cplusplus +extern "C" +#endif +extern void setrpcent(); +int +main (void) +{ +int i; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + k5_cv_type_setrpcent=void +else $as_nop + k5_cv_type_setrpcent=int +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $k5_cv_type_setrpcent" >&5 +printf "%s\n" "$k5_cv_type_setrpcent" >&6; } + +printf "%s\n" "#define SETRPCENT_TYPE $k5_cv_type_setrpcent" >>confdefs.h + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking return type of endrpcent" >&5 +printf %s "checking return type of endrpcent... " >&6; } +if test ${k5_cv_type_endrpcent+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#ifdef __cplusplus +extern "C" +#endif +extern void endrpcent(); +int +main (void) +{ +int i; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + k5_cv_type_endrpcent=void +else $as_nop + k5_cv_type_endrpcent=int +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $k5_cv_type_endrpcent" >&5 +printf "%s\n" "$k5_cv_type_endrpcent" >&6; } + +printf "%s\n" "#define ENDRPCENT_TYPE $k5_cv_type_endrpcent" >>confdefs.h + + + +# bswap_16 is a macro in byteswap.h under GNU libc +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for bswap_16" >&5 +printf %s "checking for bswap_16... " >&6; } +if test ${krb5_cv_bswap_16+y} +then : + printf %s "(cached) " >&6 +else $as_nop + +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if HAVE_BYTESWAP_H +#include +#endif +int +main (void) +{ +bswap_16(37); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + krb5_cv_bswap_16=yes +else $as_nop + krb5_cv_bswap_16=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $krb5_cv_bswap_16" >&5 +printf "%s\n" "$krb5_cv_bswap_16" >&6; } +if test "$krb5_cv_bswap_16" = yes; then + +printf "%s\n" "#define HAVE_BSWAP_16 1" >>confdefs.h + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for bswap_64" >&5 +printf %s "checking for bswap_64... " >&6; } +if test ${krb5_cv_bswap_64+y} +then : + printf %s "(cached) " >&6 +else $as_nop + +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if HAVE_BYTESWAP_H +#include +#endif +int +main (void) +{ +bswap_64(37); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + krb5_cv_bswap_64=yes +else $as_nop + krb5_cv_bswap_64=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $krb5_cv_bswap_64" >&5 +printf "%s\n" "$krb5_cv_bswap_64" >&6; } +if test "$krb5_cv_bswap_64" = yes; then + +printf "%s\n" "#define HAVE_BSWAP_64 1" >>confdefs.h + +fi + +# Needed for ksu and some appl stuff. + +case $krb5_cv_host in +alpha*-dec-osf*) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for setluid in -lsecurity" >&5 +printf %s "checking for setluid in -lsecurity... " >&6; } +if test ${ac_cv_lib_security_setluid+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsecurity $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char setluid (); +int +main (void) +{ +return setluid (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_security_setluid=yes +else $as_nop + ac_cv_lib_security_setluid=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_security_setluid" >&5 +printf "%s\n" "$ac_cv_lib_security_setluid" >&6; } +if test "x$ac_cv_lib_security_setluid" = xyes +then : + +printf "%s\n" "#define HAVE_SETLUID 1" >>confdefs.h + + KSU_LIBS="-lsecurity" + +fi + + ;; +esac + + +if test $ac_cv_func_setenv = no || test $ac_cv_func_unsetenv = no \ + || test $ac_cv_func_getenv = no; then + SETENVOBJ=setenv.o +else + SETENVOBJ= +fi + + +# Check what the return types for gethostbyname_r and getservbyname_r are. + +ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r" +if test "x$ac_cv_func_gethostbyname_r" = xyes +then : + +ac_cv_func_gethostbyname_r=yes +if test "$ac_cv_func_gethostbyname_r" = yes; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if gethostbyname_r returns an int" >&5 +printf %s "checking if gethostbyname_r returns an int... " >&6; } + if test ${krb5_cv_gethostbyname_r_returns_int+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + extern int gethostbyname_r (); +int +main (void) +{ +1; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + krb5_cv_gethostbyname_r_returns_int=yes +else $as_nop + krb5_cv_gethostbyname_r_returns_int=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $krb5_cv_gethostbyname_r_returns_int" >&5 +printf "%s\n" "$krb5_cv_gethostbyname_r_returns_int" >&6; } + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if gethostbyname_r returns a pointer" >&5 +printf %s "checking if gethostbyname_r returns a pointer... " >&6; } + if test ${krb5_cv_gethostbyname_r_returns_ptr+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + extern struct hostent *gethostbyname_r (); +int +main (void) +{ +1; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + krb5_cv_gethostbyname_r_returns_ptr=yes +else $as_nop + krb5_cv_gethostbyname_r_returns_ptr=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $krb5_cv_gethostbyname_r_returns_ptr" >&5 +printf "%s\n" "$krb5_cv_gethostbyname_r_returns_ptr" >&6; } + + if test "$krb5_cv_gethostbyname_r_returns_int" = "$krb5_cv_gethostbyname_r_returns_ptr"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine return type of gethostbyname_r -- disabling" >&5 +printf "%s\n" "$as_me: WARNING: cannot determine return type of gethostbyname_r -- disabling" >&2;} + ac_cv_func_gethostbyname_r=no + fi + if test "$krb5_cv_gethostbyname_r_returns_int" = yes; then + +printf "%s\n" "#define GETHOSTBYNAME_R_RETURNS_INT 1" >>confdefs.h + + fi +fi +if test "$ac_cv_func_gethostbyname_r" = yes; then + +printf "%s\n" "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h + + ac_fn_c_check_func "$LINENO" "gethostbyaddr_r" "ac_cv_func_gethostbyaddr_r" +if test "x$ac_cv_func_gethostbyaddr_r" = xyes +then : + +fi + +fi + +fi + + + +# PTHREAD_CFLAGS changes which variant of these functions is declared +# on Solaris 11, so use it for these tests. +old_CFLAGS=$CFLAGS +CFLAGS="$CFLAGS $PTHREAD_CFLAGS" +ac_fn_c_check_func "$LINENO" "getpwnam_r" "ac_cv_func_getpwnam_r" +if test "x$ac_cv_func_getpwnam_r" = xyes +then : + ac_cv_func_getpwnam_r=yes +else $as_nop + ac_cv_func_getpwnam_r=no +fi + +ac_fn_c_check_func "$LINENO" "getpwuid_r" "ac_cv_func_getpwuid_r" +if test "x$ac_cv_func_getpwuid_r" = xyes +then : + ac_cv_func_getpwuid_r=yes +else $as_nop + ac_cv_func_getpwuid_r=no +fi + +if test "$ac_cv_func_getpwnam_r" = yes; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking return type of getpwnam_r" >&5 +printf %s "checking return type of getpwnam_r... " >&6; } + if test ${krb5_cv_getpwnam_r_return_type+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + extern int getpwnam_r(); +int +main (void) +{ +1; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + getpwnam_r_returns_int=yes +else $as_nop + getpwnam_r_returns_int=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + extern struct passwd *getpwnam_r(); +int +main (void) +{ +1; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + getpwnam_r_returns_ptr=yes +else $as_nop + getpwnam_r_returns_ptr=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + case "$getpwnam_r_returns_int/$getpwnam_r_returns_ptr" in + yes/no) krb5_cv_getpwnam_r_return_type=int ;; + no/yes) krb5_cv_getpwnam_r_return_type=ptr ;; + *) krb5_cv_getpwnam_r_return_type=unknown ;; + esac +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $krb5_cv_getpwnam_r_return_type" >&5 +printf "%s\n" "$krb5_cv_getpwnam_r_return_type" >&6; } + if test $krb5_cv_getpwnam_r_return_type = int; then + +printf "%s\n" "#define GETPWNAM_R_RETURNS_INT 1" >>confdefs.h + + elif test $krb5_cv_getpwnam_r_return_type = unknown; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Cannot determine getpwnam_r return type, disabling getpwnam_r" >&5 +printf "%s\n" "$as_me: WARNING: Cannot determine getpwnam_r return type, disabling getpwnam_r" >&2;} + ac_cv_func_getpwnam_r=no + fi +fi +if test "$ac_cv_func_getpwnam_r" = yes; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking number of arguments to getpwnam_r" >&5 +printf %s "checking number of arguments to getpwnam_r... " >&6; } + if test ${krb5_cv_getpwnam_r_args+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + struct passwd pwx; char buf[1024]; +int +main (void) +{ +getpwnam_r("", &pwx, buf, sizeof(buf)); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + args4=yes +else $as_nop + args4=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + struct passwd pwx, *p; char buf[1024]; +int +main (void) +{ +getpwnam_r("", &pwx, buf, sizeof(buf), &p); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + args5=yes +else $as_nop + args5=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + case $args4/$args5 in + yes/no) krb5_cv_getpwnam_r_args=4 ;; + no/yes) krb5_cv_getpwnam_r_args=5 ;; + *) krb5_cv_getpwnam_r_args=unknown ;; + esac +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $krb5_cv_getpwnam_r_args" >&5 +printf "%s\n" "$krb5_cv_getpwnam_r_args" >&6; } + if test "$krb5_cv_getpwnam_r_args" = unknown; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Cannot determine number of arguments to getpwnam_r, disabling its use." >&5 +printf "%s\n" "$as_me: WARNING: Cannot determine number of arguments to getpwnam_r, disabling its use." >&2;} + ac_cv_func_getpwnam_r=no + else + +printf "%s\n" "#define HAVE_GETPWNAM_R 1" >>confdefs.h + + if test "$krb5_cv_getpwnam_r_args" = 4; then + +printf "%s\n" "#define GETPWNAM_R_4_ARGS 1" >>confdefs.h + + fi + fi +fi +CFLAGS=$old_CFLAGS + +if test "$ac_cv_func_getpwnam_r" = no && test "$ac_cv_func_getpwuid_r" = yes; then + # Actually, we could do this check, and the corresponding checks + # for return type and number of arguments, but I doubt we'll run + # into a system where we'd get to use getpwuid_r but not getpwnam_r. + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: getpwnam_r not useful, so disabling getpwuid_r too" >&5 +printf "%s\n" "$as_me: getpwnam_r not useful, so disabling getpwuid_r too" >&6;} + ac_cv_func_getpwuid_r=no +fi +if test "$ac_cv_func_getpwuid_r" = yes; then + +printf "%s\n" "#define HAVE_GETPWUID_R 1" >>confdefs.h + + # Hack: Assume getpwuid_r is the shorter form if getpwnam_r is. + if test "$krb5_cv_getpwnam_r_args" = 4; then + +printf "%s\n" "#define GETPWUID_R_4_ARGS 1" >>confdefs.h + + fi +fi + +if test "$ac_cv_func_gmtime_r" = yes; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether gmtime_r returns int" >&5 +printf %s "checking whether gmtime_r returns int... " >&6; } + if test ${krb5_cv_gmtime_r_returns_int+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + extern int gmtime_r (); +int +main (void) +{ +1; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + return_int=yes +else $as_nop + return_int=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + extern struct tm *gmtime_r (); +int +main (void) +{ +1; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + return_ptr=yes +else $as_nop + return_ptr=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + case $return_int/$return_ptr in + yes/no) krb5_cv_gmtime_r_returns_int=yes ;; + no/yes) krb5_cv_gmtime_r_returns_int=no ;; + *) # Can't figure it out, punt the function. + ac_cv_func_gmtime_r=no ;; + esac +fi + + if test "$ac_cv_func_gmtime_r" = no; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unknown -- ignoring gmtime_r" >&5 +printf "%s\n" "unknown -- ignoring gmtime_r" >&6; } + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $krb5_cv_gmtime_r_returns_int" >&5 +printf "%s\n" "$krb5_cv_gmtime_r_returns_int" >&6; } + if test "$krb5_cv_gmtime_r_returns_int" = yes; then + +printf "%s\n" "#define GMTIME_R_RETURNS_INT 1" >>confdefs.h + + fi + fi +fi + +ac_fn_c_check_func "$LINENO" "getservbyname_r" "ac_cv_func_getservbyname_r" +if test "x$ac_cv_func_getservbyname_r" = xyes +then : + +ac_cv_func_getservbyname_r=yes +if test "$ac_cv_func_getservbyname_r" = yes; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if getservbyname_r returns an int" >&5 +printf %s "checking if getservbyname_r returns an int... " >&6; } + if test ${krb5_cv_getservbyname_r_returns_int+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + extern int getservbyname_r (); +int +main (void) +{ +1; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + krb5_cv_getservbyname_r_returns_int=yes +else $as_nop + krb5_cv_getservbyname_r_returns_int=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $krb5_cv_getservbyname_r_returns_int" >&5 +printf "%s\n" "$krb5_cv_getservbyname_r_returns_int" >&6; } + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if getservbyname_r returns a pointer" >&5 +printf %s "checking if getservbyname_r returns a pointer... " >&6; } + if test ${krb5_cv_getservbyname_r_returns_ptr+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + extern struct servent *getservbyname_r (); +int +main (void) +{ +1; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + krb5_cv_getservbyname_r_returns_ptr=yes +else $as_nop + krb5_cv_getservbyname_r_returns_ptr=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $krb5_cv_getservbyname_r_returns_ptr" >&5 +printf "%s\n" "$krb5_cv_getservbyname_r_returns_ptr" >&6; } + + if test "$krb5_cv_getservbyname_r_returns_int" = "$krb5_cv_getservbyname_r_returns_ptr"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine return type of getservbyname_r -- disabling" >&5 +printf "%s\n" "$as_me: WARNING: cannot determine return type of getservbyname_r -- disabling" >&2;} + ac_cv_func_getservbyname_r=no + fi + if test "$krb5_cv_getservbyname_r_returns_int" = yes; then + +printf "%s\n" "#define GETSERVBYNAME_R_RETURNS_INT 1" >>confdefs.h + + fi +fi +if test "$ac_cv_func_getservbyname_r" = yes; then + +printf "%s\n" "#define HAVE_GETSERVBYNAME_R 1" >>confdefs.h + + ac_fn_c_check_func "$LINENO" "getservbyport_r" "ac_cv_func_getservbyport_r" +if test "x$ac_cv_func_getservbyport_r" = xyes +then : + +fi + +fi + +fi + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for yylineno declaration" >&5 +printf %s "checking for yylineno declaration... " >&6; } +if test ${krb5_cv_type_yylineno+y} +then : + printf %s "(cached) " >&6 +else $as_nop + # some systems have yylineno, others don't... + echo '%% +%%' | ${LEX} -t > conftest.out + if egrep yylineno conftest.out >/dev/null 2>&1; then + krb5_cv_type_yylineno=yes + else + krb5_cv_type_yylineno=no + fi + rm -f conftest.out +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $krb5_cv_type_yylineno" >&5 +printf "%s\n" "$krb5_cv_type_yylineno" >&6; } + if test $krb5_cv_type_yylineno = no; then + +printf "%s\n" "#define NO_YYLINENO 1" >>confdefs.h + + fi + + +ac_fn_c_check_header_compile "$LINENO" "dirent.h" "ac_cv_header_dirent_h" "$ac_includes_default" +if test "x$ac_cv_header_dirent_h" = xyes +then : + +printf "%s\n" "#define USE_DIRENT_H 1" >>confdefs.h + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5 +printf %s "checking for uid_t in sys/types.h... " >&6; } +if test ${ac_cv_type_uid_t+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "uid_t" >/dev/null 2>&1 +then : + ac_cv_type_uid_t=yes +else $as_nop + ac_cv_type_uid_t=no +fi +rm -rf conftest* + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5 +printf "%s\n" "$ac_cv_type_uid_t" >&6; } +if test $ac_cv_type_uid_t = no; then + +printf "%s\n" "#define uid_t int" >>confdefs.h + + +printf "%s\n" "#define gid_t int" >>confdefs.h + +fi + + +ac_fn_c_check_header_compile "$LINENO" "termios.h" "ac_cv_header_termios_h" "$ac_includes_default" +if test "x$ac_cv_header_termios_h" = xyes +then : + ac_fn_c_check_func "$LINENO" "tcsetattr" "ac_cv_func_tcsetattr" +if test "x$ac_cv_func_tcsetattr" = xyes +then : + +printf "%s\n" "#define POSIX_TERMIOS 1" >>confdefs.h + +fi + +fi + + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking POSIX signal handlers" >&5 +printf %s "checking POSIX signal handlers... " >&6; } +if test ${krb5_cv_has_posix_signals+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#ifdef signal +#undef signal +#endif +extern void (*signal ()) (); +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + krb5_cv_has_posix_signals=yes +else $as_nop + krb5_cv_has_posix_signals=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $krb5_cv_has_posix_signals" >&5 +printf "%s\n" "$krb5_cv_has_posix_signals" >&6; } +if test $krb5_cv_has_posix_signals = yes; then + stype=void + +printf "%s\n" "#define POSIX_SIGTYPE 1" >>confdefs.h + +else + if test $ac_cv_type_signal = void; then + stype=void + else + stype=int + fi +fi + +printf "%s\n" "#define krb5_sigtype $stype" >>confdefs.h + +ac_fn_c_check_header_compile "$LINENO" "poll.h" "ac_cv_header_poll_h" "$ac_includes_default" +if test "x$ac_cv_header_poll_h" = xyes +then : + printf "%s\n" "#define HAVE_POLL_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" +if test "x$ac_cv_header_stdlib_h" = xyes +then : + printf "%s\n" "#define HAVE_STDLIB_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default" +if test "x$ac_cv_header_string_h" = xyes +then : + printf "%s\n" "#define HAVE_STRING_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "stddef.h" "ac_cv_header_stddef_h" "$ac_includes_default" +if test "x$ac_cv_header_stddef_h" = xyes +then : + printf "%s\n" "#define HAVE_STDDEF_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_types_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_TYPES_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/file.h" "ac_cv_header_sys_file_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_file_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_FILE_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_param_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_PARAM_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/stat.h" "ac_cv_header_sys_stat_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_stat_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_STAT_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_time_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_TIME_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default" +if test "x$ac_cv_header_netinet_in_h" = xyes +then : + printf "%s\n" "#define HAVE_NETINET_IN_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/uio.h" "ac_cv_header_sys_uio_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_uio_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_UIO_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/filio.h" "ac_cv_header_sys_filio_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_filio_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_FILIO_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/select.h" "ac_cv_header_sys_select_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_select_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_SELECT_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "time.h" "ac_cv_header_time_h" "$ac_includes_default" +if test "x$ac_cv_header_time_h" = xyes +then : + printf "%s\n" "#define HAVE_TIME_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "paths.h" "ac_cv_header_paths_h" "$ac_includes_default" +if test "x$ac_cv_header_paths_h" = xyes +then : + printf "%s\n" "#define HAVE_PATHS_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "errno.h" "ac_cv_header_errno_h" "$ac_includes_default" +if test "x$ac_cv_header_errno_h" = xyes +then : + printf "%s\n" "#define HAVE_ERRNO_H 1" >>confdefs.h + +fi + + +# If compiling with IPv6 support, test if in6addr_any functions. +# Irix 6.5.16 defines it, but lacks support in the C library. +if test $krb5_cv_inet6 = yes || test "$krb5_cv_inet6_with_dinet6" = yes ; then +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for in6addr_any definition in library" >&5 +printf %s "checking for in6addr_any definition in library... " >&6; } +if test ${krb5_cv_var_in6addr_any+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#include +#include +#include + +int +main (void) +{ + + struct sockaddr_in6 in; + in.sin6_addr = in6addr_any; + printf("%x", &in); + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + krb5_cv_var_in6addr_any=yes +else $as_nop + krb5_cv_var_in6addr_any=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $krb5_cv_var_in6addr_any" >&5 +printf "%s\n" "$krb5_cv_var_in6addr_any" >&6; } + if test $krb5_cv_var_in6addr_any = no; then + +printf "%s\n" "#define NEED_INSIXADDR_ANY 1" >>confdefs.h + + fi +fi + +# then from osconf.h, we have + + + +# Obsolete code to be removed. +if test $ac_cv_header_sys_time_h = yes; then + +printf "%s\n" "#define TIME_WITH_SYS_TIME 1" >>confdefs.h + +fi +# End of obsolete code. + +ac_fn_c_check_type "$LINENO" "time_t" "ac_cv_type_time_t" "$ac_includes_default" +if test "x$ac_cv_type_time_t" = xyes +then : + +else $as_nop + +printf "%s\n" "#define time_t long" >>confdefs.h + +fi + +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5 +printf %s "checking size of time_t... " >&6; } +if test ${ac_cv_sizeof_time_t+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "$ac_includes_default" +then : + +else $as_nop + if test "$ac_cv_type_time_t" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (time_t) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_time_t=0 + fi +fi + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5 +printf "%s\n" "$ac_cv_sizeof_time_t" >&6; } + + + +printf "%s\n" "#define SIZEOF_TIME_T $ac_cv_sizeof_time_t" >>confdefs.h + + +SIZEOF_TIME_T=$ac_cv_sizeof_time_t + + +# Determine where to put the replay cache. + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for replay cache directory" >&5 +printf %s "checking for replay cache directory... " >&6; } +if test ${krb5_cv_sys_rcdir+y} +then : + printf %s "(cached) " >&6 +else $as_nop + +if test $cross_compiling = yes; then + krb5_cv_sys_rcdir=/var/tmp +else + for t_dir in /var/tmp /usr/tmp /var/usr/tmp /tmp ; do + test -d $t_dir || continue + krb5_cv_sys_rcdir=$t_dir + break + done +fi +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $krb5_cv_sys_rcdir" >&5 +printf "%s\n" "$krb5_cv_sys_rcdir" >&6; } +KRB5_RCTMPDIR=$krb5_cv_sys_rcdir + + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for socklen_t" >&5 +printf %s "checking for socklen_t... " >&6; } +if test ${krb5_cv_has_type_socklen_t+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include + +int +main (void) +{ +sizeof (socklen_t); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + krb5_cv_has_type_socklen_t=yes +else $as_nop + krb5_cv_has_type_socklen_t=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $krb5_cv_has_type_socklen_t" >&5 +printf "%s\n" "$krb5_cv_has_type_socklen_t" >&6; } +if test $krb5_cv_has_type_socklen_t = yes; then + +printf "%s\n" "#define HAVE_SOCKLEN_T 1" >>confdefs.h + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct lifconf" >&5 +printf %s "checking for struct lifconf... " >&6; } +if test ${krb5_cv_has_struct_lifconf+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include + +int +main (void) +{ +sizeof (struct lifconf); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + krb5_cv_has_struct_lifconf=yes +else $as_nop + krb5_cv_has_struct_lifconf=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $krb5_cv_has_struct_lifconf" >&5 +printf "%s\n" "$krb5_cv_has_struct_lifconf" >&6; } +if test $krb5_cv_has_struct_lifconf = yes; then + +printf "%s\n" "#define HAVE_STRUCT_LIFCONF 1" >>confdefs.h + +fi +# HP-UX 11 uses stuct if_laddrconf +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct if_laddrconf" >&5 +printf %s "checking for struct if_laddrconf... " >&6; } +if test ${krb5_cv_has_struct_if_laddrconf+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include + +int +main (void) +{ +sizeof (struct if_laddrconf); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + krb5_cv_has_struct_if_laddrconf=yes +else $as_nop + krb5_cv_has_struct_if_laddrconf=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $krb5_cv_has_struct_if_laddrconf" >&5 +printf "%s\n" "$krb5_cv_has_struct_if_laddrconf" >&6; } +if test $krb5_cv_has_struct_if_laddrconf = yes; then + +printf "%s\n" "#define HAVE_STRUCT_IF_LADDRCONF 1" >>confdefs.h + +fi + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for h_errno in netdb.h" >&5 +printf %s "checking for h_errno in netdb.h... " >&6; } +if test ${krb5_cv_header_netdb_h_h_errno+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main (void) +{ +int x = h_errno; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + krb5_cv_header_netdb_h_h_errno=yes +else $as_nop + krb5_cv_header_netdb_h_h_errno=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $krb5_cv_header_netdb_h_h_errno" >&5 +printf "%s\n" "$krb5_cv_header_netdb_h_h_errno" >&6; } +if test $krb5_cv_header_netdb_h_h_errno = yes; then + +printf "%s\n" "#define HAVE_NETDB_H_H_ERRNO 1" >>confdefs.h + +fi + + +# Check whether --enable-athena was given. +if test ${enable_athena+y} +then : + enableval=$enable_athena; +printf "%s\n" "#define KRB5_ATHENA_COMPAT 1" >>confdefs.h + +fi + + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 +printf %s "checking for inline... " >&6; } +if test ${ac_cv_c_inline+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_c_inline=no +for ac_kw in inline __inline__ __inline; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifndef __cplusplus +typedef int foo_t; +static $ac_kw foo_t static_foo (void) {return 0; } +$ac_kw foo_t foo (void) {return 0; } +#endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_c_inline=$ac_kw +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + test "$ac_cv_c_inline" != no && break +done + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 +printf "%s\n" "$ac_cv_c_inline" >&6; } + +case $ac_cv_c_inline in + inline | yes) ;; + *) + case $ac_cv_c_inline in + no) ac_val=;; + *) ac_val=$ac_cv_c_inline;; + esac + cat >>confdefs.h <<_ACEOF +#ifndef __cplusplus +#define inline $ac_val +#endif +_ACEOF + ;; +esac + + + + +ac_fn_c_check_type "$LINENO" "struct cmsghdr" "ac_cv_type_struct_cmsghdr" " +#include +#include +#include + +" +if test "x$ac_cv_type_struct_cmsghdr" = xyes +then : + +printf "%s\n" "#define HAVE_STRUCT_CMSGHDR 1" >>confdefs.h + + +fi +ac_fn_c_check_type "$LINENO" "struct in_pktinfo" "ac_cv_type_struct_in_pktinfo" " +#include +#include +#include + +" +if test "x$ac_cv_type_struct_in_pktinfo" = xyes +then : + +printf "%s\n" "#define HAVE_STRUCT_IN_PKTINFO 1" >>confdefs.h + + +fi +ac_fn_c_check_type "$LINENO" "struct in6_pktinfo" "ac_cv_type_struct_in6_pktinfo" " +#include +#include +#include + +" +if test "x$ac_cv_type_struct_in6_pktinfo" = xyes +then : + +printf "%s\n" "#define HAVE_STRUCT_IN6_PKTINFO 1" >>confdefs.h + + +fi +ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" " +#include +#include +#include + +" +if test "x$ac_cv_type_struct_sockaddr_storage" = xyes +then : + +printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_STORAGE 1" >>confdefs.h + + +fi + +ac_fn_c_check_type "$LINENO" "struct rt_msghdr" "ac_cv_type_struct_rt_msghdr" " +#include +#include +#include + +" +if test "x$ac_cv_type_struct_rt_msghdr" = xyes +then : + +printf "%s\n" "#define HAVE_STRUCT_RT_MSGHDR 1" >>confdefs.h + + +fi + + +# Tests for 64-bit edwards25519 code. +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5 +printf %s "checking size of size_t... " >&6; } +if test ${ac_cv_sizeof_size_t+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default" +then : + +else $as_nop + if test "$ac_cv_type_size_t" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (size_t) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_size_t=0 + fi +fi + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5 +printf "%s\n" "$ac_cv_sizeof_size_t" >&6; } + + + +printf "%s\n" "#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t" >>confdefs.h + + +ac_fn_c_check_type "$LINENO" "__int128_t" "ac_cv_type___int128_t" "$ac_includes_default" +if test "x$ac_cv_type___int128_t" = xyes +then : + +printf "%s\n" "#define HAVE___INT128_T 1" >>confdefs.h + + +fi +ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default" +if test "x$ac_cv_type___uint128_t" = xyes +then : + +printf "%s\n" "#define HAVE___UINT128_T 1" >>confdefs.h + + +fi + + +# stuff for util/profile + +# AC_KRB5_TCL already done +DO_TCL= +test "$TCL_LIBS" != "" && DO_TCL=ok + + +# types libdb2 wants + +ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default" +if test "x$ac_cv_type_ssize_t" = xyes +then : + +printf "%s\n" "#define HAVE_SSIZE_T 1" >>confdefs.h + + +fi +ac_fn_c_check_type "$LINENO" "u_char" "ac_cv_type_u_char" "$ac_includes_default" +if test "x$ac_cv_type_u_char" = xyes +then : + +printf "%s\n" "#define HAVE_U_CHAR 1" >>confdefs.h + + +fi +ac_fn_c_check_type "$LINENO" "u_int" "ac_cv_type_u_int" "$ac_includes_default" +if test "x$ac_cv_type_u_int" = xyes +then : + +printf "%s\n" "#define HAVE_U_INT 1" >>confdefs.h + + +fi +ac_fn_c_check_type "$LINENO" "u_long" "ac_cv_type_u_long" "$ac_includes_default" +if test "x$ac_cv_type_u_long" = xyes +then : + +printf "%s\n" "#define HAVE_U_LONG 1" >>confdefs.h + + +fi +ac_fn_c_check_type "$LINENO" "u_int8_t" "ac_cv_type_u_int8_t" "$ac_includes_default" +if test "x$ac_cv_type_u_int8_t" = xyes +then : + +printf "%s\n" "#define HAVE_U_INT8_T 1" >>confdefs.h + + +fi +ac_fn_c_check_type "$LINENO" "u_int16_t" "ac_cv_type_u_int16_t" "$ac_includes_default" +if test "x$ac_cv_type_u_int16_t" = xyes +then : + +printf "%s\n" "#define HAVE_U_INT16_T 1" >>confdefs.h + + +fi +ac_fn_c_check_type "$LINENO" "u_int32_t" "ac_cv_type_u_int32_t" "$ac_includes_default" +if test "x$ac_cv_type_u_int32_t" = xyes +then : + +printf "%s\n" "#define HAVE_U_INT32_T 1" >>confdefs.h + + +fi +ac_fn_c_check_type "$LINENO" "int8_t" "ac_cv_type_int8_t" "$ac_includes_default" +if test "x$ac_cv_type_int8_t" = xyes +then : + +printf "%s\n" "#define HAVE_INT8_T 1" >>confdefs.h + + +fi +ac_fn_c_check_type "$LINENO" "int16_t" "ac_cv_type_int16_t" "$ac_includes_default" +if test "x$ac_cv_type_int16_t" = xyes +then : + +printf "%s\n" "#define HAVE_INT16_T 1" >>confdefs.h + + +fi +ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default" +if test "x$ac_cv_type_int32_t" = xyes +then : + +printf "%s\n" "#define HAVE_INT32_T 1" >>confdefs.h + + +fi + + +# Some libdb2 test programs want a shell that supports functions. +FCTSH=false +# Extract the first word of "sh", so it can be a program name with args. +set dummy sh; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_SH+y} +then : + printf %s "(cached) " >&6 +else $as_nop + case $SH in + [\\/]* | ?:[\\/]*) + ac_cv_path_SH="$SH" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_SH="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_path_SH" && ac_cv_path_SH="false" + ;; +esac +fi +SH=$ac_cv_path_SH +if test -n "$SH"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SH" >&5 +printf "%s\n" "$SH" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + +# Extract the first word of "sh5", so it can be a program name with args. +set dummy sh5; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_SH5+y} +then : + printf %s "(cached) " >&6 +else $as_nop + case $SH5 in + [\\/]* | ?:[\\/]*) + ac_cv_path_SH5="$SH5" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_SH5="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_path_SH5" && ac_cv_path_SH5="false" + ;; +esac +fi +SH5=$ac_cv_path_SH5 +if test -n "$SH5"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SH5" >&5 +printf "%s\n" "$SH5" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + +# Extract the first word of "bash", so it can be a program name with args. +set dummy bash; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_BASH+y} +then : + printf %s "(cached) " >&6 +else $as_nop + case $BASH in + [\\/]* | ?:[\\/]*) + ac_cv_path_BASH="$BASH" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_BASH="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_path_BASH" && ac_cv_path_BASH="false" + ;; +esac +fi +BASH=$ac_cv_path_BASH +if test -n "$BASH"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5 +printf "%s\n" "$BASH" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + +for prog in $SH $SH5 $BASH; do + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $prog supports functions" >&5 +printf %s "checking if $prog supports functions... " >&6; } + if $prog -c 'foo() { true; }; foo' >/dev/null 2>&1; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + FCTSH=$prog + break + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + fi +done + + +# Test for POSIX 2001 *printf support (X/Open System Interfaces extension +# to ANSI/ISO C 1999 specification). Specifically, positional +# specifications; not checking for other features like %zx at present. +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for POSIX printf positional specification support" >&5 +printf %s "checking for POSIX printf positional specification support... " >&6; } +if test ${ac_cv_printf_positional+y} +then : + printf %s "(cached) " >&6 +else $as_nop + +if test "$cross_compiling" = yes +then : + as_fn_error $? "Cannot test for printf positional argument support when cross compiling" "$LINENO" 5 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +const char expected[] = "200 100"; +int main () { + char buf[30]; + sprintf(buf, "%2\$x %1\$d", 100, 512); + if (strcmp(expected, buf)) { + fprintf(stderr,"bad result: <%s> wanted: <%s>\n", buf, expected); + return 1; + } + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + ac_cv_printf_positional=yes +else $as_nop + ac_cv_printf_positional=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi + +# Nothing for autoconf.h for now. +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_printf_positional" >&5 +printf "%s\n" "$ac_cv_printf_positional" >&6; } + + +# for t_locate_kdc test + +# Extract the first word of "dig", so it can be a program name with args. +set dummy dig; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_DIG+y} +then : + printf %s "(cached) " >&6 +else $as_nop + case $DIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_DIG="$DIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_DIG="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_path_DIG" && ac_cv_path_DIG="false" + ;; +esac +fi +DIG=$ac_cv_path_DIG +if test -n "$DIG"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DIG" >&5 +printf "%s\n" "$DIG" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + +# Extract the first word of "nslookup", so it can be a program name with args. +set dummy nslookup; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_NSLOOKUP+y} +then : + printf %s "(cached) " >&6 +else $as_nop + case $NSLOOKUP in + [\\/]* | ?:[\\/]*) + ac_cv_path_NSLOOKUP="$NSLOOKUP" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_NSLOOKUP="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_path_NSLOOKUP" && ac_cv_path_NSLOOKUP="false" + ;; +esac +fi +NSLOOKUP=$ac_cv_path_NSLOOKUP +if test -n "$NSLOOKUP"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NSLOOKUP" >&5 +printf "%s\n" "$NSLOOKUP" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + + +# for kadmin + +for ac_prog in 'bison -y' byacc +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_YACC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$YACC"; then + ac_cv_prog_YACC="$YACC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_YACC="$ac_prog" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +YACC=$ac_cv_prog_YACC +if test -n "$YACC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5 +printf "%s\n" "$YACC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + + test -n "$YACC" && break +done +test -n "$YACC" || YACC="yacc" + +ath_compat= +# Check whether --enable-athena was given. +if test ${enable_athena+y} +then : + enableval=$enable_athena; ath_compat=compat +fi + +# The following are tests for the presence of programs required for +# kadmin testing. +# Extract the first word of "runtest", so it can be a program name with args. +set dummy runtest; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_have_RUNTEST+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$have_RUNTEST"; then + ac_cv_prog_have_RUNTEST="$have_RUNTEST" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_have_RUNTEST="runtest" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +have_RUNTEST=$ac_cv_prog_have_RUNTEST +if test -n "$have_RUNTEST"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_RUNTEST" >&5 +printf "%s\n" "$have_RUNTEST" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + +# Extract the first word of "perl", so it can be a program name with args. +set dummy perl; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_have_PERL+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$have_PERL"; then + ac_cv_prog_have_PERL="$have_PERL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_have_PERL="perl" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +have_PERL=$ac_cv_prog_have_PERL +if test -n "$have_PERL"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_PERL" >&5 +printf "%s\n" "$have_PERL" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + +if test "$have_PERL" = perl -a "$have_RUNTEST" = runtest -a "$TCL_LIBS" != ""; then + DO_TEST=ok +fi + + +# The following are substituted into kadmin/testing/scripts/env-setup.sh +RBUILD=`pwd` + +case "$srcdir" in +/*) S_TOP=$srcdir ;; +*) S_TOP=`pwd`/$srcdir ;; +esac + +# Extract the first word of "expect", so it can be a program name with args. +set dummy expect; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_EXPECT+y} +then : + printf %s "(cached) " >&6 +else $as_nop + case $EXPECT in + [\\/]* | ?:[\\/]*) + ac_cv_path_EXPECT="$EXPECT" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_EXPECT="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +EXPECT=$ac_cv_path_EXPECT +if test -n "$EXPECT"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $EXPECT" >&5 +printf "%s\n" "$EXPECT" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + +# For kadmin/testing/util/Makefile.in +if test "$TCL_LIBS" != "" ; then + DO_ALL=tcl +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use priocntl hack" >&5 +printf %s "checking whether to use priocntl hack... " >&6; } +if test ${krb5_cv_priocntl_hack+y} +then : + printf %s "(cached) " >&6 +else $as_nop + case $krb5_cv_host in +*-*-solaris2.9*) + if test "$cross_compiling" = yes; then + krb5_cv_priocntl_hack=yes + else + # Solaris patch 117171-11 (sparc) or 117172-11 (x86) + # fixes the Solaris 9 bug where final pty output + # gets lost on close. + if showrev -p | $AWK 'BEGIN { e = 1 } +/Patch: 11717[12]/ { x = index($2, "-"); +if (substr($2, x + 1, length($2) - x) >= 11) +{ e = 0 } else { e = 1 } } +END { exit e; }'; then + krb5_cv_priocntl_hack=no + else + krb5_cv_priocntl_hack=yes + fi + fi + ;; +*) + krb5_cv_priocntl_hack=no + ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $krb5_cv_priocntl_hack" >&5 +printf "%s\n" "$krb5_cv_priocntl_hack" >&6; } +if test "$krb5_cv_priocntl_hack" = yes; then + PRIOCNTL_HACK=1 +else + PRIOCNTL_HACK=0 +fi + +ac_config_files="$ac_config_files kadmin/testing/scripts/env-setup.sh:kadmin/testing/scripts/env-setup.shin" + +# for lib/kadm5 +# Extract the first word of "runtest", so it can be a program name with args. +set dummy runtest; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_RUNTEST+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$RUNTEST"; then + ac_cv_prog_RUNTEST="$RUNTEST" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_RUNTEST="runtest" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +RUNTEST=$ac_cv_prog_RUNTEST +if test -n "$RUNTEST"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RUNTEST" >&5 +printf "%s\n" "$RUNTEST" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + +# Extract the first word of "perl", so it can be a program name with args. +set dummy perl; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_PERL+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$PERL"; then + ac_cv_prog_PERL="$PERL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_PERL="perl" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +PERL=$ac_cv_prog_PERL +if test -n "$PERL"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5 +printf "%s\n" "$PERL" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + + +# lib/gssapi +ac_fn_c_check_header_compile "$LINENO" "xom.h" "ac_cv_header_xom_h" "$ac_includes_default" +if test "x$ac_cv_header_xom_h" = xyes +then : + + include_xom='awk '\''END{printf("%cinclude \n", 35);}'\'' < /dev/null' +else $as_nop + + include_xom='echo "/* no xom.h */"' +fi + + + + +# lib/rpc +### Check where struct rpcent is declared. + +# This is necessary to determine: +# 1. If /usr/include/netdb.h declares struct rpcent +# 2. If /usr/include/rpc/netdb.h declares struct rpcent + +# We have our own rpc/netdb.h, and if /usr/include/netdb.h includes +# rpc/netdb.h, then nastiness could happen. + +# Logic: If /usr/include/netdb.h declares struct rpcent, then check +# rpc/netdb.h. If /usr/include/rpc/netdb.h declares struct rpcent, +# then define STRUCT_RPCENT_IN_RPC_NETDB_H, otherwise do not. If +# neither netdb.h nor rpc/netdb.h declares struct rpcent, then define +# STRUCT_RPCENT_IN_RPC_NETDB_H anyway. + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where struct rpcent is declared" >&5 +printf %s "checking where struct rpcent is declared... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main (void) +{ +struct rpcent e; +char c = e.r_name[0]; +int i = e.r_number; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main (void) +{ +struct rpcent e; +char c = e.r_name[0]; +int i = e.r_number; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: rpc/netdb.h" >&5 +printf "%s\n" "rpc/netdb.h" >&6; } +rpcent_define='#define STRUCT_RPCENT_IN_RPC_NETDB_H' +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: netdb.h" >&5 +printf "%s\n" "netdb.h" >&6; } +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: nowhere" >&5 +printf "%s\n" "nowhere" >&6; } +rpcent_define='#define STRUCT_RPCENT_IN_RPC_NETDB_H' +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + + +ac_fn_c_check_header_compile "$LINENO" "sys/select.h" "ac_cv_header_sys_select_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_select_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_SELECT_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_time_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_TIME_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default" +if test "x$ac_cv_header_unistd_h" = xyes +then : + printf "%s\n" "#define HAVE_UNISTD_H 1" >>confdefs.h + +fi + +if test $ac_cv_header_sys_select_h = yes; then + GSSRPC__SYS_SELECT_H='#include ' +else + GSSRPC__SYS_SELECT_H='/* #include */' +fi + +if test $ac_cv_header_sys_time_h = yes; then + GSSRPC__SYS_TIME_H='#include ' +else + GSSRPC__SYS_TIME_H='/* #include */' +fi + +if test $ac_cv_header_unistd_h = yes; then + GSSRPC__UNISTD_H='#include ' +else + GSSRPC__UNISTD_H='/* #include */' +fi + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MAXHOSTNAMELEN in sys/param.h" >&5 +printf %s "checking for MAXHOSTNAMELEN in sys/param.h... " >&6; } +if test ${krb5_cv_header_sys_param_h_maxhostnamelen+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main (void) +{ +int i = MAXHOSTNAMELEN; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + krb5_cv_header_sys_param_h_maxhostnamelen=yes +else $as_nop + krb5_cv_header_sys_param_h_maxhostnamelen=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $krb5_cv_header_sys_param_h_maxhostnamelen" >&5 +printf "%s\n" "$krb5_cv_header_sys_param_h_maxhostnamelen" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MAXHOSTNAMELEN in netdb.h" >&5 +printf %s "checking for MAXHOSTNAMELEN in netdb.h... " >&6; } +if test ${krb5_cv_header_netdb_h_maxhostnamelen+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main (void) +{ +int i = MAXHOSTNAMELEN; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + krb5_cv_header_netdb_h_maxhostnamelen=yes +else $as_nop + krb5_cv_header_netdb_h_maxhostnamelen=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $krb5_cv_header_netdb_h_maxhostnamelen" >&5 +printf "%s\n" "$krb5_cv_header_netdb_h_maxhostnamelen" >&6; } + +GSSRPC__SYS_PARAM_H='/* #include */' +GSSRPC__NETDB_H='/* #include */' +if test $krb5_cv_header_sys_param_h_maxhostnamelen = yes; then + GSSRPC__SYS_PARAM_H='#include ' +else + if test $krb5_cv_header_netdb_h_maxhostnamelen = yes; then + GSSRPC__NETDB_H='#include ' + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: can't find MAXHOSTNAMELEN definition; faking it" >&5 +printf "%s\n" "$as_me: WARNING: can't find MAXHOSTNAMELEN definition; faking it" >&2;} + fi +fi + + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for BSD type aliases" >&5 +printf %s "checking for BSD type aliases... " >&6; } +if test ${krb5_cv_type_bsdaliases+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#if HAVE_UNISTD_H +#include +#endif +int +main (void) +{ +u_char c; +u_int i; +u_long l; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + krb5_cv_type_bsdaliases=yes +else $as_nop + krb5_cv_type_bsdaliases=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $krb5_cv_type_bsdaliases" >&5 +printf "%s\n" "$krb5_cv_type_bsdaliases" >&6; } +if test $krb5_cv_type_bsdaliases = yes; then + GSSRPC__BSD_TYPEALIASES='/* #undef GSSRPC__BSD_TYPEALIASES */' +else + GSSRPC__BSD_TYPEALIASES='#define GSSRPC__BSD_TYPEALIASES 1' +fi + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking return type of setrpcent" >&5 +printf %s "checking return type of setrpcent... " >&6; } +if test ${k5_cv_type_setrpcent+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#ifdef __cplusplus +extern "C" +#endif +extern void setrpcent(); +int +main (void) +{ +int i; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + k5_cv_type_setrpcent=void +else $as_nop + k5_cv_type_setrpcent=int +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $k5_cv_type_setrpcent" >&5 +printf "%s\n" "$k5_cv_type_setrpcent" >&6; } + +printf "%s\n" "#define SETRPCENT_TYPE $k5_cv_type_setrpcent" >>confdefs.h + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking return type of endrpcent" >&5 +printf %s "checking return type of endrpcent... " >&6; } +if test ${k5_cv_type_endrpcent+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#ifdef __cplusplus +extern "C" +#endif +extern void endrpcent(); +int +main (void) +{ +int i; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + k5_cv_type_endrpcent=void +else $as_nop + k5_cv_type_endrpcent=int +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $k5_cv_type_endrpcent" >&5 +printf "%s\n" "$k5_cv_type_endrpcent" >&6; } + +printf "%s\n" "#define ENDRPCENT_TYPE $k5_cv_type_endrpcent" >>confdefs.h + +ac_config_files="$ac_config_files include/gssrpc/types.h:include/gssrpc/types.hin" + +PASS=tcp + + +# for pkinit +# Check whether --enable-pkinit was given. +if test ${enable_pkinit+y} +then : + enableval=$enable_pkinit; +else $as_nop + enable_pkinit=try +fi + +if test "$enable_pkinit" = yes || test "$enable_pkinit" = try; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a recent enough OpenSSL" >&5 +printf %s "checking for a recent enough OpenSSL... " >&6; } +if test ${k5_cv_openssl_version_okay+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#if OPENSSL_VERSION_NUMBER < 0x10000000L +# error openssl is too old, need 1.0.0 +#endif +int i = 1; + +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + k5_cv_openssl_version_okay=yes +else $as_nop + k5_cv_openssl_version_okay=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $k5_cv_openssl_version_okay" >&5 +printf "%s\n" "$k5_cv_openssl_version_okay" >&6; } + old_LIBS="$LIBS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PKCS7_get_signer_info in -lcrypto" >&5 +printf %s "checking for PKCS7_get_signer_info in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_PKCS7_get_signer_info+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcrypto $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char PKCS7_get_signer_info (); +int +main (void) +{ +return PKCS7_get_signer_info (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_crypto_PKCS7_get_signer_info=yes +else $as_nop + ac_cv_lib_crypto_PKCS7_get_signer_info=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_PKCS7_get_signer_info" >&5 +printf "%s\n" "$ac_cv_lib_crypto_PKCS7_get_signer_info" >&6; } +if test "x$ac_cv_lib_crypto_PKCS7_get_signer_info" = xyes +then : + printf "%s\n" "#define HAVE_LIBCRYPTO 1" >>confdefs.h + + LIBS="-lcrypto $LIBS" + +fi + + LIBS="$old_LIBS" +fi +if test "$k5_cv_openssl_version_okay" = yes && (test "$enable_pkinit" = yes || test "$enable_pkinit" = try); then + ac_config_files="$ac_config_files plugins/preauth/pkinit/Makefile:$srcdir/./config/pre.in:plugins/preauth/pkinit/Makefile.in:plugins/preauth/pkinit/deps:$srcdir/./config/post.in" + + + + ac_config_files="$ac_config_files tests/softpkcs11/Makefile:$srcdir/./config/pre.in:tests/softpkcs11/Makefile.in:tests/softpkcs11/deps:$srcdir/./config/post.in" + + + + PKINIT=yes + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CMS_get0_content in -lcrypto" >&5 +printf %s "checking for CMS_get0_content in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_CMS_get0_content+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcrypto $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char CMS_get0_content (); +int +main (void) +{ +return CMS_get0_content (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_crypto_CMS_get0_content=yes +else $as_nop + ac_cv_lib_crypto_CMS_get0_content=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CMS_get0_content" >&5 +printf "%s\n" "$ac_cv_lib_crypto_CMS_get0_content" >&6; } +if test "x$ac_cv_lib_crypto_CMS_get0_content" = xyes +then : + +printf "%s\n" "#define HAVE_OPENSSL_CMS 1" >>confdefs.h + +fi + +elif test "$k5_cv_openssl_version_okay" = no && test "$enable_pkinit" = yes; then + as_fn_error $? "Version of OpenSSL is too old; cannot enable PKINIT." "$LINENO" 5 +else + +printf "%s\n" "#define DISABLE_PKINIT 1" >>confdefs.h + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Disabling PKINIT support." >&5 +printf "%s\n" "$as_me: Disabling PKINIT support." >&6;} + PKINIT=no +fi + + +# for lib/apputils +ac_fn_c_check_func "$LINENO" "daemon" "ac_cv_func_daemon" +if test "x$ac_cv_func_daemon" = xyes +then : + printf "%s\n" "#define HAVE_DAEMON 1" >>confdefs.h + +else $as_nop + case " $LIBOBJS " in + *" daemon.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS daemon.$ac_objext" + ;; +esac + +fi + + +# for tests/ +if test x"$RUNTEST" != x; then + HAVE_RUNTEST=yes +else + HAVE_RUNTEST=no +fi + + +# For Python tests. Python version 3.2.4 is required as prior +# versions do not accept string input to subprocess.Popen.communicate +# when universal_newlines is set. +PYTHON_MINVERSION=3.2.4 + +# Extract the first word of "python3", so it can be a program name with args. +set dummy python3; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_PYTHON+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$PYTHON"; then + ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_PYTHON="python3" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +PYTHON=$ac_cv_prog_PYTHON +if test -n "$PYTHON"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5 +printf "%s\n" "$PYTHON" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + +if test x"$PYTHON" = x; then + # Extract the first word of "python", so it can be a program name with args. +set dummy python; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_PYTHON+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$PYTHON"; then + ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_PYTHON="python" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +PYTHON=$ac_cv_prog_PYTHON +if test -n "$PYTHON"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5 +printf "%s\n" "$PYTHON" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + +fi +HAVE_PYTHON=no +if test x"$PYTHON" != x; then + wantver="(sys.hexversion >= 0x30204F0)" + if "$PYTHON" -c "import sys; sys.exit(not $wantver and 1 or 0)"; then + HAVE_PYTHON=yes + fi +fi + + +# For cmocka tests. +CMOCKA_LIBS= +HAVE_CMOCKA=no +HAVE_CMOCKA_H=no +HAVE_CMOCKA_LIB=no +ac_fn_c_check_header_compile "$LINENO" "cmocka.h" "ac_cv_header_cmocka_h" " +#include +#include +#include +" +if test "x$ac_cv_header_cmocka_h" = xyes +then : + HAVE_CMOCKA_H=yes +else $as_nop + : +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _cmocka_run_group_tests in -lcmocka" >&5 +printf %s "checking for _cmocka_run_group_tests in -lcmocka... " >&6; } +if test ${ac_cv_lib_cmocka__cmocka_run_group_tests+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcmocka $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char _cmocka_run_group_tests (); +int +main (void) +{ +return _cmocka_run_group_tests (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_cmocka__cmocka_run_group_tests=yes +else $as_nop + ac_cv_lib_cmocka__cmocka_run_group_tests=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cmocka__cmocka_run_group_tests" >&5 +printf "%s\n" "$ac_cv_lib_cmocka__cmocka_run_group_tests" >&6; } +if test "x$ac_cv_lib_cmocka__cmocka_run_group_tests" = xyes +then : + HAVE_CMOCKA_LIB=yes +fi + +if test "$HAVE_CMOCKA_LIB" = yes && test "$HAVE_CMOCKA_H" = yes; then + HAVE_CMOCKA=yes + CMOCKA_LIBS='-lcmocka' + +printf "%s\n" "#define HAVE_CMOCKA 1" >>confdefs.h + +fi + + + +# For URI lookup tests. Requires resolv_wrapper >= 1.1.5 for URI +# support. +HAVE_RESOLV_WRAPPER=0 +if test -n "$PKG_CONFIG" && \ + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"resolv_wrapper >= 1.1.5\""; } >&5 + ($PKG_CONFIG --exists --print-errors "resolv_wrapper >= 1.1.5") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + HAVE_RESOLV_WRAPPER=1 +fi + + +# for plugins/kdb/db2 + +# AIX is unusual in that it wants all symbols resolved at link time +# Fortunately, it will allow us to link the kdb library now, even if +# it is linked again later. +case $krb5_cv_host in +*-*-aix*) + DB_EXTRA_LIBS=-ldb + ;; +*) + DB_EXTRA_LIBS= + ;; +esac + + + + +# Check for thread safety issues. +# (Is there a better place for this?) +# tsfuncs="getpwnam_r getpwuid_r gethostbyname_r getservbyname_r gmtime_r localtime_r" +# Removed getpwnam_r and getpwuid_r because include/configure.in has some +# more careful checks, and may decide to pretend that they're not found if +# the function signatures can't be figured out. +tsfuncs="gethostbyname_r getservbyname_r gmtime_r localtime_r" + + for ac_func in $tsfuncs +do : + as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes" +then : + cat >>confdefs.h <<_ACEOF +#define `printf "%s\n" "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi + +done +if test "$enable_thread_support" = yes; then + tsmissing="" + for ts in $tsfuncs; do + if eval "test \"\${ac_cv_func_$ts}\" != yes"; then + tsmissing="$tsmissing $ts" + fi + done + if test "$ac_cv_func_res_nsearch/$ac_cv_lib_resolv_res_nsearch" = "no/no"; then + tsmissing="$tsmissing res_nsearch" + fi + if test "$tsmissing" != ""; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Some functions that are needed for library thread" >&5 +printf "%s\n" "$as_me: WARNING: Some functions that are needed for library thread" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: safety appear to be missing." >&5 +printf "%s\n" "$as_me: WARNING: safety appear to be missing." >&2;} + for ts in $tsmissing; do + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: missing thread-safe function: $ts" >&5 +printf "%s\n" "$as_me: WARNING: missing thread-safe function: $ts" >&2;} + done + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Without these functions, the installed libraries" >&5 +printf "%s\n" "$as_me: WARNING: Without these functions, the installed libraries" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: may not be thread-safe." >&5 +printf "%s\n" "$as_me: WARNING: may not be thread-safe." >&2;} + fi # tsmissing not empty +fi # enable_thread_support + +# Sadly, we seem to have accidentally committed ourselves in 1.4 to +# an ABI that includes the existence of libkrb5support.0 even +# though random apps should never use anything from it. And on +# the Mac, to which that didn't apply, we can't use major version 0. + +case $krb5_cv_host in +*-*-darwin* | *-*-rhapsody*) SUPPORTLIB_MAJOR=1 ;; +*) SUPPORTLIB_MAJOR=0 ;; +esac + + + +if test "$COM_ERR_VERSION" = k5 ; then + ac_config_files="$ac_config_files util/et/Makefile:$srcdir/./config/pre.in:util/et/Makefile.in:util/et/deps:$srcdir/./config/post.in" + + + +fi +if test "$SS_VERSION" = k5 ; then + ac_config_files="$ac_config_files util/ss/Makefile:$srcdir/./config/pre.in:util/ss/Makefile.in:util/ss/deps:$srcdir/./config/post.in" + + + +fi + + +ldap_plugin_dir="" +ldap_lib="" +if test -n "$OPENLDAP_PLUGIN"; then + for ac_header in ldap.h lber.h +do : + as_ac_Header=`printf "%s\n" "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes" +then : + cat >>confdefs.h <<_ACEOF +#define `printf "%s\n" "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + : +else $as_nop + as_fn_error $? "$ac_header not found" "$LINENO" 5 +fi + +done + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ldap_str2dn in -lldap" >&5 +printf %s "checking for ldap_str2dn in -lldap... " >&6; } +if test ${ac_cv_lib_ldap_ldap_str2dn+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lldap $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char ldap_str2dn (); +int +main (void) +{ +return ldap_str2dn (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_ldap_ldap_str2dn=yes +else $as_nop + ac_cv_lib_ldap_ldap_str2dn=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_ldap_str2dn" >&5 +printf "%s\n" "$ac_cv_lib_ldap_ldap_str2dn" >&6; } +if test "x$ac_cv_lib_ldap_ldap_str2dn" = xyes +then : + : +else $as_nop + as_fn_error $? "libldap not found or missing ldap_str2dn" "$LINENO" 5 +fi + + + BER_OKAY=0 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ber_init in -lldap" >&5 +printf %s "checking for ber_init in -lldap... " >&6; } +if test ${ac_cv_lib_ldap_ber_init+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lldap $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char ber_init (); +int +main (void) +{ +return ber_init (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_ldap_ber_init=yes +else $as_nop + ac_cv_lib_ldap_ber_init=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_ber_init" >&5 +printf "%s\n" "$ac_cv_lib_ldap_ber_init" >&6; } +if test "x$ac_cv_lib_ldap_ber_init" = xyes +then : + BER_OKAY=1 +fi + + if test "$BER_OKAY" = "1"; then + LDAP_LIBS='-lldap' + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ber_init in -llber" >&5 +printf %s "checking for ber_init in -llber... " >&6; } +if test ${ac_cv_lib_lber_ber_init+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-llber $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char ber_init (); +int +main (void) +{ +return ber_init (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_lber_ber_init=yes +else $as_nop + ac_cv_lib_lber_ber_init=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lber_ber_init" >&5 +printf "%s\n" "$ac_cv_lib_lber_ber_init" >&6; } +if test "x$ac_cv_lib_lber_ber_init" = xyes +then : + BER_OKAY=1 +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: libber not found" >&5 +printf "%s\n" "$as_me: WARNING: libber not found" >&2;} +fi + + if test "$BER_OKAY" = "1"; then + LDAP_LIBS='-lldap -llber' + else + as_fn_error $? "\"BER library missing - cannot build LDAP database module\"" "$LINENO" 5 + fi + fi + +printf "%s\n" "#define ENABLE_LDAP 1" >>confdefs.h + + + + for ac_header in sasl/sasl.h +do : + ac_fn_c_check_header_compile "$LINENO" "sasl/sasl.h" "ac_cv_header_sasl_sasl_h" "$ac_includes_default" +if test "x$ac_cv_header_sasl_sasl_h" = xyes +then : + printf "%s\n" "#define HAVE_SASL_SASL_H 1" >>confdefs.h + HAVE_SASL=yes +else $as_nop + HAVE_SASL=no +fi + +done + + if test "$HAVE_SASL" = no; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: not building LDAP SASL support" >&5 +printf "%s\n" "$as_me: WARNING: not building LDAP SASL support" >&2;} + fi + + ac_config_files="$ac_config_files plugins/kdb/ldap/Makefile:$srcdir/./config/pre.in:plugins/kdb/ldap/Makefile.in:plugins/kdb/ldap/deps:$srcdir/./config/post.in" + + + + ac_config_files="$ac_config_files plugins/kdb/ldap/ldap_util/Makefile:$srcdir/./config/pre.in:plugins/kdb/ldap/ldap_util/Makefile.in:plugins/kdb/ldap/ldap_util/deps:$srcdir/./config/post.in" + + + + ac_config_files="$ac_config_files plugins/kdb/ldap/libkdb_ldap/Makefile:$srcdir/./config/pre.in:plugins/kdb/ldap/libkdb_ldap/Makefile.in:plugins/kdb/ldap/libkdb_ldap/deps:$srcdir/./config/post.in" + + + + ldap_plugin_dir='plugins/kdb/ldap plugins/kdb/ldap/ldap_util' + LDAP=yes +else + LDAP=no +fi + + +# This check is for plugins/preauth/securid_sam2 +sam2_plugin="" +old_CFLAGS=$CFLAGS +CFLAGS="$CFLAGS $PTHREAD_CFLAGS" +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SD_Init in -laceclnt" >&5 +printf %s "checking for SD_Init in -laceclnt... " >&6; } +if test ${ac_cv_lib_aceclnt_SD_Init+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-laceclnt $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char SD_Init (); +int +main (void) +{ +return SD_Init (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_aceclnt_SD_Init=yes +else $as_nop + ac_cv_lib_aceclnt_SD_Init=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_aceclnt_SD_Init" >&5 +printf "%s\n" "$ac_cv_lib_aceclnt_SD_Init" >&6; } +if test "x$ac_cv_lib_aceclnt_SD_Init" = xyes +then : + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Enabling RSA securID support" >&5 +printf "%s\n" "$as_me: Enabling RSA securID support" >&6;} + ac_config_files="$ac_config_files plugins/preauth/securid_sam2/Makefile:$srcdir/./config/pre.in:plugins/preauth/securid_sam2/Makefile.in:plugins/preauth/securid_sam2/deps:$srcdir/./config/post.in" + + + + sam2_plugin=plugins/preauth/securid_sam2 + +fi + + +CFLAGS=$old_CFLAGS + +lmdb_plugin_dir="" +HAVE_LMDB=no + +# Check whether --with-lmdb was given. +if test ${with_lmdb+y} +then : + withval=$with_lmdb; +else $as_nop + withval=auto +fi + +if test "$withval" = auto -o "$withval" = yes; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mdb_env_create in -llmdb" >&5 +printf %s "checking for mdb_env_create in -llmdb... " >&6; } +if test ${ac_cv_lib_lmdb_mdb_env_create+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-llmdb $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char mdb_env_create (); +int +main (void) +{ +return mdb_env_create (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_lmdb_mdb_env_create=yes +else $as_nop + ac_cv_lib_lmdb_mdb_env_create=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lmdb_mdb_env_create" >&5 +printf "%s\n" "$ac_cv_lib_lmdb_mdb_env_create" >&6; } +if test "x$ac_cv_lib_lmdb_mdb_env_create" = xyes +then : + have_lmdb=true +else $as_nop + have_lmdb=false +fi + + if test "$have_lmdb" = true; then + LMDB_LIBS=-llmdb + HAVE_LMDB=yes + lmdb_plugin_dir='plugins/kdb/lmdb' + ac_config_files="$ac_config_files plugins/kdb/lmdb/Makefile:$srcdir/./config/pre.in:plugins/kdb/lmdb/Makefile.in:plugins/kdb/lmdb/deps:$srcdir/./config/post.in" + + + + elif test "$withval" = yes; then + as_fn_error $? "liblmdb not found" "$LINENO" 5 + fi +fi + + + + +# Kludge for simple server --- FIXME is this the best way to do this? + +if test "$ac_cv_lib_socket" = "yes" -a "$ac_cv_lib_nsl" = "yes"; then + +printf "%s\n" "#define BROKEN_STREAMS_SOCKETS 1" >>confdefs.h + +fi + +# Compile with libedit support in ss by default if available. Compile +# with readline only if asked, to avoid a default GPL dependency. +# Building with readline also breaks the dejagnu test suite. + +# Check whether --with-libedit was given. +if test ${with_libedit+y} +then : + withval=$with_libedit; +else $as_nop + with_libedit=default +fi + + +# Check whether --with-readline was given. +if test ${with_readline+y} +then : + withval=$with_readline; +else $as_nop + with_readline=no +fi + +if test "x$with_readline" = xyes; then + with_libedit=no +fi +RL_CFLAGS= +RL_LIBS= +if test "x$with_libedit" != xno; then + +pkg_failed=no +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libedit" >&5 +printf %s "checking for libedit... " >&6; } + +if test -n "$LIBEDIT_CFLAGS"; then + pkg_cv_LIBEDIT_CFLAGS="$LIBEDIT_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libedit\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libedit") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_LIBEDIT_CFLAGS=`$PKG_CONFIG --cflags "libedit" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$LIBEDIT_LIBS"; then + pkg_cv_LIBEDIT_LIBS="$LIBEDIT_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libedit\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libedit") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_LIBEDIT_LIBS=`$PKG_CONFIG --libs "libedit" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + LIBEDIT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libedit" 2>&1` + else + LIBEDIT_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libedit" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$LIBEDIT_PKG_ERRORS" >&5 + + have_libedit=no +elif test $pkg_failed = untried; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + have_libedit=no +else + LIBEDIT_CFLAGS=$pkg_cv_LIBEDIT_CFLAGS + LIBEDIT_LIBS=$pkg_cv_LIBEDIT_LIBS + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + have_libedit=yes +fi + if test "x$have_libedit" = xyes; then + RL_CFLAGS=$LIBEDIT_CFLAGS + RL_LIBS=$LIBEDIT_LIBS + +printf "%s\n" "#define HAVE_LIBEDIT 1" >>confdefs.h + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Using libedit for readline support" >&5 +printf "%s\n" "$as_me: Using libedit for readline support" >&6;} + elif test "x$with_libedit" = xyes; then + # We were explicitly asked for libedit and couldn't find it. + as_fn_error $? "Could not detect libedit with pkg-config" "$LINENO" 5 + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Not using any readline support" >&5 +printf "%s\n" "$as_me: Not using any readline support" >&6;} + fi +elif test "x$with_readline" = xyes; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Using GNU Readline" >&5 +printf "%s\n" "$as_me: Using GNU Readline" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for main in -lreadline" >&5 +printf %s "checking for main in -lreadline... " >&6; } +if test ${ac_cv_lib_readline_main+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lreadline $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +int +main (void) +{ +return main (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_readline_main=yes +else $as_nop + ac_cv_lib_readline_main=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_main" >&5 +printf "%s\n" "$ac_cv_lib_readline_main" >&6; } +if test "x$ac_cv_lib_readline_main" = xyes +then : + : +else $as_nop + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "Cannot find readline library. +See \`config.log' for more details" "$LINENO" 5; } +fi + + +printf "%s\n" "#define HAVE_READLINE 1" >>confdefs.h + + RL_LIBS='-lreadline' +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Not using any readline support" >&5 +printf "%s\n" "Not using any readline support" >&6; } +fi + + + + +# Check whether --with-system-verto was given. +if test ${with_system_verto+y} +then : + withval=$with_system_verto; +else $as_nop + with_system_verto=default +fi + +VERTO_VERSION=k5 +if test "x$with_system_verto" != xno; then + +pkg_failed=no +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libverto" >&5 +printf %s "checking for libverto... " >&6; } + +if test -n "$VERTO_CFLAGS"; then + pkg_cv_VERTO_CFLAGS="$VERTO_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libverto\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libverto") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_VERTO_CFLAGS=`$PKG_CONFIG --cflags "libverto" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$VERTO_LIBS"; then + pkg_cv_VERTO_LIBS="$VERTO_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libverto\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libverto") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_VERTO_LIBS=`$PKG_CONFIG --libs "libverto" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + VERTO_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libverto" 2>&1` + else + VERTO_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libverto" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$VERTO_PKG_ERRORS" >&5 + + have_sysverto=no +elif test $pkg_failed = untried; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + have_sysverto=no +else + VERTO_CFLAGS=$pkg_cv_VERTO_CFLAGS + VERTO_LIBS=$pkg_cv_VERTO_LIBS + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + have_sysverto=yes +fi + if test "x$have_sysverto" = xyes; then + VERTO_VERSION=sys + elif test "x$with_system_verto" = xyes; then + as_fn_error $? "cannot detect system libverto" "$LINENO" 5 + fi +fi +if test "x$VERTO_VERSION" = xsys; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Using system libverto" >&5 +printf "%s\n" "$as_me: Using system libverto" >&6;} +else + VERTO_CFLAGS= + VERTO_LIBS="-lverto" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Using built-in libverto" >&5 +printf "%s\n" "$as_me: Using built-in libverto" >&6;} +fi + + + + +# Extract the first word of "groff", so it can be a program name with args. +set dummy groff; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_GROFF+y} +then : + printf %s "(cached) " >&6 +else $as_nop + case $GROFF in + [\\/]* | ?:[\\/]*) + ac_cv_path_GROFF="$GROFF" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_GROFF="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +GROFF=$ac_cv_path_GROFF +if test -n "$GROFF"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GROFF" >&5 +printf "%s\n" "$GROFF" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + + +# Make localedir work in autoconf 2.5x. +if test "${localedir+set}" != set; then + localedir='$(datadir)/locale' +fi + + +# For KCM lib/krb5/ccache to build KCM Mach RPC support for macOS only. +case $host in +*-*-darwin* | *-*-rhapsody*) OSX=osx ;; +*) OSX=no ;; +esac + + +# Build-time default ccache, keytab, and client keytab names. These +# can be given as variable arguments DEFCCNAME, DEFKTNAME, and +# DEFCKTNAME. Otherwise, we try to get the OS defaults from +# krb5-config if we can, or fall back to hardcoded defaults. + + + + +# Check whether --with-krb5-config was given. +if test ${with_krb5_config+y} +then : + withval=$with_krb5_config; +else $as_nop + with_krb5_config=krb5-config +fi + +if test "x$with_krb5_config" != xno; then + if test "x$with_krb5_config" = xyes; then + with_krb5_config=krb5-config + fi + if $with_krb5_config --help 2>&1 | grep defccname >/dev/null; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Using $with_krb5_config for build defaults" >&5 +printf "%s\n" "$as_me: Using $with_krb5_config for build defaults" >&6;} + : "${DEFCCNAME=`$with_krb5_config --defccname`}" + : "${DEFKTNAME=`$with_krb5_config --defktname`}" + : "${DEFCKTNAME=`$with_krb5_config --defcktname`}" + fi +fi +if test "${DEFCCNAME+set}" != set; then + case $host in + *-*-darwin[0-9].* | *-*-darwin10.*) + # Use the normal default for macOS 10.6 (Darwin 10) and prior. + ;; + *-*-darwin*) + # For macOS 10.7 (Darwin 11) and later, the native ccache uses + # the KCM daemon. + DEFCCNAME=KCM: + ;; + esac + if test "${DEFCCNAME+set}" != set; then + DEFCCNAME=FILE:/tmp/krb5cc_%{uid} + fi +fi +if test "${DEFKTNAME+set}" != set; then + DEFKTNAME=FILE:/etc/krb5.keytab +fi +if test "${DEFCKTNAME+set}" != set; then + _lcl_receval="$localstatedir" +exp_localstatedir=`(test "x$prefix" = xNONE && prefix="$ac_default_prefix" + test "x$exec_prefix" = xNONE && exec_prefix="${prefix}" + _lcl_receval_old='' + while test "$_lcl_receval_old" != "$_lcl_receval"; do + _lcl_receval_old="$_lcl_receval" + eval _lcl_receval="\"$_lcl_receval\"" + done + echo "$_lcl_receval")` + DEFCKTNAME=FILE:$exp_localstatedir/krb5/user/%{euid}/client.keytab +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: Default ccache name: $DEFCCNAME" >&5 +printf "%s\n" "$as_me: Default ccache name: $DEFCCNAME" >&6;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: Default keytab name: $DEFKTNAME" >&5 +printf "%s\n" "$as_me: Default keytab name: $DEFKTNAME" >&6;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: Default client keytab name: $DEFCKTNAME" >&5 +printf "%s\n" "$as_me: Default client keytab name: $DEFCKTNAME" >&6;} + +printf "%s\n" "#define DEFCCNAME \"$DEFCCNAME\"" >>confdefs.h + + +printf "%s\n" "#define DEFKTNAME \"$DEFKTNAME\"" >>confdefs.h + + +printf "%s\n" "#define DEFCKTNAME \"$DEFCKTNAME\"" >>confdefs.h + + +ac_config_files="$ac_config_files build-tools/krb5-config" + +ac_config_files="$ac_config_files build-tools/kadm-server.pc build-tools/kadm-client.pc build-tools/kdb.pc build-tools/krb5.pc build-tools/krb5-gssapi.pc build-tools/mit-krb5.pc build-tools/mit-krb5-gssapi.pc build-tools/gssrpc.pc" + + + ac_config_files="$ac_config_files ./Makefile:$srcdir/./config/pre.in:./Makefile.in:./deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files util/Makefile:$srcdir/./config/pre.in:util/Makefile.in:util/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files util/support/Makefile:$srcdir/./config/pre.in:util/support/Makefile.in:util/support/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files util/profile/Makefile:$srcdir/./config/pre.in:util/profile/Makefile.in:util/profile/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files util/profile/testmod/Makefile:$srcdir/./config/pre.in:util/profile/testmod/Makefile.in:util/profile/testmod/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files util/verto/Makefile:$srcdir/./config/pre.in:util/verto/Makefile.in:util/verto/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files lib/Makefile:$srcdir/./config/pre.in:lib/Makefile.in:lib/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files lib/kdb/Makefile:$srcdir/./config/pre.in:lib/kdb/Makefile.in:lib/kdb/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files lib/crypto/Makefile:$srcdir/./config/pre.in:lib/crypto/Makefile.in:lib/crypto/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files lib/crypto/krb/Makefile:$srcdir/./config/pre.in:lib/crypto/krb/Makefile.in:lib/crypto/krb/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files lib/crypto/$CRYPTO_IMPL/Makefile:$srcdir/./config/pre.in:lib/crypto/$CRYPTO_IMPL/Makefile.in:lib/crypto/$CRYPTO_IMPL/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files lib/crypto/$CRYPTO_IMPL/enc_provider/Makefile:$srcdir/./config/pre.in:lib/crypto/$CRYPTO_IMPL/enc_provider/Makefile.in:lib/crypto/$CRYPTO_IMPL/enc_provider/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files lib/crypto/$CRYPTO_IMPL/hash_provider/Makefile:$srcdir/./config/pre.in:lib/crypto/$CRYPTO_IMPL/hash_provider/Makefile.in:lib/crypto/$CRYPTO_IMPL/hash_provider/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files lib/crypto/$CRYPTO_IMPL/des/Makefile:$srcdir/./config/pre.in:lib/crypto/$CRYPTO_IMPL/des/Makefile.in:lib/crypto/$CRYPTO_IMPL/des/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files lib/crypto/$CRYPTO_IMPL/md4/Makefile:$srcdir/./config/pre.in:lib/crypto/$CRYPTO_IMPL/md4/Makefile.in:lib/crypto/$CRYPTO_IMPL/md4/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files lib/crypto/$CRYPTO_IMPL/md5/Makefile:$srcdir/./config/pre.in:lib/crypto/$CRYPTO_IMPL/md5/Makefile.in:lib/crypto/$CRYPTO_IMPL/md5/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files lib/crypto/$CRYPTO_IMPL/sha1/Makefile:$srcdir/./config/pre.in:lib/crypto/$CRYPTO_IMPL/sha1/Makefile.in:lib/crypto/$CRYPTO_IMPL/sha1/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files lib/crypto/$CRYPTO_IMPL/sha2/Makefile:$srcdir/./config/pre.in:lib/crypto/$CRYPTO_IMPL/sha2/Makefile.in:lib/crypto/$CRYPTO_IMPL/sha2/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files lib/crypto/$CRYPTO_IMPL/aes/Makefile:$srcdir/./config/pre.in:lib/crypto/$CRYPTO_IMPL/aes/Makefile.in:lib/crypto/$CRYPTO_IMPL/aes/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files lib/crypto/$CRYPTO_IMPL/camellia/Makefile:$srcdir/./config/pre.in:lib/crypto/$CRYPTO_IMPL/camellia/Makefile.in:lib/crypto/$CRYPTO_IMPL/camellia/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files lib/crypto/crypto_tests/Makefile:$srcdir/./config/pre.in:lib/crypto/crypto_tests/Makefile.in:lib/crypto/crypto_tests/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files lib/krb5/Makefile:$srcdir/./config/pre.in:lib/krb5/Makefile.in:lib/krb5/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files lib/krb5/error_tables/Makefile:$srcdir/./config/pre.in:lib/krb5/error_tables/Makefile.in:lib/krb5/error_tables/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files lib/krb5/asn.1/Makefile:$srcdir/./config/pre.in:lib/krb5/asn.1/Makefile.in:lib/krb5/asn.1/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files lib/krb5/ccache/Makefile:$srcdir/./config/pre.in:lib/krb5/ccache/Makefile.in:lib/krb5/ccache/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files lib/krb5/keytab/Makefile:$srcdir/./config/pre.in:lib/krb5/keytab/Makefile.in:lib/krb5/keytab/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files lib/krb5/krb/Makefile:$srcdir/./config/pre.in:lib/krb5/krb/Makefile.in:lib/krb5/krb/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files lib/krb5/rcache/Makefile:$srcdir/./config/pre.in:lib/krb5/rcache/Makefile.in:lib/krb5/rcache/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files lib/krb5/os/Makefile:$srcdir/./config/pre.in:lib/krb5/os/Makefile.in:lib/krb5/os/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files lib/krb5/unicode/Makefile:$srcdir/./config/pre.in:lib/krb5/unicode/Makefile.in:lib/krb5/unicode/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files lib/gssapi/Makefile:$srcdir/./config/pre.in:lib/gssapi/Makefile.in:lib/gssapi/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files lib/gssapi/generic/Makefile:$srcdir/./config/pre.in:lib/gssapi/generic/Makefile.in:lib/gssapi/generic/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files lib/gssapi/krb5/Makefile:$srcdir/./config/pre.in:lib/gssapi/krb5/Makefile.in:lib/gssapi/krb5/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files lib/gssapi/spnego/Makefile:$srcdir/./config/pre.in:lib/gssapi/spnego/Makefile.in:lib/gssapi/spnego/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files lib/gssapi/mechglue/Makefile:$srcdir/./config/pre.in:lib/gssapi/mechglue/Makefile.in:lib/gssapi/mechglue/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files lib/rpc/Makefile:$srcdir/./config/pre.in:lib/rpc/Makefile.in:lib/rpc/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files lib/rpc/unit-test/Makefile:$srcdir/./config/pre.in:lib/rpc/unit-test/Makefile.in:lib/rpc/unit-test/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files lib/kadm5/Makefile:$srcdir/./config/pre.in:lib/kadm5/Makefile.in:lib/kadm5/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files lib/kadm5/clnt/Makefile:$srcdir/./config/pre.in:lib/kadm5/clnt/Makefile.in:lib/kadm5/clnt/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files lib/kadm5/srv/Makefile:$srcdir/./config/pre.in:lib/kadm5/srv/Makefile.in:lib/kadm5/srv/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files lib/kadm5/unit-test/Makefile:$srcdir/./config/pre.in:lib/kadm5/unit-test/Makefile.in:lib/kadm5/unit-test/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files lib/krad/Makefile:$srcdir/./config/pre.in:lib/krad/Makefile.in:lib/krad/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files lib/apputils/Makefile:$srcdir/./config/pre.in:lib/apputils/Makefile.in:lib/apputils/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files kdc/Makefile:$srcdir/./config/pre.in:kdc/Makefile.in:kdc/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files kprop/Makefile:$srcdir/./config/pre.in:kprop/Makefile.in:kprop/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files config-files/Makefile:$srcdir/./config/pre.in:config-files/Makefile.in:config-files/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files build-tools/Makefile:$srcdir/./config/pre.in:build-tools/Makefile.in:build-tools/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files man/Makefile:$srcdir/./config/pre.in:man/Makefile.in:man/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files doc/Makefile:$srcdir/./config/pre.in:doc/Makefile.in:doc/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files include/Makefile:$srcdir/./config/pre.in:include/Makefile.in:include/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files plugins/certauth/test/Makefile:$srcdir/./config/pre.in:plugins/certauth/test/Makefile.in:plugins/certauth/test/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files plugins/gssapi/negoextest/Makefile:$srcdir/./config/pre.in:plugins/gssapi/negoextest/Makefile.in:plugins/gssapi/negoextest/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files plugins/hostrealm/test/Makefile:$srcdir/./config/pre.in:plugins/hostrealm/test/Makefile.in:plugins/hostrealm/test/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files plugins/localauth/test/Makefile:$srcdir/./config/pre.in:plugins/localauth/test/Makefile.in:plugins/localauth/test/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files plugins/kadm5_hook/test/Makefile:$srcdir/./config/pre.in:plugins/kadm5_hook/test/Makefile.in:plugins/kadm5_hook/test/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files plugins/kadm5_auth/test/Makefile:$srcdir/./config/pre.in:plugins/kadm5_auth/test/Makefile.in:plugins/kadm5_auth/test/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files plugins/pwqual/test/Makefile:$srcdir/./config/pre.in:plugins/pwqual/test/Makefile.in:plugins/pwqual/test/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files plugins/audit/Makefile:$srcdir/./config/pre.in:plugins/audit/Makefile.in:plugins/audit/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files plugins/audit/test/Makefile:$srcdir/./config/pre.in:plugins/audit/test/Makefile.in:plugins/audit/test/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files plugins/kdb/db2/Makefile:$srcdir/./config/pre.in:plugins/kdb/db2/Makefile.in:plugins/kdb/db2/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files plugins/kdb/db2/libdb2/Makefile:$srcdir/./config/pre.in:plugins/kdb/db2/libdb2/Makefile.in:plugins/kdb/db2/libdb2/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files plugins/kdb/db2/libdb2/hash/Makefile:$srcdir/./config/pre.in:plugins/kdb/db2/libdb2/hash/Makefile.in:plugins/kdb/db2/libdb2/hash/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files plugins/kdb/db2/libdb2/btree/Makefile:$srcdir/./config/pre.in:plugins/kdb/db2/libdb2/btree/Makefile.in:plugins/kdb/db2/libdb2/btree/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files plugins/kdb/db2/libdb2/db/Makefile:$srcdir/./config/pre.in:plugins/kdb/db2/libdb2/db/Makefile.in:plugins/kdb/db2/libdb2/db/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files plugins/kdb/db2/libdb2/mpool/Makefile:$srcdir/./config/pre.in:plugins/kdb/db2/libdb2/mpool/Makefile.in:plugins/kdb/db2/libdb2/mpool/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files plugins/kdb/db2/libdb2/recno/Makefile:$srcdir/./config/pre.in:plugins/kdb/db2/libdb2/recno/Makefile.in:plugins/kdb/db2/libdb2/recno/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files plugins/kdb/db2/libdb2/test/Makefile:$srcdir/./config/pre.in:plugins/kdb/db2/libdb2/test/Makefile.in:plugins/kdb/db2/libdb2/test/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files plugins/kdb/test/Makefile:$srcdir/./config/pre.in:plugins/kdb/test/Makefile.in:plugins/kdb/test/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files plugins/kdcpolicy/test/Makefile:$srcdir/./config/pre.in:plugins/kdcpolicy/test/Makefile.in:plugins/kdcpolicy/test/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files plugins/preauth/otp/Makefile:$srcdir/./config/pre.in:plugins/preauth/otp/Makefile.in:plugins/preauth/otp/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files plugins/preauth/spake/Makefile:$srcdir/./config/pre.in:plugins/preauth/spake/Makefile.in:plugins/preauth/spake/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files plugins/preauth/test/Makefile:$srcdir/./config/pre.in:plugins/preauth/test/Makefile.in:plugins/preauth/test/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files plugins/authdata/greet_client/Makefile:$srcdir/./config/pre.in:plugins/authdata/greet_client/Makefile.in:plugins/authdata/greet_client/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files plugins/authdata/greet_server/Makefile:$srcdir/./config/pre.in:plugins/authdata/greet_server/Makefile.in:plugins/authdata/greet_server/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files plugins/tls/k5tls/Makefile:$srcdir/./config/pre.in:plugins/tls/k5tls/Makefile.in:plugins/tls/k5tls/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files clients/Makefile:$srcdir/./config/pre.in:clients/Makefile.in:clients/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files clients/klist/Makefile:$srcdir/./config/pre.in:clients/klist/Makefile.in:clients/klist/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files clients/kinit/Makefile:$srcdir/./config/pre.in:clients/kinit/Makefile.in:clients/kinit/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files clients/kvno/Makefile:$srcdir/./config/pre.in:clients/kvno/Makefile.in:clients/kvno/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files clients/kdestroy/Makefile:$srcdir/./config/pre.in:clients/kdestroy/Makefile.in:clients/kdestroy/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files clients/kpasswd/Makefile:$srcdir/./config/pre.in:clients/kpasswd/Makefile.in:clients/kpasswd/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files clients/ksu/Makefile:$srcdir/./config/pre.in:clients/ksu/Makefile.in:clients/ksu/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files clients/kswitch/Makefile:$srcdir/./config/pre.in:clients/kswitch/Makefile.in:clients/kswitch/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files kadmin/Makefile:$srcdir/./config/pre.in:kadmin/Makefile.in:kadmin/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files kadmin/cli/Makefile:$srcdir/./config/pre.in:kadmin/cli/Makefile.in:kadmin/cli/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files kadmin/dbutil/Makefile:$srcdir/./config/pre.in:kadmin/dbutil/Makefile.in:kadmin/dbutil/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files kadmin/ktutil/Makefile:$srcdir/./config/pre.in:kadmin/ktutil/Makefile.in:kadmin/ktutil/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files kadmin/server/Makefile:$srcdir/./config/pre.in:kadmin/server/Makefile.in:kadmin/server/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files kadmin/testing/Makefile:$srcdir/./config/pre.in:kadmin/testing/Makefile.in:kadmin/testing/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files kadmin/testing/scripts/Makefile:$srcdir/./config/pre.in:kadmin/testing/scripts/Makefile.in:kadmin/testing/scripts/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files kadmin/testing/util/Makefile:$srcdir/./config/pre.in:kadmin/testing/util/Makefile.in:kadmin/testing/util/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files appl/Makefile:$srcdir/./config/pre.in:appl/Makefile.in:appl/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files appl/sample/Makefile:$srcdir/./config/pre.in:appl/sample/Makefile.in:appl/sample/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files appl/sample/sclient/Makefile:$srcdir/./config/pre.in:appl/sample/sclient/Makefile.in:appl/sample/sclient/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files appl/sample/sserver/Makefile:$srcdir/./config/pre.in:appl/sample/sserver/Makefile.in:appl/sample/sserver/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files appl/simple/Makefile:$srcdir/./config/pre.in:appl/simple/Makefile.in:appl/simple/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files appl/simple/client/Makefile:$srcdir/./config/pre.in:appl/simple/client/Makefile.in:appl/simple/client/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files appl/simple/server/Makefile:$srcdir/./config/pre.in:appl/simple/server/Makefile.in:appl/simple/server/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files appl/gss-sample/Makefile:$srcdir/./config/pre.in:appl/gss-sample/Makefile.in:appl/gss-sample/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files appl/user_user/Makefile:$srcdir/./config/pre.in:appl/user_user/Makefile.in:appl/user_user/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files tests/Makefile:$srcdir/./config/pre.in:tests/Makefile.in:tests/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files tests/resolve/Makefile:$srcdir/./config/pre.in:tests/resolve/Makefile.in:tests/resolve/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files tests/asn.1/Makefile:$srcdir/./config/pre.in:tests/asn.1/Makefile.in:tests/asn.1/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files tests/create/Makefile:$srcdir/./config/pre.in:tests/create/Makefile.in:tests/create/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files tests/hammer/Makefile:$srcdir/./config/pre.in:tests/hammer/Makefile.in:tests/hammer/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files tests/verify/Makefile:$srcdir/./config/pre.in:tests/verify/Makefile.in:tests/verify/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files tests/gssapi/Makefile:$srcdir/./config/pre.in:tests/gssapi/Makefile.in:tests/gssapi/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files tests/dejagnu/Makefile:$srcdir/./config/pre.in:tests/dejagnu/Makefile.in:tests/dejagnu/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files tests/threads/Makefile:$srcdir/./config/pre.in:tests/threads/Makefile.in:tests/threads/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files tests/shlib/Makefile:$srcdir/./config/pre.in:tests/shlib/Makefile.in:tests/shlib/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files tests/gss-threads/Makefile:$srcdir/./config/pre.in:tests/gss-threads/Makefile.in:tests/gss-threads/deps:$srcdir/./config/post.in" + ac_config_files="$ac_config_files tests/misc/Makefile:$srcdir/./config/pre.in:tests/misc/Makefile.in:tests/misc/deps:$srcdir/./config/post.in" + +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, we kill variables containing newlines. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + if test "x$cache_file" != "x/dev/null"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +printf "%s\n" "$as_me: updating cache $cache_file" >&6;} + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;} + fi +fi +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +DEFS=-DHAVE_CONFIG_H + +ac_libobjs= +ac_ltlibobjs= +U= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" + as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + + +: "${CONFIG_STATUS=./config.status}" +ac_write_fail=0 +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;} +as_write_fail=0 +cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false + +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +as_nop=: +if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 +then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else $as_nop + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + + +# Reset variables that may have inherited troublesome values from +# the environment. + +# IFS needs to be set, to space, tab, and newline, in precisely that order. +# (If _AS_PATH_WALK were called with IFS unset, it would have the +# side effect of setting IFS to empty, thus disabling word splitting.) +# Quoting is to prevent editors from complaining about space-tab. +as_nl=' +' +export as_nl +IFS=" "" $as_nl" + +PS1='$ ' +PS2='> ' +PS4='+ ' + +# Ensure predictable behavior from utilities with locale-dependent output. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# We cannot yet rely on "unset" to work, but we need these variables +# to be unset--not just set to an empty or harmless value--now, to +# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct +# also avoids known problems related to "unset" and subshell syntax +# in other old shells (e.g. bash 2.01 and pdksh 5.2.14). +for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH +do eval test \${$as_var+y} \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done + +# Ensure that fds 0, 1, and 2 are open. +if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi +if (exec 3>&2) ; then :; else exec 2>/dev/null; fi + +# The user is always right. +if ${PATH_SEPARATOR+false} :; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + test -r "$as_dir$0" && as_myself=$as_dir$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + printf "%s\n" "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + + + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset + +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null +then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else $as_nop + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null +then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else $as_nop + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +printf "%s\n" X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + + +# Determine whether it's possible to make 'echo' print without a newline. +# These variables are no longer used directly by Autoconf, but are AC_SUBSTed +# for compatibility with existing Makefiles. +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +# For backward compatibility with old third-party macros, we provide +# the shell variables $as_echo and $as_echo_n. New code should use +# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. +as_echo='printf %s\n' +as_echo_n='printf %s' + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -pR'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -pR' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -pR' + fi +else + as_ln_s='cp -pR' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +printf "%s\n" X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +exec 6>&1 +## ----------------------------------- ## +## Main body of $CONFIG_STATUS script. ## +## ----------------------------------- ## +_ASEOF +test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# Save the log message, to keep $0 and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. +ac_log=" +This file was extended by Kerberos 5 $as_me 1.18.3, which was +generated by GNU Autoconf 2.71. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + +_ACEOF + +case $ac_config_files in *" +"*) set x $ac_config_files; shift; ac_config_files=$*;; +esac + +case $ac_config_headers in *" +"*) set x $ac_config_headers; shift; ac_config_headers=$*;; +esac + + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# Files that config.status was made for. +config_files="$ac_config_files" +config_headers="$ac_config_headers" +config_commands="$ac_config_commands" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +ac_cs_usage="\ +\`$as_me' instantiates files and other configuration actions +from templates according to the current configuration. Unless the files +and actions are specified as TAGs, all are instantiated by default. + +Usage: $0 [OPTION]... [TAG]... + + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit + --config print configuration, then exit + -q, --quiet, --silent + do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE + +Configuration files: +$config_files + +Configuration headers: +$config_headers + +Configuration commands: +$config_commands + +Report bugs to ." + +_ACEOF +ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"` +ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"` +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_config='$ac_cs_config_escaped' +ac_cs_version="\\ +Kerberos 5 config.status 1.18.3 +configured by $0, generated by GNU Autoconf 2.71, + with options \\"\$ac_cs_config\\" + +Copyright (C) 2021 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +INSTALL='$INSTALL' +AWK='$AWK' +test -n "\$AWK" || AWK=awk +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# The default lists apply if the user does not specify any file. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=?*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; + *) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + esac + + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + printf "%s\n" "$ac_cs_version"; exit ;; + --config | --confi | --conf | --con | --co | --c ) + printf "%s\n" "$ac_cs_config"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; + esac + as_fn_append CONFIG_FILES " '$ac_optarg'" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + as_fn_append CONFIG_HEADERS " '$ac_optarg'" + ac_need_defaults=false;; + --he | --h) + # Conflict between --help and --header + as_fn_error $? "ambiguous option: \`$1' +Try \`$0 --help' for more information.";; + --help | --hel | -h ) + printf "%s\n" "$ac_cs_usage"; exit ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) as_fn_error $? "unrecognized option: \`$1' +Try \`$0 --help' for more information." ;; + + *) as_fn_append ac_config_targets " $1" + ac_need_defaults=false ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +if \$ac_cs_recheck; then + set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + shift + \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6 + CONFIG_SHELL='$SHELL' + export CONFIG_SHELL + exec "\$@" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + printf "%s\n" "$ac_log" +} >&5 + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# +# INIT-COMMANDS +# +CRYPTO_IMPL=$CRYPTO_IMPL +PRNG_ALG=$PRNG_ALG + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + +# Handling of arguments. +for ac_config_target in $ac_config_targets +do + case $ac_config_target in + "po/Makefile") CONFIG_FILES="$CONFIG_FILES po/Makefile:$srcdir/./config/pre.in:po/Makefile.in:po/deps:$srcdir/./config/post.in" ;; + "plugins/audit/simple/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/audit/simple/Makefile:$srcdir/./config/pre.in:plugins/audit/simple/Makefile.in:plugins/audit/simple/deps:$srcdir/./config/post.in" ;; + "CRYPTO_IMPL") CONFIG_COMMANDS="$CONFIG_COMMANDS CRYPTO_IMPL" ;; + "PRNG_ALG") CONFIG_COMMANDS="$CONFIG_COMMANDS PRNG_ALG" ;; + "include/autoconf.h") CONFIG_HEADERS="$CONFIG_HEADERS include/autoconf.h" ;; + "kadmin/testing/scripts/env-setup.sh") CONFIG_FILES="$CONFIG_FILES kadmin/testing/scripts/env-setup.sh:kadmin/testing/scripts/env-setup.shin" ;; + "include/gssrpc/types.h") CONFIG_FILES="$CONFIG_FILES include/gssrpc/types.h:include/gssrpc/types.hin" ;; + "plugins/preauth/pkinit/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/preauth/pkinit/Makefile:$srcdir/./config/pre.in:plugins/preauth/pkinit/Makefile.in:plugins/preauth/pkinit/deps:$srcdir/./config/post.in" ;; + "tests/softpkcs11/Makefile") CONFIG_FILES="$CONFIG_FILES tests/softpkcs11/Makefile:$srcdir/./config/pre.in:tests/softpkcs11/Makefile.in:tests/softpkcs11/deps:$srcdir/./config/post.in" ;; + "util/et/Makefile") CONFIG_FILES="$CONFIG_FILES util/et/Makefile:$srcdir/./config/pre.in:util/et/Makefile.in:util/et/deps:$srcdir/./config/post.in" ;; + "util/ss/Makefile") CONFIG_FILES="$CONFIG_FILES util/ss/Makefile:$srcdir/./config/pre.in:util/ss/Makefile.in:util/ss/deps:$srcdir/./config/post.in" ;; + "plugins/kdb/ldap/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/kdb/ldap/Makefile:$srcdir/./config/pre.in:plugins/kdb/ldap/Makefile.in:plugins/kdb/ldap/deps:$srcdir/./config/post.in" ;; + "plugins/kdb/ldap/ldap_util/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/kdb/ldap/ldap_util/Makefile:$srcdir/./config/pre.in:plugins/kdb/ldap/ldap_util/Makefile.in:plugins/kdb/ldap/ldap_util/deps:$srcdir/./config/post.in" ;; + "plugins/kdb/ldap/libkdb_ldap/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/kdb/ldap/libkdb_ldap/Makefile:$srcdir/./config/pre.in:plugins/kdb/ldap/libkdb_ldap/Makefile.in:plugins/kdb/ldap/libkdb_ldap/deps:$srcdir/./config/post.in" ;; + "plugins/preauth/securid_sam2/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/preauth/securid_sam2/Makefile:$srcdir/./config/pre.in:plugins/preauth/securid_sam2/Makefile.in:plugins/preauth/securid_sam2/deps:$srcdir/./config/post.in" ;; + "plugins/kdb/lmdb/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/kdb/lmdb/Makefile:$srcdir/./config/pre.in:plugins/kdb/lmdb/Makefile.in:plugins/kdb/lmdb/deps:$srcdir/./config/post.in" ;; + "build-tools/krb5-config") CONFIG_FILES="$CONFIG_FILES build-tools/krb5-config" ;; + "build-tools/kadm-server.pc") CONFIG_FILES="$CONFIG_FILES build-tools/kadm-server.pc" ;; + "build-tools/kadm-client.pc") CONFIG_FILES="$CONFIG_FILES build-tools/kadm-client.pc" ;; + "build-tools/kdb.pc") CONFIG_FILES="$CONFIG_FILES build-tools/kdb.pc" ;; + "build-tools/krb5.pc") CONFIG_FILES="$CONFIG_FILES build-tools/krb5.pc" ;; + "build-tools/krb5-gssapi.pc") CONFIG_FILES="$CONFIG_FILES build-tools/krb5-gssapi.pc" ;; + "build-tools/mit-krb5.pc") CONFIG_FILES="$CONFIG_FILES build-tools/mit-krb5.pc" ;; + "build-tools/mit-krb5-gssapi.pc") CONFIG_FILES="$CONFIG_FILES build-tools/mit-krb5-gssapi.pc" ;; + "build-tools/gssrpc.pc") CONFIG_FILES="$CONFIG_FILES build-tools/gssrpc.pc" ;; + "./Makefile") CONFIG_FILES="$CONFIG_FILES ./Makefile:$srcdir/./config/pre.in:./Makefile.in:./deps:$srcdir/./config/post.in" ;; + "util/Makefile") CONFIG_FILES="$CONFIG_FILES util/Makefile:$srcdir/./config/pre.in:util/Makefile.in:util/deps:$srcdir/./config/post.in" ;; + "util/support/Makefile") CONFIG_FILES="$CONFIG_FILES util/support/Makefile:$srcdir/./config/pre.in:util/support/Makefile.in:util/support/deps:$srcdir/./config/post.in" ;; + "util/profile/Makefile") CONFIG_FILES="$CONFIG_FILES util/profile/Makefile:$srcdir/./config/pre.in:util/profile/Makefile.in:util/profile/deps:$srcdir/./config/post.in" ;; + "util/profile/testmod/Makefile") CONFIG_FILES="$CONFIG_FILES util/profile/testmod/Makefile:$srcdir/./config/pre.in:util/profile/testmod/Makefile.in:util/profile/testmod/deps:$srcdir/./config/post.in" ;; + "util/verto/Makefile") CONFIG_FILES="$CONFIG_FILES util/verto/Makefile:$srcdir/./config/pre.in:util/verto/Makefile.in:util/verto/deps:$srcdir/./config/post.in" ;; + "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile:$srcdir/./config/pre.in:lib/Makefile.in:lib/deps:$srcdir/./config/post.in" ;; + "lib/kdb/Makefile") CONFIG_FILES="$CONFIG_FILES lib/kdb/Makefile:$srcdir/./config/pre.in:lib/kdb/Makefile.in:lib/kdb/deps:$srcdir/./config/post.in" ;; + "lib/crypto/Makefile") CONFIG_FILES="$CONFIG_FILES lib/crypto/Makefile:$srcdir/./config/pre.in:lib/crypto/Makefile.in:lib/crypto/deps:$srcdir/./config/post.in" ;; + "lib/crypto/krb/Makefile") CONFIG_FILES="$CONFIG_FILES lib/crypto/krb/Makefile:$srcdir/./config/pre.in:lib/crypto/krb/Makefile.in:lib/crypto/krb/deps:$srcdir/./config/post.in" ;; + "lib/crypto/$CRYPTO_IMPL/Makefile") CONFIG_FILES="$CONFIG_FILES lib/crypto/$CRYPTO_IMPL/Makefile:$srcdir/./config/pre.in:lib/crypto/$CRYPTO_IMPL/Makefile.in:lib/crypto/$CRYPTO_IMPL/deps:$srcdir/./config/post.in" ;; + "lib/crypto/$CRYPTO_IMPL/enc_provider/Makefile") CONFIG_FILES="$CONFIG_FILES lib/crypto/$CRYPTO_IMPL/enc_provider/Makefile:$srcdir/./config/pre.in:lib/crypto/$CRYPTO_IMPL/enc_provider/Makefile.in:lib/crypto/$CRYPTO_IMPL/enc_provider/deps:$srcdir/./config/post.in" ;; + "lib/crypto/$CRYPTO_IMPL/hash_provider/Makefile") CONFIG_FILES="$CONFIG_FILES lib/crypto/$CRYPTO_IMPL/hash_provider/Makefile:$srcdir/./config/pre.in:lib/crypto/$CRYPTO_IMPL/hash_provider/Makefile.in:lib/crypto/$CRYPTO_IMPL/hash_provider/deps:$srcdir/./config/post.in" ;; + "lib/crypto/$CRYPTO_IMPL/des/Makefile") CONFIG_FILES="$CONFIG_FILES lib/crypto/$CRYPTO_IMPL/des/Makefile:$srcdir/./config/pre.in:lib/crypto/$CRYPTO_IMPL/des/Makefile.in:lib/crypto/$CRYPTO_IMPL/des/deps:$srcdir/./config/post.in" ;; + "lib/crypto/$CRYPTO_IMPL/md4/Makefile") CONFIG_FILES="$CONFIG_FILES lib/crypto/$CRYPTO_IMPL/md4/Makefile:$srcdir/./config/pre.in:lib/crypto/$CRYPTO_IMPL/md4/Makefile.in:lib/crypto/$CRYPTO_IMPL/md4/deps:$srcdir/./config/post.in" ;; + "lib/crypto/$CRYPTO_IMPL/md5/Makefile") CONFIG_FILES="$CONFIG_FILES lib/crypto/$CRYPTO_IMPL/md5/Makefile:$srcdir/./config/pre.in:lib/crypto/$CRYPTO_IMPL/md5/Makefile.in:lib/crypto/$CRYPTO_IMPL/md5/deps:$srcdir/./config/post.in" ;; + "lib/crypto/$CRYPTO_IMPL/sha1/Makefile") CONFIG_FILES="$CONFIG_FILES lib/crypto/$CRYPTO_IMPL/sha1/Makefile:$srcdir/./config/pre.in:lib/crypto/$CRYPTO_IMPL/sha1/Makefile.in:lib/crypto/$CRYPTO_IMPL/sha1/deps:$srcdir/./config/post.in" ;; + "lib/crypto/$CRYPTO_IMPL/sha2/Makefile") CONFIG_FILES="$CONFIG_FILES lib/crypto/$CRYPTO_IMPL/sha2/Makefile:$srcdir/./config/pre.in:lib/crypto/$CRYPTO_IMPL/sha2/Makefile.in:lib/crypto/$CRYPTO_IMPL/sha2/deps:$srcdir/./config/post.in" ;; + "lib/crypto/$CRYPTO_IMPL/aes/Makefile") CONFIG_FILES="$CONFIG_FILES lib/crypto/$CRYPTO_IMPL/aes/Makefile:$srcdir/./config/pre.in:lib/crypto/$CRYPTO_IMPL/aes/Makefile.in:lib/crypto/$CRYPTO_IMPL/aes/deps:$srcdir/./config/post.in" ;; + "lib/crypto/$CRYPTO_IMPL/camellia/Makefile") CONFIG_FILES="$CONFIG_FILES lib/crypto/$CRYPTO_IMPL/camellia/Makefile:$srcdir/./config/pre.in:lib/crypto/$CRYPTO_IMPL/camellia/Makefile.in:lib/crypto/$CRYPTO_IMPL/camellia/deps:$srcdir/./config/post.in" ;; + "lib/crypto/crypto_tests/Makefile") CONFIG_FILES="$CONFIG_FILES lib/crypto/crypto_tests/Makefile:$srcdir/./config/pre.in:lib/crypto/crypto_tests/Makefile.in:lib/crypto/crypto_tests/deps:$srcdir/./config/post.in" ;; + "lib/krb5/Makefile") CONFIG_FILES="$CONFIG_FILES lib/krb5/Makefile:$srcdir/./config/pre.in:lib/krb5/Makefile.in:lib/krb5/deps:$srcdir/./config/post.in" ;; + "lib/krb5/error_tables/Makefile") CONFIG_FILES="$CONFIG_FILES lib/krb5/error_tables/Makefile:$srcdir/./config/pre.in:lib/krb5/error_tables/Makefile.in:lib/krb5/error_tables/deps:$srcdir/./config/post.in" ;; + "lib/krb5/asn.1/Makefile") CONFIG_FILES="$CONFIG_FILES lib/krb5/asn.1/Makefile:$srcdir/./config/pre.in:lib/krb5/asn.1/Makefile.in:lib/krb5/asn.1/deps:$srcdir/./config/post.in" ;; + "lib/krb5/ccache/Makefile") CONFIG_FILES="$CONFIG_FILES lib/krb5/ccache/Makefile:$srcdir/./config/pre.in:lib/krb5/ccache/Makefile.in:lib/krb5/ccache/deps:$srcdir/./config/post.in" ;; + "lib/krb5/keytab/Makefile") CONFIG_FILES="$CONFIG_FILES lib/krb5/keytab/Makefile:$srcdir/./config/pre.in:lib/krb5/keytab/Makefile.in:lib/krb5/keytab/deps:$srcdir/./config/post.in" ;; + "lib/krb5/krb/Makefile") CONFIG_FILES="$CONFIG_FILES lib/krb5/krb/Makefile:$srcdir/./config/pre.in:lib/krb5/krb/Makefile.in:lib/krb5/krb/deps:$srcdir/./config/post.in" ;; + "lib/krb5/rcache/Makefile") CONFIG_FILES="$CONFIG_FILES lib/krb5/rcache/Makefile:$srcdir/./config/pre.in:lib/krb5/rcache/Makefile.in:lib/krb5/rcache/deps:$srcdir/./config/post.in" ;; + "lib/krb5/os/Makefile") CONFIG_FILES="$CONFIG_FILES lib/krb5/os/Makefile:$srcdir/./config/pre.in:lib/krb5/os/Makefile.in:lib/krb5/os/deps:$srcdir/./config/post.in" ;; + "lib/krb5/unicode/Makefile") CONFIG_FILES="$CONFIG_FILES lib/krb5/unicode/Makefile:$srcdir/./config/pre.in:lib/krb5/unicode/Makefile.in:lib/krb5/unicode/deps:$srcdir/./config/post.in" ;; + "lib/gssapi/Makefile") CONFIG_FILES="$CONFIG_FILES lib/gssapi/Makefile:$srcdir/./config/pre.in:lib/gssapi/Makefile.in:lib/gssapi/deps:$srcdir/./config/post.in" ;; + "lib/gssapi/generic/Makefile") CONFIG_FILES="$CONFIG_FILES lib/gssapi/generic/Makefile:$srcdir/./config/pre.in:lib/gssapi/generic/Makefile.in:lib/gssapi/generic/deps:$srcdir/./config/post.in" ;; + "lib/gssapi/krb5/Makefile") CONFIG_FILES="$CONFIG_FILES lib/gssapi/krb5/Makefile:$srcdir/./config/pre.in:lib/gssapi/krb5/Makefile.in:lib/gssapi/krb5/deps:$srcdir/./config/post.in" ;; + "lib/gssapi/spnego/Makefile") CONFIG_FILES="$CONFIG_FILES lib/gssapi/spnego/Makefile:$srcdir/./config/pre.in:lib/gssapi/spnego/Makefile.in:lib/gssapi/spnego/deps:$srcdir/./config/post.in" ;; + "lib/gssapi/mechglue/Makefile") CONFIG_FILES="$CONFIG_FILES lib/gssapi/mechglue/Makefile:$srcdir/./config/pre.in:lib/gssapi/mechglue/Makefile.in:lib/gssapi/mechglue/deps:$srcdir/./config/post.in" ;; + "lib/rpc/Makefile") CONFIG_FILES="$CONFIG_FILES lib/rpc/Makefile:$srcdir/./config/pre.in:lib/rpc/Makefile.in:lib/rpc/deps:$srcdir/./config/post.in" ;; + "lib/rpc/unit-test/Makefile") CONFIG_FILES="$CONFIG_FILES lib/rpc/unit-test/Makefile:$srcdir/./config/pre.in:lib/rpc/unit-test/Makefile.in:lib/rpc/unit-test/deps:$srcdir/./config/post.in" ;; + "lib/kadm5/Makefile") CONFIG_FILES="$CONFIG_FILES lib/kadm5/Makefile:$srcdir/./config/pre.in:lib/kadm5/Makefile.in:lib/kadm5/deps:$srcdir/./config/post.in" ;; + "lib/kadm5/clnt/Makefile") CONFIG_FILES="$CONFIG_FILES lib/kadm5/clnt/Makefile:$srcdir/./config/pre.in:lib/kadm5/clnt/Makefile.in:lib/kadm5/clnt/deps:$srcdir/./config/post.in" ;; + "lib/kadm5/srv/Makefile") CONFIG_FILES="$CONFIG_FILES lib/kadm5/srv/Makefile:$srcdir/./config/pre.in:lib/kadm5/srv/Makefile.in:lib/kadm5/srv/deps:$srcdir/./config/post.in" ;; + "lib/kadm5/unit-test/Makefile") CONFIG_FILES="$CONFIG_FILES lib/kadm5/unit-test/Makefile:$srcdir/./config/pre.in:lib/kadm5/unit-test/Makefile.in:lib/kadm5/unit-test/deps:$srcdir/./config/post.in" ;; + "lib/krad/Makefile") CONFIG_FILES="$CONFIG_FILES lib/krad/Makefile:$srcdir/./config/pre.in:lib/krad/Makefile.in:lib/krad/deps:$srcdir/./config/post.in" ;; + "lib/apputils/Makefile") CONFIG_FILES="$CONFIG_FILES lib/apputils/Makefile:$srcdir/./config/pre.in:lib/apputils/Makefile.in:lib/apputils/deps:$srcdir/./config/post.in" ;; + "kdc/Makefile") CONFIG_FILES="$CONFIG_FILES kdc/Makefile:$srcdir/./config/pre.in:kdc/Makefile.in:kdc/deps:$srcdir/./config/post.in" ;; + "kprop/Makefile") CONFIG_FILES="$CONFIG_FILES kprop/Makefile:$srcdir/./config/pre.in:kprop/Makefile.in:kprop/deps:$srcdir/./config/post.in" ;; + "config-files/Makefile") CONFIG_FILES="$CONFIG_FILES config-files/Makefile:$srcdir/./config/pre.in:config-files/Makefile.in:config-files/deps:$srcdir/./config/post.in" ;; + "build-tools/Makefile") CONFIG_FILES="$CONFIG_FILES build-tools/Makefile:$srcdir/./config/pre.in:build-tools/Makefile.in:build-tools/deps:$srcdir/./config/post.in" ;; + "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile:$srcdir/./config/pre.in:man/Makefile.in:man/deps:$srcdir/./config/post.in" ;; + "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile:$srcdir/./config/pre.in:doc/Makefile.in:doc/deps:$srcdir/./config/post.in" ;; + "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile:$srcdir/./config/pre.in:include/Makefile.in:include/deps:$srcdir/./config/post.in" ;; + "plugins/certauth/test/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/certauth/test/Makefile:$srcdir/./config/pre.in:plugins/certauth/test/Makefile.in:plugins/certauth/test/deps:$srcdir/./config/post.in" ;; + "plugins/gssapi/negoextest/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/gssapi/negoextest/Makefile:$srcdir/./config/pre.in:plugins/gssapi/negoextest/Makefile.in:plugins/gssapi/negoextest/deps:$srcdir/./config/post.in" ;; + "plugins/hostrealm/test/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/hostrealm/test/Makefile:$srcdir/./config/pre.in:plugins/hostrealm/test/Makefile.in:plugins/hostrealm/test/deps:$srcdir/./config/post.in" ;; + "plugins/localauth/test/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/localauth/test/Makefile:$srcdir/./config/pre.in:plugins/localauth/test/Makefile.in:plugins/localauth/test/deps:$srcdir/./config/post.in" ;; + "plugins/kadm5_hook/test/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/kadm5_hook/test/Makefile:$srcdir/./config/pre.in:plugins/kadm5_hook/test/Makefile.in:plugins/kadm5_hook/test/deps:$srcdir/./config/post.in" ;; + "plugins/kadm5_auth/test/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/kadm5_auth/test/Makefile:$srcdir/./config/pre.in:plugins/kadm5_auth/test/Makefile.in:plugins/kadm5_auth/test/deps:$srcdir/./config/post.in" ;; + "plugins/pwqual/test/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/pwqual/test/Makefile:$srcdir/./config/pre.in:plugins/pwqual/test/Makefile.in:plugins/pwqual/test/deps:$srcdir/./config/post.in" ;; + "plugins/audit/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/audit/Makefile:$srcdir/./config/pre.in:plugins/audit/Makefile.in:plugins/audit/deps:$srcdir/./config/post.in" ;; + "plugins/audit/test/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/audit/test/Makefile:$srcdir/./config/pre.in:plugins/audit/test/Makefile.in:plugins/audit/test/deps:$srcdir/./config/post.in" ;; + "plugins/kdb/db2/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/kdb/db2/Makefile:$srcdir/./config/pre.in:plugins/kdb/db2/Makefile.in:plugins/kdb/db2/deps:$srcdir/./config/post.in" ;; + "plugins/kdb/db2/libdb2/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/kdb/db2/libdb2/Makefile:$srcdir/./config/pre.in:plugins/kdb/db2/libdb2/Makefile.in:plugins/kdb/db2/libdb2/deps:$srcdir/./config/post.in" ;; + "plugins/kdb/db2/libdb2/hash/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/kdb/db2/libdb2/hash/Makefile:$srcdir/./config/pre.in:plugins/kdb/db2/libdb2/hash/Makefile.in:plugins/kdb/db2/libdb2/hash/deps:$srcdir/./config/post.in" ;; + "plugins/kdb/db2/libdb2/btree/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/kdb/db2/libdb2/btree/Makefile:$srcdir/./config/pre.in:plugins/kdb/db2/libdb2/btree/Makefile.in:plugins/kdb/db2/libdb2/btree/deps:$srcdir/./config/post.in" ;; + "plugins/kdb/db2/libdb2/db/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/kdb/db2/libdb2/db/Makefile:$srcdir/./config/pre.in:plugins/kdb/db2/libdb2/db/Makefile.in:plugins/kdb/db2/libdb2/db/deps:$srcdir/./config/post.in" ;; + "plugins/kdb/db2/libdb2/mpool/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/kdb/db2/libdb2/mpool/Makefile:$srcdir/./config/pre.in:plugins/kdb/db2/libdb2/mpool/Makefile.in:plugins/kdb/db2/libdb2/mpool/deps:$srcdir/./config/post.in" ;; + "plugins/kdb/db2/libdb2/recno/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/kdb/db2/libdb2/recno/Makefile:$srcdir/./config/pre.in:plugins/kdb/db2/libdb2/recno/Makefile.in:plugins/kdb/db2/libdb2/recno/deps:$srcdir/./config/post.in" ;; + "plugins/kdb/db2/libdb2/test/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/kdb/db2/libdb2/test/Makefile:$srcdir/./config/pre.in:plugins/kdb/db2/libdb2/test/Makefile.in:plugins/kdb/db2/libdb2/test/deps:$srcdir/./config/post.in" ;; + "plugins/kdb/test/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/kdb/test/Makefile:$srcdir/./config/pre.in:plugins/kdb/test/Makefile.in:plugins/kdb/test/deps:$srcdir/./config/post.in" ;; + "plugins/kdcpolicy/test/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/kdcpolicy/test/Makefile:$srcdir/./config/pre.in:plugins/kdcpolicy/test/Makefile.in:plugins/kdcpolicy/test/deps:$srcdir/./config/post.in" ;; + "plugins/preauth/otp/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/preauth/otp/Makefile:$srcdir/./config/pre.in:plugins/preauth/otp/Makefile.in:plugins/preauth/otp/deps:$srcdir/./config/post.in" ;; + "plugins/preauth/spake/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/preauth/spake/Makefile:$srcdir/./config/pre.in:plugins/preauth/spake/Makefile.in:plugins/preauth/spake/deps:$srcdir/./config/post.in" ;; + "plugins/preauth/test/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/preauth/test/Makefile:$srcdir/./config/pre.in:plugins/preauth/test/Makefile.in:plugins/preauth/test/deps:$srcdir/./config/post.in" ;; + "plugins/authdata/greet_client/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/authdata/greet_client/Makefile:$srcdir/./config/pre.in:plugins/authdata/greet_client/Makefile.in:plugins/authdata/greet_client/deps:$srcdir/./config/post.in" ;; + "plugins/authdata/greet_server/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/authdata/greet_server/Makefile:$srcdir/./config/pre.in:plugins/authdata/greet_server/Makefile.in:plugins/authdata/greet_server/deps:$srcdir/./config/post.in" ;; + "plugins/tls/k5tls/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/tls/k5tls/Makefile:$srcdir/./config/pre.in:plugins/tls/k5tls/Makefile.in:plugins/tls/k5tls/deps:$srcdir/./config/post.in" ;; + "clients/Makefile") CONFIG_FILES="$CONFIG_FILES clients/Makefile:$srcdir/./config/pre.in:clients/Makefile.in:clients/deps:$srcdir/./config/post.in" ;; + "clients/klist/Makefile") CONFIG_FILES="$CONFIG_FILES clients/klist/Makefile:$srcdir/./config/pre.in:clients/klist/Makefile.in:clients/klist/deps:$srcdir/./config/post.in" ;; + "clients/kinit/Makefile") CONFIG_FILES="$CONFIG_FILES clients/kinit/Makefile:$srcdir/./config/pre.in:clients/kinit/Makefile.in:clients/kinit/deps:$srcdir/./config/post.in" ;; + "clients/kvno/Makefile") CONFIG_FILES="$CONFIG_FILES clients/kvno/Makefile:$srcdir/./config/pre.in:clients/kvno/Makefile.in:clients/kvno/deps:$srcdir/./config/post.in" ;; + "clients/kdestroy/Makefile") CONFIG_FILES="$CONFIG_FILES clients/kdestroy/Makefile:$srcdir/./config/pre.in:clients/kdestroy/Makefile.in:clients/kdestroy/deps:$srcdir/./config/post.in" ;; + "clients/kpasswd/Makefile") CONFIG_FILES="$CONFIG_FILES clients/kpasswd/Makefile:$srcdir/./config/pre.in:clients/kpasswd/Makefile.in:clients/kpasswd/deps:$srcdir/./config/post.in" ;; + "clients/ksu/Makefile") CONFIG_FILES="$CONFIG_FILES clients/ksu/Makefile:$srcdir/./config/pre.in:clients/ksu/Makefile.in:clients/ksu/deps:$srcdir/./config/post.in" ;; + "clients/kswitch/Makefile") CONFIG_FILES="$CONFIG_FILES clients/kswitch/Makefile:$srcdir/./config/pre.in:clients/kswitch/Makefile.in:clients/kswitch/deps:$srcdir/./config/post.in" ;; + "kadmin/Makefile") CONFIG_FILES="$CONFIG_FILES kadmin/Makefile:$srcdir/./config/pre.in:kadmin/Makefile.in:kadmin/deps:$srcdir/./config/post.in" ;; + "kadmin/cli/Makefile") CONFIG_FILES="$CONFIG_FILES kadmin/cli/Makefile:$srcdir/./config/pre.in:kadmin/cli/Makefile.in:kadmin/cli/deps:$srcdir/./config/post.in" ;; + "kadmin/dbutil/Makefile") CONFIG_FILES="$CONFIG_FILES kadmin/dbutil/Makefile:$srcdir/./config/pre.in:kadmin/dbutil/Makefile.in:kadmin/dbutil/deps:$srcdir/./config/post.in" ;; + "kadmin/ktutil/Makefile") CONFIG_FILES="$CONFIG_FILES kadmin/ktutil/Makefile:$srcdir/./config/pre.in:kadmin/ktutil/Makefile.in:kadmin/ktutil/deps:$srcdir/./config/post.in" ;; + "kadmin/server/Makefile") CONFIG_FILES="$CONFIG_FILES kadmin/server/Makefile:$srcdir/./config/pre.in:kadmin/server/Makefile.in:kadmin/server/deps:$srcdir/./config/post.in" ;; + "kadmin/testing/Makefile") CONFIG_FILES="$CONFIG_FILES kadmin/testing/Makefile:$srcdir/./config/pre.in:kadmin/testing/Makefile.in:kadmin/testing/deps:$srcdir/./config/post.in" ;; + "kadmin/testing/scripts/Makefile") CONFIG_FILES="$CONFIG_FILES kadmin/testing/scripts/Makefile:$srcdir/./config/pre.in:kadmin/testing/scripts/Makefile.in:kadmin/testing/scripts/deps:$srcdir/./config/post.in" ;; + "kadmin/testing/util/Makefile") CONFIG_FILES="$CONFIG_FILES kadmin/testing/util/Makefile:$srcdir/./config/pre.in:kadmin/testing/util/Makefile.in:kadmin/testing/util/deps:$srcdir/./config/post.in" ;; + "appl/Makefile") CONFIG_FILES="$CONFIG_FILES appl/Makefile:$srcdir/./config/pre.in:appl/Makefile.in:appl/deps:$srcdir/./config/post.in" ;; + "appl/sample/Makefile") CONFIG_FILES="$CONFIG_FILES appl/sample/Makefile:$srcdir/./config/pre.in:appl/sample/Makefile.in:appl/sample/deps:$srcdir/./config/post.in" ;; + "appl/sample/sclient/Makefile") CONFIG_FILES="$CONFIG_FILES appl/sample/sclient/Makefile:$srcdir/./config/pre.in:appl/sample/sclient/Makefile.in:appl/sample/sclient/deps:$srcdir/./config/post.in" ;; + "appl/sample/sserver/Makefile") CONFIG_FILES="$CONFIG_FILES appl/sample/sserver/Makefile:$srcdir/./config/pre.in:appl/sample/sserver/Makefile.in:appl/sample/sserver/deps:$srcdir/./config/post.in" ;; + "appl/simple/Makefile") CONFIG_FILES="$CONFIG_FILES appl/simple/Makefile:$srcdir/./config/pre.in:appl/simple/Makefile.in:appl/simple/deps:$srcdir/./config/post.in" ;; + "appl/simple/client/Makefile") CONFIG_FILES="$CONFIG_FILES appl/simple/client/Makefile:$srcdir/./config/pre.in:appl/simple/client/Makefile.in:appl/simple/client/deps:$srcdir/./config/post.in" ;; + "appl/simple/server/Makefile") CONFIG_FILES="$CONFIG_FILES appl/simple/server/Makefile:$srcdir/./config/pre.in:appl/simple/server/Makefile.in:appl/simple/server/deps:$srcdir/./config/post.in" ;; + "appl/gss-sample/Makefile") CONFIG_FILES="$CONFIG_FILES appl/gss-sample/Makefile:$srcdir/./config/pre.in:appl/gss-sample/Makefile.in:appl/gss-sample/deps:$srcdir/./config/post.in" ;; + "appl/user_user/Makefile") CONFIG_FILES="$CONFIG_FILES appl/user_user/Makefile:$srcdir/./config/pre.in:appl/user_user/Makefile.in:appl/user_user/deps:$srcdir/./config/post.in" ;; + "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile:$srcdir/./config/pre.in:tests/Makefile.in:tests/deps:$srcdir/./config/post.in" ;; + "tests/resolve/Makefile") CONFIG_FILES="$CONFIG_FILES tests/resolve/Makefile:$srcdir/./config/pre.in:tests/resolve/Makefile.in:tests/resolve/deps:$srcdir/./config/post.in" ;; + "tests/asn.1/Makefile") CONFIG_FILES="$CONFIG_FILES tests/asn.1/Makefile:$srcdir/./config/pre.in:tests/asn.1/Makefile.in:tests/asn.1/deps:$srcdir/./config/post.in" ;; + "tests/create/Makefile") CONFIG_FILES="$CONFIG_FILES tests/create/Makefile:$srcdir/./config/pre.in:tests/create/Makefile.in:tests/create/deps:$srcdir/./config/post.in" ;; + "tests/hammer/Makefile") CONFIG_FILES="$CONFIG_FILES tests/hammer/Makefile:$srcdir/./config/pre.in:tests/hammer/Makefile.in:tests/hammer/deps:$srcdir/./config/post.in" ;; + "tests/verify/Makefile") CONFIG_FILES="$CONFIG_FILES tests/verify/Makefile:$srcdir/./config/pre.in:tests/verify/Makefile.in:tests/verify/deps:$srcdir/./config/post.in" ;; + "tests/gssapi/Makefile") CONFIG_FILES="$CONFIG_FILES tests/gssapi/Makefile:$srcdir/./config/pre.in:tests/gssapi/Makefile.in:tests/gssapi/deps:$srcdir/./config/post.in" ;; + "tests/dejagnu/Makefile") CONFIG_FILES="$CONFIG_FILES tests/dejagnu/Makefile:$srcdir/./config/pre.in:tests/dejagnu/Makefile.in:tests/dejagnu/deps:$srcdir/./config/post.in" ;; + "tests/threads/Makefile") CONFIG_FILES="$CONFIG_FILES tests/threads/Makefile:$srcdir/./config/pre.in:tests/threads/Makefile.in:tests/threads/deps:$srcdir/./config/post.in" ;; + "tests/shlib/Makefile") CONFIG_FILES="$CONFIG_FILES tests/shlib/Makefile:$srcdir/./config/pre.in:tests/shlib/Makefile.in:tests/shlib/deps:$srcdir/./config/post.in" ;; + "tests/gss-threads/Makefile") CONFIG_FILES="$CONFIG_FILES tests/gss-threads/Makefile:$srcdir/./config/pre.in:tests/gss-threads/Makefile.in:tests/gss-threads/deps:$srcdir/./config/post.in" ;; + "tests/misc/Makefile") CONFIG_FILES="$CONFIG_FILES tests/misc/Makefile:$srcdir/./config/pre.in:tests/misc/Makefile.in:tests/misc/deps:$srcdir/./config/post.in" ;; + + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + esac +done + + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files + test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers + test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason against having it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. +$debug || +{ + tmp= ac_tmp= + trap 'exit_status=$? + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status +' 0 + trap 'as_fn_exit 1' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +ac_tmp=$tmp + +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with `./config.status config.h'. +if test -n "$CONFIG_FILES"; then + +if $AWK 'BEGIN { getline <"/dev/null" }' /dev/null; then + ac_cs_awk_getline=: + ac_cs_awk_pipe_init= + ac_cs_awk_read_file=' + while ((getline aline < (F[key])) > 0) + print(aline) + close(F[key])' + ac_cs_awk_pipe_fini= +else + ac_cs_awk_getline=false + ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\"" + ac_cs_awk_read_file=' + print "|#_!!_#|" + print "cat " F[key] " &&" + '$ac_cs_awk_pipe_init + # The final `:' finishes the AND list. + ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }' +fi +ac_cr=`echo X | tr X '\015'` +# On cygwin, bash can eat \r inside `` if the user requested igncr. +# But we know of no other shell where ac_cr would be empty at this +# point, so we can use a bashism as a fallback. +if test "x$ac_cr" = x; then + eval ac_cr=\$\'\\r\' +fi +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\\r' +else + ac_cs_awk_cr=$ac_cr +fi + +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && +_ACEOF + +# Create commands to substitute file output variables. +{ + echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" && + echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' && + echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' && + echo "_ACAWK" && + echo "_ACEOF" +} >conf$$files.sh && +. ./conf$$files.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +rm -f conf$$files.sh + +{ + echo "cat >conf$$subs.awk <<_ACEOF" && + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" +} >conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + . ./conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` + if test $ac_delim_n = $ac_delim_num; then + break + elif $ac_last_try; then + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done +rm -f conf$$subs.sh + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && +_ACEOF +sed -n ' +h +s/^/S["/; s/!.*/"]=/ +p +g +s/^[^!]*!// +:repl +t repl +s/'"$ac_delim"'$// +t delim +:nl +h +s/\(.\{148\}\)..*/\1/ +t more1 +s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ +p +n +b repl +:more1 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t nl +:delim +h +s/\(.\{148\}\)..*/\1/ +t more2 +s/["\\]/\\&/g; s/^/"/; s/$/"/ +p +b +:more2 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t delim +' >$CONFIG_STATUS || ac_write_fail=1 +rm -f conf$$subs.awk +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACAWK +cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" + \$ac_cs_awk_pipe_init +} +{ + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + if (nfields == 3 && !substed) { + key = field[2] + if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) { + \$ac_cs_awk_read_file + next + } + } + print line +} +\$ac_cs_awk_pipe_fini +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 +_ACEOF + +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// +s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// +s/^[^=]*=[ ]*$// +}' +fi + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +fi # test -n "$CONFIG_FILES" + +# Set up the scripts for CONFIG_HEADERS section. +# No need to generate them if there are no CONFIG_HEADERS. +# This happens for instance with `./config.status Makefile'. +if test -n "$CONFIG_HEADERS"; then +cat >"$ac_tmp/defines.awk" <<\_ACAWK || +BEGIN { +_ACEOF + +# Transform confdefs.h into an awk script `defines.awk', embedded as +# here-document in config.status, that substitutes the proper values into +# config.h.in to produce config.h. + +# Create a delimiter string that does not exist in confdefs.h, to ease +# handling of long lines. +ac_delim='%!_!# ' +for ac_last_try in false false :; do + ac_tt=`sed -n "/$ac_delim/p" confdefs.h` + if test -z "$ac_tt"; then + break + elif $ac_last_try; then + as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +# For the awk script, D is an array of macro values keyed by name, +# likewise P contains macro parameters if any. Preserve backslash +# newline sequences. + +ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* +sed -n ' +s/.\{148\}/&'"$ac_delim"'/g +t rset +:rset +s/^[ ]*#[ ]*define[ ][ ]*/ / +t def +d +:def +s/\\$// +t bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3"/p +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p +d +:bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3\\\\\\n"\\/p +t cont +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p +t cont +d +:cont +n +s/.\{148\}/&'"$ac_delim"'/g +t clear +:clear +s/\\$// +t bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/"/p +d +:bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p +b cont +' >$CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + for (key in D) D_is_set[key] = 1 + FS = "" +} +/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { + line = \$ 0 + split(line, arg, " ") + if (arg[1] == "#") { + defundef = arg[2] + mac1 = arg[3] + } else { + defundef = substr(arg[1], 2) + mac1 = arg[2] + } + split(mac1, mac2, "(") #) + macro = mac2[1] + prefix = substr(line, 1, index(line, defundef) - 1) + if (D_is_set[macro]) { + # Preserve the white space surrounding the "#". + print prefix "define", macro P[macro] D[macro] + next + } else { + # Replace #undef with comments. This is necessary, for example, + # in the case of _POSIX_SOURCE, which is predefined and required + # on some systems where configure will not decide to define it. + if (defundef == "undef") { + print "/*", prefix defundef, macro, "*/" + next + } + } +} +{ print } +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 +fi # test -n "$CONFIG_HEADERS" + + +eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" +shift +for ac_tag +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$ac_tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; + esac + case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + as_fn_append ac_file_inputs " '$ac_f'" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input='Generated from '` + printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +printf "%s\n" "$as_me: creating $ac_file" >&6;} + fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`printf "%s\n" "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac + + case $ac_tag in + *:-:* | *:-) cat >"$ac_tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +printf "%s\n" X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir="$ac_dir"; as_fn_mkdir_p + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + + case $ac_mode in + :F) + # + # CONFIG_FILE + # + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + esac +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= +ac_sed_dataroot=' +/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p' +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_sed_extra="$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s|@configure_input@|$ac_sed_conf_input|;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +$ac_datarootdir_hack +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | +if $ac_cs_awk_getline; then + $AWK -f "$ac_tmp/subs.awk" +else + $AWK -f "$ac_tmp/subs.awk" | $SHELL +fi \ + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_tmp/out"`; test -z "$ac_out"; } && + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&5 +printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&2;} + + rm -f "$ac_tmp/stdin" + case $ac_file in + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; + esac \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + ;; + :H) + # + # CONFIG_HEADER + # + if test x"$ac_file" != x-; then + { + printf "%s\n" "/* $configure_input */" >&1 \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" + } >"$ac_tmp/config.h" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 +printf "%s\n" "$as_me: $ac_file is unchanged" >&6;} + else + rm -f "$ac_file" + mv "$ac_tmp/config.h" "$ac_file" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + fi + else + printf "%s\n" "/* $configure_input */" >&1 \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ + || as_fn_error $? "could not create -" "$LINENO" 5 + fi + ;; + + :C) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 +printf "%s\n" "$as_me: executing $ac_file commands" >&6;} + ;; + esac + + + case $ac_file$ac_mode in + "include/autoconf.h":H) echo timestamp > include/autoconf.stamp ;; + "build-tools/krb5-config":F) chmod +x build-tools/krb5-config ;; + + esac +done # for ac_tag + + +as_fn_exit 0 +_ACEOF +ac_clean_files=$ac_clean_files_save + +test $ac_write_fail = 0 || + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || as_fn_exit 1 +fi +if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} +fi + + diff --git a/krb5-1.18.3-final.tar.gz b/krb5-1.18.3-final.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..82525ca8385f1af43a9becc35fe10acdb9c699cd --- /dev/null +++ b/krb5-1.18.3-final.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:50bca832a626635a715c2f4f0d3d9b9749e331173621e1ebf3c2823264804833 +size 5169338 diff --git a/krb5-CVE-2023-36054.patch b/krb5-CVE-2023-36054.patch new file mode 100644 index 0000000000000000000000000000000000000000..263f8622335388e14a0e98695759df78145d29af --- /dev/null +++ b/krb5-CVE-2023-36054.patch @@ -0,0 +1,35 @@ +diff -Naur a/src/lib/kadm5/kadm_rpc_xdr.c b/src/lib/kadm5/kadm_rpc_xdr.c +--- a/src/lib/kadm5/kadm_rpc_xdr.c 2023-09-01 16:16:12.843658117 +0800 ++++ b/src/lib/kadm5/kadm_rpc_xdr.c 2023-09-01 16:12:03.704811364 +0800 +@@ -390,6 +390,7 @@ + int v) + { + unsigned int n; ++ bool_t r; + + if (!xdr_krb5_principal(xdrs, &objp->principal)) { + return (FALSE); +@@ -443,6 +444,9 @@ + if (!xdr_krb5_int16(xdrs, &objp->n_key_data)) { + return (FALSE); + } ++ if (xdrs->x_op == XDR_DECODE && objp->n_key_data < 0) { ++ return (FALSE); ++ } + if (!xdr_krb5_int16(xdrs, &objp->n_tl_data)) { + return (FALSE); + } +@@ -451,9 +455,10 @@ + return FALSE; + } + n = objp->n_key_data; +- if (!xdr_array(xdrs, (caddr_t *) &objp->key_data, +- &n, ~0, sizeof(krb5_key_data), +- xdr_krb5_key_data_nocontents)) { ++ r = xdr_array(xdrs, (caddr_t *) &objp->key_data, &n, objp->n_key_data, ++ sizeof(krb5_key_data), xdr_krb5_key_data_nocontents); ++ objp->n_key_data = n; ++ if (!r) { + return (FALSE); + } + diff --git a/krb5-backport-Add-a-simple-DER-support-header.patch b/krb5-backport-Add-a-simple-DER-support-header.patch new file mode 100644 index 0000000000000000000000000000000000000000..d90c866f053b492442872150a2652256bf9eba2e --- /dev/null +++ b/krb5-backport-Add-a-simple-DER-support-header.patch @@ -0,0 +1,171 @@ +From 548da160b52b25a106e9f6077d6a42c2c049586c Mon Sep 17 00:00:00 2001 +From: Greg Hudson +Date: Tue, 7 Mar 2023 00:19:33 -0500 +Subject: [PATCH] Add a simple DER support header + +Reference: https://github.com/krb5/krb5/commit/548da160b52b25a106e9f6077d6a42c2c049586c +Conflict: NA + +--- + src/include/k5-der.h | 149 +++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 149 insertions(+) + create mode 100644 src/include/k5-der.h + +diff --git a/src/include/k5-der.h b/src/include/k5-der.h +new file mode 100644 +index 0000000..b8371d9 +--- /dev/null ++++ b/src/include/k5-der.h +@@ -0,0 +1,149 @@ ++/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */ ++/* include/k5-der.h - Distinguished Encoding Rules (DER) declarations */ ++/* ++ * Copyright (C) 2023 by the Massachusetts Institute of Technology. ++ * All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions ++ * are met: ++ * ++ * * Redistributions of source code must retain the above copyright ++ * notice, this list of conditions and the following disclaimer. ++ * ++ * * Redistributions in binary form must reproduce the above copyright ++ * notice, this list of conditions and the following disclaimer in ++ * the documentation and/or other materials provided with the ++ * distribution. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ++ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ++ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ++ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ++ * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, ++ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES ++ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR ++ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ++ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, ++ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ++ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED ++ * OF THE POSSIBILITY OF SUCH DAMAGE. ++ */ ++ ++/* ++ * Most ASN.1 encoding and decoding is done using the table-driven framework in ++ * libkrb5. When that is not an option, these helpers can be used to encode ++ * and decode simple types. ++ */ ++ ++#ifndef K5_DER_H ++#define K5_DER_H ++ ++#include ++#include ++#include "k5-buf.h" ++#include "k5-input.h" ++ ++/* Return the number of bytes needed to encode len as a DER encoding length. */ ++static inline size_t ++k5_der_len_len(size_t len) ++{ ++ size_t llen; ++ ++ if (len < 128) ++ return 1; ++ llen = 1; ++ while (len > 0) { ++ len >>= 8; ++ llen++; ++ } ++ return llen; ++} ++ ++/* Return the number of bytes needed to encode a DER value (with identifier ++ * byte and length) for a given contents length. */ ++static inline size_t ++k5_der_value_len(size_t contents_len) ++{ ++ return 1 + k5_der_len_len(contents_len) + contents_len; ++} ++ ++/* Add a DER identifier byte (composed by the caller, including the ASN.1 ++ * class, tag, and constructed bit) and length. */ ++static inline void ++k5_der_add_taglen(struct k5buf *buf, uint8_t idbyte, size_t len) ++{ ++ uint8_t *p; ++ size_t llen = k5_der_len_len(len); ++ ++ p = k5_buf_get_space(buf, 1 + llen); ++ if (p == NULL) ++ return; ++ *p++ = idbyte; ++ if (len < 128) { ++ *p = len; ++ } else { ++ *p = 0x80 | (llen - 1); ++ /* Encode the length bytes backwards so the most significant byte is ++ * first. */ ++ p += llen; ++ while (len > 0) { ++ *--p = len & 0xFF; ++ len >>= 8; ++ } ++ } ++} ++ ++/* Add a DER value (identifier byte, length, and contents). */ ++static inline void ++k5_der_add_value(struct k5buf *buf, uint8_t idbyte, const void *contents, ++ size_t len) ++{ ++ k5_der_add_taglen(buf, idbyte, len); ++ k5_buf_add_len(buf, contents, len); ++} ++ ++/* ++ * If the next byte in in matches idbyte and the subsequent DER length is ++ * valid, advance in past the value, set *contents_out to the value contents, ++ * and return true. Otherwise return false. Only set an error on in if the ++ * next bytes matches idbyte but the ensuing length is invalid. contents_out ++ * may be aliased to in; it will only be written to on successful decoding of a ++ * value. ++ */ ++static inline bool ++k5_der_get_value(struct k5input *in, uint8_t idbyte, ++ struct k5input *contents_out) ++{ ++ uint8_t lenbyte, i; ++ size_t len; ++ const void *bytes; ++ ++ /* Do nothing if in is empty or the next byte doesn't match idbyte. */ ++ if (in->status || in->len == 0 || *in->ptr != idbyte) ++ return false; ++ ++ /* Advance past the identifier byte and decode the length. */ ++ (void)k5_input_get_byte(in); ++ lenbyte = k5_input_get_byte(in); ++ if (lenbyte < 128) { ++ len = lenbyte; ++ } else { ++ len = 0; ++ for (i = 0; i < (lenbyte & 0x7F); i++) { ++ if (len > (SIZE_MAX >> 8)) { ++ k5_input_set_status(in, EOVERFLOW); ++ return false; ++ } ++ len = (len << 8) | k5_input_get_byte(in); ++ } ++ } ++ ++ bytes = k5_input_get_bytes(in, len); ++ if (bytes == NULL) ++ return false; ++ k5_input_init(contents_out, bytes, len); ++ return true; ++} ++ ++#endif /* K5_DER_H */ +-- +2.33.0 + diff --git a/krb5-backport-CVE-2024-37370-CVE-2024-37371-Fix-vulnerabilities-in-GSS-message-token-handling.patch b/krb5-backport-CVE-2024-37370-CVE-2024-37371-Fix-vulnerabilities-in-GSS-message-token-handling.patch new file mode 100644 index 0000000000000000000000000000000000000000..8687020883bff86891725d0f9297f516b935dc01 --- /dev/null +++ b/krb5-backport-CVE-2024-37370-CVE-2024-37371-Fix-vulnerabilities-in-GSS-message-token-handling.patch @@ -0,0 +1,536 @@ +From b0a2f8a5365f2eec3e27d78907de9f9d2c80505a Mon Sep 17 00:00:00 2001 +From: Greg Hudson +Date: Fri, 14 Jun 2024 10:56:12 -0400 +Subject: [PATCH] Fix vulnerabilities in GSS message token handling + +In gss_krb5int_unseal_token_v3() and gss_krb5int_unseal_v3_iov(), +verify the Extra Count field of CFX wrap tokens against the encrypted +header. Reported by Jacob Champion. + +In gss_krb5int_unseal_token_v3(), check for a decrypted plaintext +length too short to contain the encrypted header and extra count +bytes. Reported by Jacob Champion. + +In kg_unseal_iov_token(), separately track the header IOV length and +complete token length when parsing the token's ASN.1 wrapper. This +fix contains modified versions of functions from k5-der.h and +util_token.c; this duplication will be cleaned up in a future commit. + +CVE-2024-37370: + +In MIT krb5 release 1.3 and later, an attacker can modify the +plaintext Extra Count field of a confidential GSS krb5 wrap token, +causing the unwrapped token to appear truncated to the application. + +CVE-2024-37371: + +In MIT krb5 release 1.3 and later, an attacker can cause invalid +memory reads by sending message tokens with invalid length fields. + +ticket: 9128 (new) +tags: pullup +target_version: 1.21-next + +Reference: https://github.com/krb5/krb5/commit/b0a2f8a5365f2eec3e27d78907de9f9d2c80505a +Conflict: src/tests/gssapi/t_invalid.c + +--- + src/lib/gssapi/krb5/k5sealv3.c | 5 + + src/lib/gssapi/krb5/k5sealv3iov.c | 3 +- + src/lib/gssapi/krb5/k5unsealiov.c | 80 +++++++++- + src/tests/gssapi/t_invalid.c | 233 +++++++++++++++++++++++++----- + 4 files changed, 275 insertions(+), 46 deletions(-) + +diff --git a/src/lib/gssapi/krb5/k5sealv3.c b/src/lib/gssapi/krb5/k5sealv3.c +index e881eee..d3210c1 100644 +--- a/src/lib/gssapi/krb5/k5sealv3.c ++++ b/src/lib/gssapi/krb5/k5sealv3.c +@@ -400,10 +400,15 @@ gss_krb5int_unseal_token_v3(krb5_context *contextptr, + /* Don't use bodysize here! Use the fact that + cipher.ciphertext.length has been adjusted to the + correct length. */ ++ if (plain.length < 16 + ec) { ++ free(plain.data); ++ goto defective; ++ } + althdr = (unsigned char *)plain.data + plain.length - 16; + if (load_16_be(althdr) != KG2_TOK_WRAP_MSG + || althdr[2] != ptr[2] + || althdr[3] != ptr[3] ++ || load_16_be(althdr+4) != ec + || memcmp(althdr+8, ptr+8, 8)) { + free(plain.data); + goto defective; +diff --git a/src/lib/gssapi/krb5/k5sealv3iov.c b/src/lib/gssapi/krb5/k5sealv3iov.c +index 333ee12..f8e90c3 100644 +--- a/src/lib/gssapi/krb5/k5sealv3iov.c ++++ b/src/lib/gssapi/krb5/k5sealv3iov.c +@@ -402,9 +402,10 @@ gss_krb5int_unseal_v3_iov(krb5_context context, + if (load_16_be(althdr) != KG2_TOK_WRAP_MSG + || althdr[2] != ptr[2] + || althdr[3] != ptr[3] ++ || load_16_be(althdr + 4) != ec + || memcmp(althdr + 8, ptr + 8, 8) != 0) { + *minor_status = 0; +- return GSS_S_BAD_SIG; ++ return GSS_S_DEFECTIVE_TOKEN; + } + } else { + /* Verify checksum: note EC is checksum size here, not padding */ +diff --git a/src/lib/gssapi/krb5/k5unsealiov.c b/src/lib/gssapi/krb5/k5unsealiov.c +index 3ce2a90..6a6585d 100644 +--- a/src/lib/gssapi/krb5/k5unsealiov.c ++++ b/src/lib/gssapi/krb5/k5unsealiov.c +@@ -25,6 +25,7 @@ + */ + + #include "k5-int.h" ++#include "k5-der.h" + #include "gssapiP_krb5.h" + + static OM_uint32 +@@ -247,6 +248,73 @@ cleanup: + return retval; + } + ++/* Similar to k5_der_get_value(), but output an unchecked content length ++ * instead of a k5input containing the contents. */ ++static inline bool ++get_der_tag(struct k5input *in, uint8_t idbyte, size_t *len_out) ++{ ++ uint8_t lenbyte, i; ++ size_t len; ++ ++ /* Do nothing if in is empty or the next byte doesn't match idbyte. */ ++ if (in->status || in->len == 0 || *in->ptr != idbyte) ++ return false; ++ ++ /* Advance past the identifier byte and decode the length. */ ++ (void)k5_input_get_byte(in); ++ lenbyte = k5_input_get_byte(in); ++ if (lenbyte < 128) { ++ len = lenbyte; ++ } else { ++ len = 0; ++ for (i = 0; i < (lenbyte & 0x7F); i++) { ++ if (len > (SIZE_MAX >> 8)) { ++ k5_input_set_status(in, EOVERFLOW); ++ return false; ++ } ++ len = (len << 8) | k5_input_get_byte(in); ++ } ++ } ++ ++ if (in->status) ++ return false; ++ ++ *len_out = len; ++ return true; ++} ++ ++/* ++ * Similar to g_verify_token_header() without toktype or flags, but do not read ++ * more than *header_len bytes of ASN.1 wrapper, and on output set *header_len ++ * to the remaining number of header bytes. Verify the outer DER tag's length ++ * against token_len, which may be larger (but not smaller) than *header_len. ++ */ ++static gss_int32 ++verify_detached_wrapper(const gss_OID_desc *mech, size_t *header_len, ++ uint8_t **header_in, size_t token_len) ++{ ++ struct k5input in, mech_der; ++ gss_OID_desc toid; ++ size_t len; ++ ++ k5_input_init(&in, *header_in, *header_len); ++ ++ if (get_der_tag(&in, 0x60, &len)) { ++ if (len != token_len - (in.ptr - *header_in)) ++ return G_BAD_TOK_HEADER; ++ if (!k5_der_get_value(&in, 0x06, &mech_der)) ++ return G_BAD_TOK_HEADER; ++ toid.elements = (uint8_t *)mech_der.ptr; ++ toid.length = mech_der.len; ++ if (!g_OID_equal(&toid, mech)) ++ return G_WRONG_MECH; ++ } ++ ++ *header_in = (uint8_t *)in.ptr; ++ *header_len = in.len; ++ return 0; ++} ++ + /* + * Caller must provide TOKEN | DATA | PADDING | TRAILER, except + * for DCE in which case it can just provide TOKEN | DATA (must +@@ -267,8 +335,7 @@ kg_unseal_iov_token(OM_uint32 *minor_status, + gss_iov_buffer_t header; + gss_iov_buffer_t padding; + gss_iov_buffer_t trailer; +- size_t input_length; +- unsigned int bodysize; ++ size_t input_length, hlen; + int toktype2; + + header = kg_locate_header_iov(iov, iov_count, toktype); +@@ -298,15 +365,14 @@ kg_unseal_iov_token(OM_uint32 *minor_status, + input_length += trailer->buffer.length; + } + +- code = g_verify_token_header(ctx->mech_used, +- &bodysize, &ptr, -1, +- input_length, 0); ++ hlen = header->buffer.length; ++ code = verify_detached_wrapper(ctx->mech_used, &hlen, &ptr, input_length); + if (code != 0) { + *minor_status = code; + return GSS_S_DEFECTIVE_TOKEN; + } + +- if (bodysize < 2) { ++ if (hlen < 2) { + *minor_status = (OM_uint32)G_BAD_TOK_HEADER; + return GSS_S_DEFECTIVE_TOKEN; + } +@@ -314,7 +380,7 @@ kg_unseal_iov_token(OM_uint32 *minor_status, + toktype2 = load_16_be(ptr); + + ptr += 2; +- bodysize -= 2; ++ hlen -= 2; + + switch (toktype2) { + case KG2_TOK_MIC_MSG: +diff --git a/src/tests/gssapi/t_invalid.c b/src/tests/gssapi/t_invalid.c +index fb8fe55..d1f019f 100644 +--- a/src/tests/gssapi/t_invalid.c ++++ b/src/tests/gssapi/t_invalid.c +@@ -36,31 +36,41 @@ + * + * 1. A pre-CFX wrap or MIC token processed with a CFX-only context causes a + * null pointer dereference. (The token must use SEAL_ALG_NONE or it will +- * be rejected.) ++ * be rejected.) This vulnerability also applies to IOV unwrap. + * +- * 2. A pre-CFX wrap or MIC token with fewer than 24 bytes after the ASN.1 ++ * 2. A CFX wrap token with a different value of EC between the plaintext and ++ * encrypted copies will be erroneously accepted, which allows a message ++ * truncation attack. This vulnerability also applies to IOV unwrap. ++ * ++ * 3. A CFX wrap token with a plaintext length fewer than 16 bytes causes an ++ * access before the beginning of the input buffer, possibly leading to a ++ * crash. ++ * ++ * 4. A CFX wrap token with a plaintext EC value greater than the plaintext ++ * length - 16 causes an integer underflow when computing the result length, ++ * likely causing a crash. ++ * ++ * 5. An IOV unwrap operation will overrun the header buffer if an ASN.1 ++ * wrapper longer than the header buffer is present. ++ * ++ * 6. A pre-CFX wrap or MIC token with fewer than 24 bytes after the ASN.1 + * header causes an input buffer overrun, usually leading to either a segv + * or a GSS_S_DEFECTIVE_TOKEN error due to garbage algorithm, filler, or +- * sequence number values. ++ * sequence number values. This vulnerability also applies to IOV unwrap. + * +- * 3. A pre-CFX wrap token with fewer than 16 + cksumlen bytes after the ASN.1 ++ * 7. A pre-CFX wrap token with fewer than 16 + cksumlen bytes after the ASN.1 + * header causes an integer underflow when computing the ciphertext length, + * leading to an allocation error on 32-bit platforms or a segv on 64-bit + * platforms. A pre-CFX MIC token of this size causes an input buffer + * overrun when comparing the checksum, perhaps leading to a segv. + * +- * 4. A pre-CFX wrap token with fewer than conflen + padlen bytes in the ++ * 8. A pre-CFX wrap token with fewer than conflen + padlen bytes in the + * ciphertext (where padlen is the last byte of the decrypted ciphertext) + * causes an integer underflow when computing the original message length, + * leading to an allocation error. + * +- * 5. In the mechglue, truncated encapsulation in the initial context token can ++ * 9. In the mechglue, truncated encapsulation in the initial context token can + * cause input buffer overruns in gss_accept_sec_context(). +- * +- * Vulnerabilities #1 and #2 also apply to IOV unwrap, although tokens with +- * fewer than 16 bytes after the ASN.1 header will be rejected. +- * Vulnerabilities #2 and #5 can only be robustly detected using a +- * memory-checking environment such as valgrind. + */ + + #include "k5-int.h" +@@ -98,16 +108,24 @@ struct test { + }; + + /* Fake up enough of a CFX GSS context for gss_unwrap, using an AES key. */ ++static void * ++ealloc(size_t len) ++{ ++ void *ptr = calloc(len, 1); ++ ++ if (ptr == NULL) ++ abort(); ++ return ptr; ++} ++ ++/* Fake up enough of a CFX GSS context for gss_unwrap, using an AES key. ++ * The context takes ownership of subkey. */ + static gss_ctx_id_t +-make_fake_cfx_context() ++make_fake_cfx_context(krb5_key subkey) + { + gss_union_ctx_id_t uctx; + krb5_gss_ctx_id_t kgctx; +- krb5_keyblock kb; +- +- kgctx = calloc(1, sizeof(*kgctx)); +- if (kgctx == NULL) +- abort(); ++ kgctx = ealloc(sizeof(*kgctx)); + kgctx->established = 1; + kgctx->proto = 1; + if (g_seqstate_init(&kgctx->seqstate, 0, 0, 0, 0) != 0) +@@ -116,15 +134,10 @@ make_fake_cfx_context() + kgctx->sealalg = -1; + kgctx->signalg = -1; + +- kb.enctype = ENCTYPE_AES128_CTS_HMAC_SHA1_96; +- kb.length = 16; +- kb.contents = (unsigned char *)"1234567887654321"; +- if (krb5_k_create_key(NULL, &kb, &kgctx->subkey) != 0) +- abort(); ++ kgctx->subkey = subkey; ++ kgctx->cksumtype = CKSUMTYPE_HMAC_SHA1_96_AES128; + +- uctx = calloc(1, sizeof(*uctx)); +- if (uctx == NULL) +- abort(); ++ uctx = ealloc(sizeof(*uctx)); + uctx->mech_type = &mech_krb5; + uctx->internal_ctx_id = (gss_ctx_id_t)kgctx; + return (gss_ctx_id_t)uctx; +@@ -138,9 +151,7 @@ make_fake_context(const struct test *test) + krb5_gss_ctx_id_t kgctx; + krb5_keyblock kb; + +- kgctx = calloc(1, sizeof(*kgctx)); +- if (kgctx == NULL) +- abort(); ++ kgctx = ealloc(sizeof(*kgctx)); + kgctx->established = 1; + if (g_seqstate_init(&kgctx->seqstate, 0, 0, 0, 0) != 0) + abort(); +@@ -162,9 +173,7 @@ make_fake_context(const struct test *test) + if (krb5_k_create_key(NULL, &kb, &kgctx->enc) != 0) + abort(); + +- uctx = calloc(1, sizeof(*uctx)); +- if (uctx == NULL) +- abort(); ++ uctx = ealloc(sizeof(*uctx)); + uctx->mech_type = &mech_krb5; + uctx->internal_ctx_id = (gss_ctx_id_t)kgctx; + return (gss_ctx_id_t)uctx; +@@ -194,9 +203,7 @@ make_token(unsigned char *token, size_t len, gss_buffer_t out) + + assert(mech_krb5.length == 9); + assert(len + 11 < 128); +- wrapped = malloc(len + 13); +- if (wrapped == NULL) +- abort(); ++ wrapped = ealloc(len + 13); + wrapped[0] = 0x60; + wrapped[1] = len + 11; + wrapped[2] = 0x06; +@@ -207,6 +214,18 @@ make_token(unsigned char *token, size_t len, gss_buffer_t out) + out->value = wrapped; + } + ++/* Create a 16-byte header for a CFX confidential wrap token to be processed by ++ * the fake CFX context. */ ++static void ++write_cfx_header(uint16_t ec, uint8_t *out) ++{ ++ memset(out, 0, 16); ++ store_16_be(KG2_TOK_WRAP_MSG, out); ++ out[2] = FLAG_WRAP_CONFIDENTIAL; ++ out[3] = 0xFF; ++ store_16_be(ec, out + 4); ++} ++ + /* Unwrap a superficially valid RFC 1964 token with a CFX-only context, with + * regular and IOV unwrap. */ + static void +@@ -238,6 +257,134 @@ test_bogus_1964_token(gss_ctx_id_t ctx) + free(in.value); + } + ++static void ++test_cfx_altered_ec(gss_ctx_id_t ctx, krb5_key subkey) ++{ ++ OM_uint32 major, minor; ++ uint8_t tokbuf[128], plainbuf[24]; ++ krb5_data plain; ++ krb5_enc_data cipher; ++ gss_buffer_desc in, out; ++ gss_iov_buffer_desc iov[2]; ++ ++ /* Construct a header with a plaintext EC value of 3. */ ++ write_cfx_header(3, tokbuf); ++ ++ /* Encrypt a plaintext and a copy of the header with the EC value 0. */ ++ memcpy(plainbuf, "truncate", 8); ++ memcpy(plainbuf + 8, tokbuf, 16); ++ store_16_be(0, plainbuf + 12); ++ plain = make_data(plainbuf, 24); ++ cipher.ciphertext.data = (char *)tokbuf + 16; ++ cipher.ciphertext.length = sizeof(tokbuf) - 16; ++ cipher.enctype = subkey->keyblock.enctype; ++ if (krb5_k_encrypt(NULL, subkey, KG_USAGE_INITIATOR_SEAL, NULL, ++ &plain, &cipher) != 0) ++ abort(); ++ ++ /* Verify that the token is rejected by gss_unwrap(). */ ++ in.value = tokbuf; ++ in.length = 16 + cipher.ciphertext.length; ++ major = gss_unwrap(&minor, ctx, &in, &out, NULL, NULL); ++ if (major != GSS_S_DEFECTIVE_TOKEN) ++ abort(); ++ (void)gss_release_buffer(&minor, &out); ++ ++ /* Verify that the token is rejected by gss_unwrap_iov(). */ ++ iov[0].type = GSS_IOV_BUFFER_TYPE_STREAM; ++ iov[0].buffer = in; ++ iov[1].type = GSS_IOV_BUFFER_TYPE_DATA; ++ major = gss_unwrap_iov(&minor, ctx, NULL, NULL, iov, 2); ++ if (major != GSS_S_DEFECTIVE_TOKEN) ++ abort(); ++} ++ ++static void ++test_cfx_short_plaintext(gss_ctx_id_t ctx, krb5_key subkey) ++{ ++ OM_uint32 major, minor; ++ uint8_t tokbuf[128], zerobyte = 0; ++ krb5_data plain; ++ krb5_enc_data cipher; ++ gss_buffer_desc in, out; ++ ++ write_cfx_header(0, tokbuf); ++ ++ /* Encrypt a single byte, with no copy of the header. */ ++ plain = make_data(&zerobyte, 1); ++ cipher.ciphertext.data = (char *)tokbuf + 16; ++ cipher.ciphertext.length = sizeof(tokbuf) - 16; ++ cipher.enctype = subkey->keyblock.enctype; ++ if (krb5_k_encrypt(NULL, subkey, KG_USAGE_INITIATOR_SEAL, NULL, ++ &plain, &cipher) != 0) ++ abort(); ++ ++ /* Verify that the token is rejected by gss_unwrap(). */ ++ in.value = tokbuf; ++ in.length = 16 + cipher.ciphertext.length; ++ major = gss_unwrap(&minor, ctx, &in, &out, NULL, NULL); ++ if (major != GSS_S_DEFECTIVE_TOKEN) ++ abort(); ++ (void)gss_release_buffer(&minor, &out); ++} ++ ++static void ++test_cfx_large_ec(gss_ctx_id_t ctx, krb5_key subkey) ++{ ++ OM_uint32 major, minor; ++ uint8_t tokbuf[128] = { 0 }, plainbuf[20]; ++ krb5_data plain; ++ krb5_enc_data cipher; ++ gss_buffer_desc in, out; ++ ++ /* Construct a header with an EC value of 5. */ ++ write_cfx_header(5, tokbuf); ++ ++ /* Encrypt a 4-byte plaintext plus the header. */ ++ memcpy(plainbuf, "abcd", 4); ++ memcpy(plainbuf + 4, tokbuf, 16); ++ plain = make_data(plainbuf, 20); ++ cipher.ciphertext.data = (char *)tokbuf + 16; ++ cipher.ciphertext.length = sizeof(tokbuf) - 16; ++ cipher.enctype = subkey->keyblock.enctype; ++ if (krb5_k_encrypt(NULL, subkey, KG_USAGE_INITIATOR_SEAL, NULL, ++ &plain, &cipher) != 0) ++ abort(); ++ ++ /* Verify that the token is rejected by gss_unwrap(). */ ++ in.value = tokbuf; ++ in.length = 16 + cipher.ciphertext.length; ++ major = gss_unwrap(&minor, ctx, &in, &out, NULL, NULL); ++ if (major != GSS_S_DEFECTIVE_TOKEN) ++ abort(); ++ (void)gss_release_buffer(&minor, &out); ++} ++ ++static void ++test_iov_large_asn1_wrapper(gss_ctx_id_t ctx) ++{ ++ OM_uint32 minor, major; ++ uint8_t databuf[10] = { 0 }; ++ gss_iov_buffer_desc iov[2]; ++ ++ /* ++ * In this IOV array, the header contains a DER tag with a dangling eight ++ * bytes of length field. The data IOV indicates a total token length ++ * sufficient to contain the length bytes. ++ */ ++ iov[0].type = GSS_IOV_BUFFER_TYPE_HEADER; ++ iov[0].buffer.value = ealloc(2); ++ iov[0].buffer.length = 2; ++ memcpy(iov[0].buffer.value, "\x60\x88", 2); ++ iov[1].type = GSS_IOV_BUFFER_TYPE_DATA; ++ iov[1].buffer.value = databuf; ++ iov[1].buffer.length = 10; ++ major = gss_unwrap_iov(&minor, ctx, NULL, NULL, iov, 2); ++ if (major != GSS_S_DEFECTIVE_TOKEN) ++ abort(); ++ free(iov[0].buffer.value); ++} ++ + /* Process wrap and MIC tokens with incomplete headers. */ + static void + test_short_header(gss_ctx_id_t ctx) +@@ -387,9 +534,7 @@ try_accept(void *value, size_t len) + gss_ctx_id_t ctx = GSS_C_NO_CONTEXT; + + /* Copy the provided value to make input overruns more obvious. */ +- in.value = malloc(len); +- if (in.value == NULL) +- abort(); ++ in.value = ealloc(len); + memcpy(in.value, value, len); + in.length = len; + (void)gss_accept_sec_context(&minor, &ctx, GSS_C_NO_CREDENTIAL, &in, +@@ -424,11 +569,23 @@ test_short_encapsulation() + int + main(int argc, char **argv) + { ++ krb5_keyblock kb; ++ krb5_key cfx_subkey; + gss_ctx_id_t ctx; + size_t i; + +- ctx = make_fake_cfx_context(); ++ kb.enctype = ENCTYPE_AES128_CTS_HMAC_SHA1_96; ++ kb.length = 16; ++ kb.contents = (unsigned char *)"1234567887654321"; ++ if (krb5_k_create_key(NULL, &kb, &cfx_subkey) != 0) ++ abort(); ++ ++ ctx = make_fake_cfx_context(cfx_subkey); + test_bogus_1964_token(ctx); ++ test_cfx_altered_ec(ctx, cfx_subkey); ++ test_cfx_short_plaintext(ctx, cfx_subkey); ++ test_cfx_large_ec(ctx, cfx_subkey); ++ test_iov_large_asn1_wrapper(ctx); + free_fake_context(ctx); + + for (i = 0; i < sizeof(tests) / sizeof(*tests); i++) { +-- +2.33.0 + diff --git a/krb5-cve-2022-42898.patch b/krb5-cve-2022-42898.patch new file mode 100644 index 0000000000000000000000000000000000000000..df02358469cf5197cc2e589866a6d4d494f32984 --- /dev/null +++ b/krb5-cve-2022-42898.patch @@ -0,0 +1,84 @@ +From ea92d2f0fcceb54a70910fa32e9a0d7a5afc3583 Mon Sep 17 00:00:00 2001 +From: Greg Hudson +Date: Mon, 17 Oct 2022 20:25:11 -0400 +Subject: [PATCH] Fix integer overflows in PAC parsing + +In krb5_parse_pac(), check for buffer counts large enough to threaten +integer overflow in the header length and memory length calculations. +Avoid potential integer overflows when checking the length of each +buffer. Credit to OSS-Fuzz for discovering one of the issues. + +CVE-2022-42898: + +In MIT krb5 releases 1.8 and later, an authenticated attacker may be +able to cause a KDC or kadmind process to crash by reading beyond the +bounds of allocated memory, creating a denial of service. A +privileged attacker may similarly be able to cause a Kerberos or GSS +application service to crash. On 32-bit platforms, an attacker can +also cause insufficient memory to be allocated for the result, +potentially leading to remote code execution in a KDC, kadmind, or GSS +or Kerberos application server process. An attacker with the +privileges of a cross-realm KDC may be able to extract secrets from a +KDC process's memory by having them copied into the PAC of a new +ticket. + +ticket: 9074 (new) +tags: pullup +target_version: 1.20-next +target_version: 1.19-next +--- + src/lib/krb5/krb/pac.c | 9 +++++++-- + src/lib/krb5/krb/t_pac.c | 18 ++++++++++++++++++ + 2 files changed, 25 insertions(+), 2 deletions(-) + +diff --git a/src/lib/krb5/krb/pac.c b/src/lib/krb5/krb/pac.c +index 2f1df8d42..f6c4373de 100644 +--- a/src/lib/krb5/krb/pac.c ++++ b/src/lib/krb5/krb/pac.c +*** 26,31 **** +--- 26,32 ---- + + #include "k5-int.h" + #include "authdata.h" ++ #define MAX_BUFFERS 4096 + + /* draft-brezak-win2k-krb-authz-00 */ +diff --git a/src/lib/krb5/krb/t_pac.c b/src/lib/krb5/krb/t_pac.c +index 0b1b1f056..173bde7ba 100644 +--- a/src/lib/krb5/krb/t_pac.c ++++ b/src/lib/krb5/krb/t_pac.c +@@ -431,6 +431,16 @@ static const unsigned char s4u_pac_ent_xrealm[] = { + 0x8a, 0x81, 0x9c, 0x9c, 0x00, 0x00, 0x00, 0x00 + }; + ++static const unsigned char fuzz1[] = { ++ 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, ++ 0x06, 0xff, 0xff, 0xff, 0x00, 0x00, 0xf5 ++}; ++ ++static const unsigned char fuzz2[] = { ++ 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, ++ 0x20, 0x20 ++}; ++ + static const char *s4u_principal = "w2k8u@ACME.COM"; + static const char *s4u_enterprise = "w2k8u@abc@ACME.COM"; + +@@ -828,6 +838,14 @@ main(int argc, char **argv) + krb5_free_principal(context, sep); + } + ++ /* Check problematic PACs found by fuzzing. */ ++ ret = krb5_pac_parse(context, fuzz1, sizeof(fuzz1), &pac); ++ if (!ret) ++ err(context, ret, "krb5_pac_parse should have failed"); ++ ret = krb5_pac_parse(context, fuzz2, sizeof(fuzz2), &pac); ++ if (!ret) ++ err(context, ret, "krb5_pac_parse should have failed"); ++ + /* + * Test empty free + */ +-- +2.32.0.windows.1 + diff --git a/krb5.patch b/krb5.patch new file mode 100644 index 0000000000000000000000000000000000000000..971c5236198d0d806951b671e0b5105af485fe93 --- /dev/null +++ b/krb5.patch @@ -0,0 +1,4011 @@ +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/appl/gss-sample/Makefile.in krb5_edit/src/appl/gss-sample/Makefile.in +*** krb5/src/appl/gss-sample/Makefile.in 2022-08-26 16:04:07.044000000 +0800 +--- krb5_edit/src/appl/gss-sample/Makefile.in 2022-08-26 16:03:34.940000000 +0800 +*************** +*** 26,35 **** + ##WIN32##all-windows: $(OUTPRE)gss-server.exe $(OUTPRE)gss-client.exe + + gss-server: gss-server.o gss-misc.o $(GSS_DEPLIBS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o gss-server gss-server.o gss-misc.o $(GSS_LIBS) $(KRB5_BASE_LIBS) + + gss-client: gss-client.o gss-misc.o $(GSS_DEPLIBS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o gss-client gss-client.o gss-misc.o $(GSS_LIBS) $(KRB5_BASE_LIBS) + + ##WIN32##$(GSSSERVER): $(OUTPRE)gss-server.obj $(OUTPRE)gss-misc.obj $(GLIB) $(KLIB) $(SERVERRES) + ##WIN32## link $(EXE_LINKOPTS) -out:$@ $** ws2_32.lib +--- 26,35 ---- + ##WIN32##all-windows: $(OUTPRE)gss-server.exe $(OUTPRE)gss-client.exe + + gss-server: gss-server.o gss-misc.o $(GSS_DEPLIBS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o gss-server gss-server.o gss-misc.o $(GSS_LIBS) $(KRB5_BASE_LIBS) + + gss-client: gss-client.o gss-misc.o $(GSS_DEPLIBS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o gss-client gss-client.o gss-misc.o $(GSS_LIBS) $(KRB5_BASE_LIBS) + + ##WIN32##$(GSSSERVER): $(OUTPRE)gss-server.obj $(OUTPRE)gss-misc.obj $(GLIB) $(KLIB) $(SERVERRES) + ##WIN32## link $(EXE_LINKOPTS) -out:$@ $** ws2_32.lib +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/appl/sample/sclient/Makefile.in krb5_edit/src/appl/sample/sclient/Makefile.in +*** krb5/src/appl/sample/sclient/Makefile.in 2022-08-26 16:04:07.044000000 +0800 +--- krb5_edit/src/appl/sample/sclient/Makefile.in 2022-08-26 16:03:34.944000000 +0800 +*************** +*** 4,10 **** + all: sclient + + sclient: sclient.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o sclient sclient.o $(KRB5_BASE_LIBS) + + clean: + $(RM) sclient.o sclient +--- 4,10 ---- + all: sclient + + sclient: sclient.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o sclient sclient.o $(KRB5_BASE_LIBS) + + clean: + $(RM) sclient.o sclient +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/appl/sample/sserver/Makefile.in krb5_edit/src/appl/sample/sserver/Makefile.in +*** krb5/src/appl/sample/sserver/Makefile.in 2022-08-26 16:04:07.044000000 +0800 +--- krb5_edit/src/appl/sample/sserver/Makefile.in 2022-08-26 16:03:34.944000000 +0800 +*************** +*** 4,10 **** + all: sserver + + sserver: sserver.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o sserver sserver.o $(KRB5_BASE_LIBS) + + clean: + $(RM) sserver.o sserver +--- 4,10 ---- + all: sserver + + sserver: sserver.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o sserver sserver.o $(KRB5_BASE_LIBS) + + clean: + $(RM) sserver.o sserver +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/appl/simple/client/Makefile.in krb5_edit/src/appl/simple/client/Makefile.in +*** krb5/src/appl/simple/client/Makefile.in 2022-08-26 16:04:07.044000000 +0800 +--- krb5_edit/src/appl/simple/client/Makefile.in 2022-08-26 16:03:34.944000000 +0800 +*************** +*** 6,12 **** + LOCALINCLUDES= -I$(srcdir)/.. + + sim_client: sim_client.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o sim_client sim_client.o $(KRB5_BASE_LIBS) + + install: + $(INSTALL_PROGRAM) sim_client $(DESTDIR)$(CLIENT_BINDIR)/sim_client +--- 6,12 ---- + LOCALINCLUDES= -I$(srcdir)/.. + + sim_client: sim_client.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o sim_client sim_client.o $(KRB5_BASE_LIBS) + + install: + $(INSTALL_PROGRAM) sim_client $(DESTDIR)$(CLIENT_BINDIR)/sim_client +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/appl/simple/server/Makefile.in krb5_edit/src/appl/simple/server/Makefile.in +*** krb5/src/appl/simple/server/Makefile.in 2022-08-26 16:04:07.044000000 +0800 +--- krb5_edit/src/appl/simple/server/Makefile.in 2022-08-26 16:03:34.944000000 +0800 +*************** +*** 6,12 **** + all: sim_server + + sim_server: sim_server.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o sim_server sim_server.o $(KRB5_BASE_LIBS) + + install: + $(INSTALL_PROGRAM) sim_server $(DESTDIR)$(SERVER_BINDIR)/sim_server +--- 6,12 ---- + all: sim_server + + sim_server: sim_server.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o sim_server sim_server.o $(KRB5_BASE_LIBS) + + install: + $(INSTALL_PROGRAM) sim_server $(DESTDIR)$(SERVER_BINDIR)/sim_server +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/appl/user_user/Makefile.in krb5_edit/src/appl/user_user/Makefile.in +*** krb5/src/appl/user_user/Makefile.in 2022-08-26 16:04:07.044000000 +0800 +--- krb5_edit/src/appl/user_user/Makefile.in 2022-08-26 16:03:34.944000000 +0800 +*************** +*** 9,18 **** + $(RUNPYTEST) $(srcdir)/t_user2user.py $(PYTESTFLAGS) + + uuclient: client.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o uuclient client.o $(KRB5_BASE_LIBS) + + uuserver: server.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o uuserver server.o $(KRB5_BASE_LIBS) + + install: + $(INSTALL_PROGRAM) uuclient $(DESTDIR)$(CLIENT_BINDIR)/uuclient +--- 9,18 ---- + $(RUNPYTEST) $(srcdir)/t_user2user.py $(PYTESTFLAGS) + + uuclient: client.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o uuclient client.o $(KRB5_BASE_LIBS) + + uuserver: server.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o uuserver server.o $(KRB5_BASE_LIBS) + + install: + $(INSTALL_PROGRAM) uuclient $(DESTDIR)$(CLIENT_BINDIR)/uuclient +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/build-tools/krb5-config.in krb5_edit/src/build-tools/krb5-config.in +*** krb5/src/build-tools/krb5-config.in 2022-08-26 16:04:07.044000000 +0800 +--- krb5_edit/src/build-tools/krb5-config.in 2022-08-26 16:03:34.944000000 +0800 +*************** +*** 241,257 **** + fi + + if test $library = 'gssrpc'; then +! lib_flags="$lib_flags -lgssrpc" + library=gssapi + fi + + if test $library = 'gssapi'; then +! lib_flags="$lib_flags -lgssapi_krb5" + library=krb5 + fi + + if test $library = 'krb5'; then +! lib_flags="$lib_flags -lkrb5 -lk5crypto -lcom_err" + fi + + # If we ever support a flag to generate output suitable for static +--- 241,257 ---- + fi + + if test $library = 'gssrpc'; then +! lib_flags="$lib_flags -lgssrpc_gauss" + library=gssapi + fi + + if test $library = 'gssapi'; then +! lib_flags="$lib_flags -lgssapi_krb5_gauss" + library=krb5 + fi + + if test $library = 'krb5'; then +! lib_flags="$lib_flags -lkrb5_gauss -lk5crypto_gauss -lcom_err_gauss" + fi + + # If we ever support a flag to generate output suitable for static +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/build-tools/krb5.pc.in krb5_edit/src/build-tools/krb5.pc.in +*** krb5/src/build-tools/krb5.pc.in 2022-08-26 16:04:07.044000000 +0800 +--- krb5_edit/src/build-tools/krb5.pc.in 2022-08-26 16:03:34.944000000 +0800 +*************** +*** 8,14 **** + defktname=@DEFKTNAME@ + defcktname=@DEFCKTNAME@ + +! Name: krb5 + Description: An implementation of Kerberos network authentication + Version: @KRB5_VERSION@ + Requires: mit-krb5 +--- 8,14 ---- + defktname=@DEFKTNAME@ + defcktname=@DEFCKTNAME@ + +! Name: krb5_gauss + Description: An implementation of Kerberos network authentication + Version: @KRB5_VERSION@ + Requires: mit-krb5 +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/ccapi/lib/Makefile.in krb5_edit/src/ccapi/lib/Makefile.in +*** krb5/src/ccapi/lib/Makefile.in 2022-08-26 16:04:07.048000000 +0800 +--- krb5_edit/src/ccapi/lib/Makefile.in 2022-08-26 16:03:34.948000000 +0800 +*************** +*** 4,10 **** + LOCALINCLUDES=-I$(srcdir)/../common -I. + + SHLIB_EXPDEPS= $(COM_ERR_DEPLIB) $(SUPPORT_DEPLIB) +! SHLIB_EXPLIBS=-lcom_err $(SUPPORT_LIB) + RELDIR=../ccapi/lib + + LIBBASE=krb5-ccapi +--- 4,10 ---- + LOCALINCLUDES=-I$(srcdir)/../common -I. + + SHLIB_EXPDEPS= $(COM_ERR_DEPLIB) $(SUPPORT_DEPLIB) +! SHLIB_EXPLIBS=-lcom_err_gauss $(SUPPORT_LIB) + RELDIR=../ccapi/lib + + LIBBASE=krb5-ccapi +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/clients/kcpytkt/Makefile.in krb5_edit/src/clients/kcpytkt/Makefile.in +*** krb5/src/clients/kcpytkt/Makefile.in 2022-08-26 16:04:07.060000000 +0800 +--- krb5_edit/src/clients/kcpytkt/Makefile.in 2022-08-26 16:03:34.956000000 +0800 +*************** +*** 16,22 **** + all-mac: + + kcpytkt: kcpytkt.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o $@ kcpytkt.o $(KRB5_BASE_LIBS) + + ##WIN32##$(KCPYTKT): $(OUTPRE)kcpytkt.obj $(SLIB) $(KLIB) $(CLIB) $(EXERES) + ##WIN32## link $(EXE_LINKOPTS) /out:$@ $** +--- 16,22 ---- + all-mac: + + kcpytkt: kcpytkt.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o $@ kcpytkt.o $(KRB5_BASE_LIBS) + + ##WIN32##$(KCPYTKT): $(OUTPRE)kcpytkt.obj $(SLIB) $(KLIB) $(CLIB) $(EXERES) + ##WIN32## link $(EXE_LINKOPTS) /out:$@ $** +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/clients/kdeltkt/Makefile.in krb5_edit/src/clients/kdeltkt/Makefile.in +*** krb5/src/clients/kdeltkt/Makefile.in 2022-08-26 16:04:07.060000000 +0800 +--- krb5_edit/src/clients/kdeltkt/Makefile.in 2022-08-26 16:03:34.956000000 +0800 +*************** +*** 16,22 **** + all-mac: + + kdeltkt: kdeltkt.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o $@ kdeltkt.o $(KRB5_BASE_LIBS) + + ##WIN32##$(KDELTKT): $(OUTPRE)kdeltkt.obj $(SLIB) $(KLIB) $(CLIB) $(EXERES) + ##WIN32## link $(EXE_LINKOPTS) /out:$@ $** +--- 16,22 ---- + all-mac: + + kdeltkt: kdeltkt.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o $@ kdeltkt.o $(KRB5_BASE_LIBS) + + ##WIN32##$(KDELTKT): $(OUTPRE)kdeltkt.obj $(SLIB) $(KLIB) $(CLIB) $(EXERES) + ##WIN32## link $(EXE_LINKOPTS) /out:$@ $** +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/clients/kdestroy/Makefile.in krb5_edit/src/clients/kdestroy/Makefile.in +*** krb5/src/clients/kdestroy/Makefile.in 2022-08-26 16:04:07.060000000 +0800 +--- krb5_edit/src/clients/kdestroy/Makefile.in 2022-08-26 16:03:34.956000000 +0800 +*************** +*** 19,25 **** + ##WIN32##all-windows: $(KDESTROY) + + kdestroy: kdestroy.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o $@ kdestroy.o $(KRB5_BASE_LIBS) + + ##WIN32##$(KDESTROY): $(OUTPRE)kdestroy.obj $(SLIB) $(KLIB) $(CLIB) $(EXERES) + ##WIN32## link $(EXE_LINKOPTS) -out:$@ $** +--- 19,25 ---- + ##WIN32##all-windows: $(KDESTROY) + + kdestroy: kdestroy.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o $@ kdestroy.o $(KRB5_BASE_LIBS) + + ##WIN32##$(KDESTROY): $(OUTPRE)kdestroy.obj $(SLIB) $(KLIB) $(CLIB) $(EXERES) + ##WIN32## link $(EXE_LINKOPTS) -out:$@ $** +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/clients/kinit/Makefile.in krb5_edit/src/clients/kinit/Makefile.in +*** krb5/src/clients/kinit/Makefile.in 2022-08-26 16:04:07.060000000 +0800 +--- krb5_edit/src/clients/kinit/Makefile.in 2022-08-26 16:03:34.956000000 +0800 +*************** +*** 18,24 **** + ##WIN32##all-windows: $(KINIT) + + kinit: kinit.o kinit_kdb.o $(KRB5_BASE_DEPLIBS) $(KADMSRV_DEPLIBS) +! $(CC_LINK) -o $@ kinit.o kinit_kdb.o $(KADMSRV_LIBS) $(KRB5_BASE_LIBS) + + ##WIN32##$(KINIT): $(OUTPRE)kinit.obj $(SLIB) $(KLIB) $(CLIB) $(EXERES) + ##WIN32## link $(EXE_LINKOPTS) -out:$@ $** advapi32.lib +--- 18,24 ---- + ##WIN32##all-windows: $(KINIT) + + kinit: kinit.o kinit_kdb.o $(KRB5_BASE_DEPLIBS) $(KADMSRV_DEPLIBS) +! $(CC_LINK) -pie -o $@ kinit.o kinit_kdb.o $(KADMSRV_LIBS) $(KRB5_BASE_LIBS) + + ##WIN32##$(KINIT): $(OUTPRE)kinit.obj $(SLIB) $(KLIB) $(CLIB) $(EXERES) + ##WIN32## link $(EXE_LINKOPTS) -out:$@ $** advapi32.lib +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/clients/klist/Makefile.in krb5_edit/src/clients/klist/Makefile.in +*** krb5/src/clients/klist/Makefile.in 2022-08-26 16:04:07.060000000 +0800 +--- krb5_edit/src/clients/klist/Makefile.in 2022-08-26 16:03:34.960000000 +0800 +*************** +*** 19,25 **** + ##WIN32##all-windows: $(KLIST) + + klist: klist.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o $@ klist.o $(KRB5_BASE_LIBS) + + ##WIN32##$(KLIST): $(OUTPRE)klist.obj $(SLIB) $(KLIB) $(CLIB) $(EXERES) + ##WIN32## link $(EXE_LINKOPTS) -out:$@ $** ws2_32.lib +--- 19,25 ---- + ##WIN32##all-windows: $(KLIST) + + klist: klist.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o $@ klist.o $(KRB5_BASE_LIBS) + + ##WIN32##$(KLIST): $(OUTPRE)klist.obj $(SLIB) $(KLIB) $(CLIB) $(EXERES) + ##WIN32## link $(EXE_LINKOPTS) -out:$@ $** ws2_32.lib +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/clients/kpasswd/Makefile.in krb5_edit/src/clients/kpasswd/Makefile.in +*** krb5/src/clients/kpasswd/Makefile.in 2022-08-26 16:04:07.060000000 +0800 +--- krb5_edit/src/clients/kpasswd/Makefile.in 2022-08-26 16:03:34.960000000 +0800 +*************** +*** 4,10 **** + SRCS=kpasswd.c + + kpasswd: kpasswd.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o kpasswd kpasswd.o $(KRB5_BASE_LIBS) + + kpasswd.o: $(srcdir)/kpasswd.c + +--- 4,10 ---- + SRCS=kpasswd.c + + kpasswd: kpasswd.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o kpasswd kpasswd.o $(KRB5_BASE_LIBS) + + kpasswd.o: $(srcdir)/kpasswd.c + +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/clients/ksu/Makefile.in krb5_edit/src/clients/ksu/Makefile.in +*** krb5/src/clients/ksu/Makefile.in 2022-08-26 16:04:07.060000000 +0800 +--- krb5_edit/src/clients/ksu/Makefile.in 2022-08-26 16:03:34.960000000 +0800 +*************** +*** 23,29 **** + all: ksu + + ksu: $(OBJS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o $@ $(OBJS) $(KRB5_BASE_LIBS) $(KSU_LIBS) + + clean: + $(RM) ksu +--- 23,29 ---- + all: ksu + + ksu: $(OBJS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o $@ $(OBJS) $(KRB5_BASE_LIBS) $(KSU_LIBS) + + clean: + $(RM) ksu +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/clients/kswitch/Makefile.in krb5_edit/src/clients/kswitch/Makefile.in +*** krb5/src/clients/kswitch/Makefile.in 2022-08-26 16:04:07.060000000 +0800 +--- krb5_edit/src/clients/kswitch/Makefile.in 2022-08-26 16:03:34.960000000 +0800 +*************** +*** 17,23 **** + ##WIN32##all-windows: $(KSWITCH) + + kswitch: kswitch.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o $@ kswitch.o $(KRB5_BASE_LIBS) + + ##WIN32##$(KSWITCH): $(OUTPRE)kswitch.obj $(SLIB) $(KLIB) $(CLIB) $(EXERES) + ##WIN32## link $(EXE_LINKOPTS) -out:$@ $** +--- 17,23 ---- + ##WIN32##all-windows: $(KSWITCH) + + kswitch: kswitch.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o $@ kswitch.o $(KRB5_BASE_LIBS) + + ##WIN32##$(KSWITCH): $(OUTPRE)kswitch.obj $(SLIB) $(KLIB) $(CLIB) $(EXERES) + ##WIN32## link $(EXE_LINKOPTS) -out:$@ $** +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/clients/kvno/Makefile.in krb5_edit/src/clients/kvno/Makefile.in +*** krb5/src/clients/kvno/Makefile.in 2022-08-26 16:04:07.060000000 +0800 +--- krb5_edit/src/clients/kvno/Makefile.in 2022-08-26 16:03:34.960000000 +0800 +*************** +*** 20,26 **** + ##WIN32##all-windows: $(KVNO) + + kvno: kvno.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o $@ kvno.o $(KRB5_BASE_LIBS) + + ##WIN32##$(KVNO): $(OUTPRE)kvno.obj $(SLIB) $(KLIB) $(CLIB) $(EXERES) + ##WIN32## link $(EXE_LINKOPTS) /out:$@ $** +--- 20,26 ---- + ##WIN32##all-windows: $(KVNO) + + kvno: kvno.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o $@ kvno.o $(KRB5_BASE_LIBS) + + ##WIN32##$(KVNO): $(OUTPRE)kvno.obj $(SLIB) $(KLIB) $(CLIB) $(EXERES) + ##WIN32## link $(EXE_LINKOPTS) /out:$@ $** +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/config/pre.in krb5_edit/src/config/pre.in +*** krb5/src/config/pre.in 2022-08-26 16:04:07.064000000 +0800 +--- krb5_edit/src/config/pre.in 2022-08-26 16:03:34.964000000 +0800 +*************** +*** 284,290 **** + # + # invocation is like: + # prog: foo.o bar.o $(KRB5_BASE_DEPLIBS) +! # $(CC_LINK) -o $@ foo.o bar.o $(KRB5_BASE_LIBS) + + CC_LINK=@CC_LINK@ $(ASAN_FLAGS) + CXX_LINK=@CXX_LINK@ $(ASAN_FLAGS) +--- 284,290 ---- + # + # invocation is like: + # prog: foo.o bar.o $(KRB5_BASE_DEPLIBS) +! # $(CC_LINK) -pie -o $@ foo.o bar.o $(KRB5_BASE_LIBS) + + CC_LINK=@CC_LINK@ $(ASAN_FLAGS) + CXX_LINK=@CXX_LINK@ $(ASAN_FLAGS) +*************** +*** 323,337 **** + KADMCLNT_DEPLIB = $(TOPLIBD)/libkadm5clnt_mit$(DEPLIBEXT) + KADMSRV_DEPLIB = $(TOPLIBD)/libkadm5srv_mit$(DEPLIBEXT) + KDB5_DEPLIB = $(TOPLIBD)/libkdb5$(DEPLIBEXT) +! GSSRPC_DEPLIB = $(TOPLIBD)/libgssrpc$(DEPLIBEXT) +! GSS_DEPLIB = $(TOPLIBD)/libgssapi_krb5$(DEPLIBEXT) +! KRB5_DEPLIB = $(TOPLIBD)/libkrb5$(DEPLIBEXT) +! CRYPTO_DEPLIB = $(TOPLIBD)/libk5crypto$(DEPLIBEXT) + COM_ERR_DEPLIB = $(COM_ERR_DEPLIB-@COM_ERR_VERSION@) + COM_ERR_DEPLIB-sys = # empty + COM_ERR_DEPLIB-intlsys = # empty +! COM_ERR_DEPLIB-k5 = $(TOPLIBD)/libcom_err$(DEPLIBEXT) +! SUPPORT_LIBNAME=krb5support + SUPPORT_DEPLIB = $(TOPLIBD)/lib$(SUPPORT_LIBNAME)$(DEPLIBEXT) + + # These are forced to use ".a" as an extension because they're never +--- 323,337 ---- + KADMCLNT_DEPLIB = $(TOPLIBD)/libkadm5clnt_mit$(DEPLIBEXT) + KADMSRV_DEPLIB = $(TOPLIBD)/libkadm5srv_mit$(DEPLIBEXT) + KDB5_DEPLIB = $(TOPLIBD)/libkdb5$(DEPLIBEXT) +! GSSRPC_DEPLIB = $(TOPLIBD)/libgssrpc_gauss$(DEPLIBEXT) +! GSS_DEPLIB = $(TOPLIBD)/libgssapi_krb5_gauss$(DEPLIBEXT) +! KRB5_DEPLIB = $(TOPLIBD)/libkrb5_gauss$(DEPLIBEXT) +! CRYPTO_DEPLIB = $(TOPLIBD)/libk5crypto_gauss$(DEPLIBEXT) + COM_ERR_DEPLIB = $(COM_ERR_DEPLIB-@COM_ERR_VERSION@) + COM_ERR_DEPLIB-sys = # empty + COM_ERR_DEPLIB-intlsys = # empty +! COM_ERR_DEPLIB-k5 = $(TOPLIBD)/libcom_err_gauss$(DEPLIBEXT) +! SUPPORT_LIBNAME=krb5support_gauss + SUPPORT_DEPLIB = $(TOPLIBD)/lib$(SUPPORT_LIBNAME)$(DEPLIBEXT) + + # These are forced to use ".a" as an extension because they're never +*************** +*** 393,402 **** + LDAP_LIBS = @LDAP_LIBS@ + LMDB_LIBS = @LMDB_LIBS@ + +! KRB5_LIB = -lkrb5 +! K5CRYPTO_LIB = -lk5crypto +! COM_ERR_LIB = -lcom_err +! GSS_KRB5_LIB = -lgssapi_krb5 + SUPPORT_LIB = -l$(SUPPORT_LIBNAME) + + # HESIOD_LIBS is -lhesiod... +--- 393,402 ---- + LDAP_LIBS = @LDAP_LIBS@ + LMDB_LIBS = @LMDB_LIBS@ + +! KRB5_LIB = -lkrb5_gauss +! K5CRYPTO_LIB = -lk5crypto_gauss +! COM_ERR_LIB = -lcom_err_gauss +! GSS_KRB5_LIB = -lgssapi_krb5_gauss + SUPPORT_LIB = -l$(SUPPORT_LIBNAME) + + # HESIOD_LIBS is -lhesiod... +*************** +*** 406,412 **** + KDB5_LIBS = $(KDB5_LIB) $(GSSRPC_LIBS) + GSS_LIBS = $(GSS_KRB5_LIB) + # needs fixing if ever used on macOS! +! GSSRPC_LIBS = -lgssrpc $(GSS_LIBS) + KADM_COMM_LIBS = $(GSSRPC_LIBS) + # need fixing if ever used on macOS! + KADMSRV_LIBS = -lkadm5srv_mit $(HESIOD_LIBS) $(KDB5_LIBS) $(KADM_COMM_LIBS) +--- 406,412 ---- + KDB5_LIBS = $(KDB5_LIB) $(GSSRPC_LIBS) + GSS_LIBS = $(GSS_KRB5_LIB) + # needs fixing if ever used on macOS! +! GSSRPC_LIBS = -lgssrpc_gauss $(GSS_LIBS) + KADM_COMM_LIBS = $(GSSRPC_LIBS) + # need fixing if ever used on macOS! + KADMSRV_LIBS = -lkadm5srv_mit $(HESIOD_LIBS) $(KDB5_LIBS) $(KADM_COMM_LIBS) +*************** +*** 496,502 **** + # + .SUFFIXES: .cpp .c .o + .c.o: +! $(CC) $(ALL_CFLAGS) -c $< + # Use .cpp because that's what autoconf uses in its test. + # If the compiler doesn't accept a .cpp suffix here, it wouldn't + # have accepted it when autoconf tested it. +--- 496,502 ---- + # + .SUFFIXES: .cpp .c .o + .c.o: +! $(CC) $(ALL_CFLAGS) -fPIC -c $< + # Use .cpp because that's what autoconf uses in its test. + # If the compiler doesn't accept a .cpp suffix here, it wouldn't + # have accepted it when autoconf tested it. +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/include/k5-int.h krb5_edit/src/include/k5-int.h +*** krb5/src/include/k5-int.h 2022-08-26 16:04:07.068000000 +0800 +--- krb5_edit/src/include/k5-int.h 2022-08-26 16:03:34.968000000 +0800 +*************** +*** 2407,2410 **** +--- 2407,2413 ---- + #define k5_prependmsg krb5_prepend_error_message + #define k5_wrapmsg krb5_wrap_error_message + ++ extern __thread char *G_DEFAULT_PROFILE_PATH; ++ extern __thread char *G_DEFAULT_CACHE_PATH; ++ + #endif /* _KRB5_INT_H */ +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/include/krb5/krb5.hin krb5_edit/src/include/krb5/krb5.hin +*** krb5/src/include/krb5/krb5.hin 2022-08-26 16:04:07.076000000 +0800 +--- krb5_edit/src/include/krb5/krb5.hin 2022-08-26 16:03:34.972000000 +0800 +*************** +*** 2899,2904 **** +--- 2899,2908 ---- + #define KRB5_INIT_CONTEXT_SECURE 0x1 /**< Use secure context configuration */ + #define KRB5_INIT_CONTEXT_KDC 0x2 /**< Use KDC configuration if available */ + ++ extern void KRB5_CALLCONV krb5_set_profile_path(char *profile_path); ++ extern void KRB5_CALLCONV krb5_set_cache_path(char *cache_path); ++ extern void KRB5_CALLCONV krb5_clean_cache_profile_path(); ++ + /** + * Create a krb5 library context. + * +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/kadmin/cli/Makefile.in krb5_edit/src/kadmin/cli/Makefile.in +*** krb5/src/kadmin/cli/Makefile.in 2022-08-26 16:04:07.076000000 +0800 +--- krb5_edit/src/kadmin/cli/Makefile.in 2022-08-26 16:03:34.976000000 +0800 +*************** +*** 14,23 **** + all: $(PROG).local $(PROG) + + $(PROG).local: $(LOCAL_OBJS) $(SS_DEPLIB) $(KADMSRV_DEPLIBS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o $(PROG).local $(LOCAL_OBJS) $(SS_LIB) $(KADMSRV_LIBS) $(KDB_DEP_LIB) $(KRB5_BASE_LIBS) + + $(PROG): $(KADMIN_OBJS) $(SS_DEPLIB) $(KADMCLNT_DEPLIBS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o $(PROG) $(KADMIN_OBJS) $(SS_LIB) $(KADMCLNT_LIBS) $(KRB5_BASE_LIBS) + + kadmin_ct.o: kadmin_ct.c + +--- 14,23 ---- + all: $(PROG).local $(PROG) + + $(PROG).local: $(LOCAL_OBJS) $(SS_DEPLIB) $(KADMSRV_DEPLIBS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o $(PROG).local $(LOCAL_OBJS) $(SS_LIB) $(KADMSRV_LIBS) $(KDB_DEP_LIB) $(KRB5_BASE_LIBS) + + $(PROG): $(KADMIN_OBJS) $(SS_DEPLIB) $(KADMCLNT_DEPLIBS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o $(PROG) $(KADMIN_OBJS) $(SS_LIB) $(KADMCLNT_LIBS) $(KRB5_BASE_LIBS) + + kadmin_ct.o: kadmin_ct.c + +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/kadmin/dbutil/Makefile.in krb5_edit/src/kadmin/dbutil/Makefile.in +*** krb5/src/kadmin/dbutil/Makefile.in 2022-08-26 16:04:07.076000000 +0800 +--- krb5_edit/src/kadmin/dbutil/Makefile.in 2022-08-26 16:03:34.976000000 +0800 +*************** +*** 19,25 **** + all: $(PROG) + + $(PROG): $(OBJS) $(KADMSRV_DEPLIBS) $(KRB5_BASE_DEPLIBS) $(GETDATE) +! $(CC_LINK) -o $(PROG) $(OBJS) $(GETDATE) $(KADMSRV_LIBS) $(KDB_DEP_LIB) $(KRB5_BASE_LIBS) + + import_err.c import_err.h: $(srcdir)/import_err.et + +--- 19,25 ---- + all: $(PROG) + + $(PROG): $(OBJS) $(KADMSRV_DEPLIBS) $(KRB5_BASE_DEPLIBS) $(GETDATE) +! $(CC_LINK) -pie -o $(PROG) $(OBJS) $(GETDATE) $(KADMSRV_LIBS) $(KDB_DEP_LIB) $(KRB5_BASE_LIBS) + + import_err.c import_err.h: $(srcdir)/import_err.et + +*************** +*** 35,41 **** + T_TDUMPUTIL_OBJS = t_tdumputil.o tdumputil.o + + t_tdumputil: $(T_TDUMPUTIL_OBJS) $(SUPPORT_DEPLIB) +! $(CC_LINK) -o $@ $(T_TDUMPUTIL_OBJS) $(SUPPORT_LIB) + + depend: import_err.h + +--- 35,41 ---- + T_TDUMPUTIL_OBJS = t_tdumputil.o tdumputil.o + + t_tdumputil: $(T_TDUMPUTIL_OBJS) $(SUPPORT_DEPLIB) +! $(CC_LINK) -pie -o $@ $(T_TDUMPUTIL_OBJS) $(SUPPORT_LIB) + + depend: import_err.h + +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/kadmin/ktutil/Makefile.in krb5_edit/src/kadmin/ktutil/Makefile.in +*** krb5/src/kadmin/ktutil/Makefile.in 2022-08-26 16:04:07.080000000 +0800 +--- krb5_edit/src/kadmin/ktutil/Makefile.in 2022-08-26 16:03:34.976000000 +0800 +*************** +*** 12,18 **** + all: ktutil + + ktutil: ktutil.o $(OBJS) $(SS_DEPLIB) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o ktutil $(OBJS) $(SS_LIB) $(KRB5_BASE_LIBS) + + install: + $(INSTALL_PROGRAM) ktutil ${DESTDIR}$(CLIENT_BINDIR)/ktutil +--- 12,18 ---- + all: ktutil + + ktutil: ktutil.o $(OBJS) $(SS_DEPLIB) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o ktutil $(OBJS) $(SS_LIB) $(KRB5_BASE_LIBS) + + install: + $(INSTALL_PROGRAM) ktutil ${DESTDIR}$(CLIENT_BINDIR)/ktutil +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/kadmin/server/Makefile.in krb5_edit/src/kadmin/server/Makefile.in +*** krb5/src/kadmin/server/Makefile.in 2022-08-26 16:04:07.080000000 +0800 +--- krb5_edit/src/kadmin/server/Makefile.in 2022-08-26 16:03:34.980000000 +0800 +*************** +*** 15,21 **** + all: $(PROG) + + $(PROG): $(OBJS) $(KADMSRV_DEPLIBS) $(KRB5_BASE_DEPLIBS) $(APPUTILS_DEPLIB) $(VERTO_DEPLIB) +! $(CC_LINK) -o $(PROG) $(OBJS) $(APPUTILS_LIB) $(KADMSRV_LIBS) $(KDB_DEP_LIB) $(KRB5_BASE_LIBS) $(VERTO_LIBS) + + install: + $(INSTALL_PROGRAM) $(PROG) ${DESTDIR}$(SERVER_BINDIR)/$(PROG) +--- 15,21 ---- + all: $(PROG) + + $(PROG): $(OBJS) $(KADMSRV_DEPLIBS) $(KRB5_BASE_DEPLIBS) $(APPUTILS_DEPLIB) $(VERTO_DEPLIB) +! $(CC_LINK) -pie -o $(PROG) $(OBJS) $(APPUTILS_LIB) $(KADMSRV_LIBS) $(KDB_DEP_LIB) $(KRB5_BASE_LIBS) $(VERTO_LIBS) + + install: + $(INSTALL_PROGRAM) $(PROG) ${DESTDIR}$(SERVER_BINDIR)/$(PROG) +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/kadmin/testing/util/Makefile.in krb5_edit/src/kadmin/testing/util/Makefile.in +*** krb5/src/kadmin/testing/util/Makefile.in 2022-08-26 16:04:07.084000000 +0800 +--- krb5_edit/src/kadmin/testing/util/Makefile.in 2022-08-26 16:03:34.980000000 +0800 +*************** +*** 28,42 **** + all-tcl: $(CLNTPROG) $(SRVPROG) + + $(SRVPROG): $(OBJS) $(KADMSRV_DEPLIBS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o $(SRVPROG) $(OBJS) $(TCL_MAYBE_RPATH) \ + $(KADMSRV_LIBS) $(KRB5_PTHREAD_LIB) $(KRB5_BASE_LIBS) $(TCL_LIBS) + + $(CLNTPROG): $(OBJS) $(KADMCLNT_DEPLIBS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o $(CLNTPROG) $(OBJS) $(TCL_MAYBE_RPATH) \ + $(KRB5_PTHREAD_LIB) $(KADMCLNT_LIBS) $(KRB5_BASE_LIBS) $(TCL_LIBS) + + bsddb_dump: bsddb_dump.o +! $(CC_LINK) -o bsddb_dump bsddb_dump.o $(KADMSRV_LIBS) + + clean: + $(RM) $(CLNTPROG) $(SRVPROG) +--- 28,42 ---- + all-tcl: $(CLNTPROG) $(SRVPROG) + + $(SRVPROG): $(OBJS) $(KADMSRV_DEPLIBS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o $(SRVPROG) $(OBJS) $(TCL_MAYBE_RPATH) \ + $(KADMSRV_LIBS) $(KRB5_PTHREAD_LIB) $(KRB5_BASE_LIBS) $(TCL_LIBS) + + $(CLNTPROG): $(OBJS) $(KADMCLNT_DEPLIBS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o $(CLNTPROG) $(OBJS) $(TCL_MAYBE_RPATH) \ + $(KRB5_PTHREAD_LIB) $(KADMCLNT_LIBS) $(KRB5_BASE_LIBS) $(TCL_LIBS) + + bsddb_dump: bsddb_dump.o +! $(CC_LINK) -pie -o bsddb_dump bsddb_dump.o $(KADMSRV_LIBS) + + clean: + $(RM) $(CLNTPROG) $(SRVPROG) +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/kdc/do_tgs_req.c krb5_edit/src/kdc/do_tgs_req.c +*** krb5/src/kdc/do_tgs_req.c 2022-08-26 16:04:07.084000000 +0800 +--- krb5_edit/src/kdc/do_tgs_req.c 2022-08-26 16:03:34.984000000 +0800 +*************** +*** 208,213 **** +--- 208,218 ---- + status = "FIND_FAST"; + goto cleanup; + } ++ if (sprinc == NULL) { ++ status = "NULL_SERVER"; ++ errcode = KRB5KDC_ERR_S_PRINCIPAL_UNKNOWN; ++ goto cleanup; ++ } + + errcode = get_local_tgt(kdc_context, &sprinc->realm, header_server, + &local_tgt, &local_tgt_storage, &local_tgt_key); +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/kdc/kdc_preauth_ec.c krb5_edit/src/kdc/kdc_preauth_ec.c +*** krb5/src/kdc/kdc_preauth_ec.c 2022-08-26 16:04:07.088000000 +0800 +--- krb5_edit/src/kdc/kdc_preauth_ec.c 2022-08-26 16:03:34.984000000 +0800 +*************** +*** 87,93 **** + } + + /* Check for a configured FAST ec auth indicator. */ +! realmstr = k5memdup0(realm.data, realm.length, &retval); + if (realmstr != NULL) + retval = profile_get_string(context->profile, KRB5_CONF_REALMS, + realmstr, +--- 87,94 ---- + } + + /* Check for a configured FAST ec auth indicator. */ +! if (retval == 0) +! realmstr = k5memdup0(realm.data, realm.length, &retval); + if (realmstr != NULL) + retval = profile_get_string(context->profile, KRB5_CONF_REALMS, + realmstr, +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/kdc/Makefile.in krb5_edit/src/kdc/Makefile.in +*** krb5/src/kdc/Makefile.in 2022-08-26 16:04:07.084000000 +0800 +--- krb5_edit/src/kdc/Makefile.in 2022-08-26 16:03:34.980000000 +0800 +*************** +*** 64,73 **** + kdc5_err.o: kdc5_err.h + + krb5kdc: $(OBJS) $(KADMSRV_DEPLIBS) $(KRB5_BASE_DEPLIBS) $(APPUTILS_DEPLIB) $(VERTO_DEPLIB) +! $(CC_LINK) -o krb5kdc $(OBJS) $(APPUTILS_LIB) $(KADMSRV_LIBS) $(KRB5_BASE_LIBS) $(VERTO_LIBS) + + rtest: $(RT_OBJS) $(KDB5_DEPLIBS) $(KADM_COMM_DEPLIBS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o rtest $(RT_OBJS) $(KDB5_LIBS) $(KADM_COMM_LIBS) $(KRB5_BASE_LIBS) + + check-unix: rtest runenv.sh + $(RUN_TEST) $(srcdir)/rtscript > test.out +--- 64,73 ---- + kdc5_err.o: kdc5_err.h + + krb5kdc: $(OBJS) $(KADMSRV_DEPLIBS) $(KRB5_BASE_DEPLIBS) $(APPUTILS_DEPLIB) $(VERTO_DEPLIB) +! $(CC_LINK) -pie -o krb5kdc $(OBJS) $(APPUTILS_LIB) $(KADMSRV_LIBS) $(KRB5_BASE_LIBS) $(VERTO_LIBS) + + rtest: $(RT_OBJS) $(KDB5_DEPLIBS) $(KADM_COMM_DEPLIBS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o rtest $(RT_OBJS) $(KDB5_LIBS) $(KADM_COMM_LIBS) $(KRB5_BASE_LIBS) + + check-unix: rtest runenv.sh + $(RUN_TEST) $(srcdir)/rtscript > test.out +*************** +*** 77,83 **** + T_REPLAY_OBJS=t_replay.o + + t_replay: $(T_REPLAY_OBJS) replay.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o $@ $(T_REPLAY_OBJS) $(CMOCKA_LIBS) $(KRB5_BASE_LIBS) + + check-cmocka: t_replay + $(RUN_TEST) ./t_replay > /dev/null +--- 77,83 ---- + T_REPLAY_OBJS=t_replay.o + + t_replay: $(T_REPLAY_OBJS) replay.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o $@ $(T_REPLAY_OBJS) $(CMOCKA_LIBS) $(KRB5_BASE_LIBS) + + check-cmocka: t_replay + $(RUN_TEST) ./t_replay > /dev/null +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/kprop/Makefile.in krb5_edit/src/kprop/Makefile.in +*** krb5/src/kprop/Makefile.in 2022-08-26 16:04:07.088000000 +0800 +--- krb5_edit/src/kprop/Makefile.in 2022-08-26 16:03:34.988000000 +0800 +*************** +*** 16,28 **** + + + kprop: $(CLIENTOBJS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o kprop $(CLIENTOBJS) $(KRB5_BASE_LIBS) @LIBUTIL@ + + kpropd: $(SERVEROBJS) $(KDB5_DEPLIB) $(KADMCLNT_DEPLIBS) $(KRB5_BASE_DEPLIBS) $(APPUTILS_DEPLIB) +! $(CC_LINK) -o kpropd $(SERVEROBJS) $(KDB5_LIB) $(KADMCLNT_LIBS) $(KRB5_BASE_LIBS) $(APPUTILS_LIB) @LIBUTIL@ + + kproplog: $(LOGOBJS) +! $(CC_LINK) -o kproplog $(LOGOBJS) $(KADMSRV_LIBS) $(KRB5_BASE_LIBS) + + install: + for f in kprop kpropd kproplog; do \ +--- 16,28 ---- + + + kprop: $(CLIENTOBJS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o kprop $(CLIENTOBJS) $(KRB5_BASE_LIBS) @LIBUTIL@ + + kpropd: $(SERVEROBJS) $(KDB5_DEPLIB) $(KADMCLNT_DEPLIBS) $(KRB5_BASE_DEPLIBS) $(APPUTILS_DEPLIB) +! $(CC_LINK) -pie -o kpropd $(SERVEROBJS) $(KDB5_LIB) $(KADMCLNT_LIBS) $(KRB5_BASE_LIBS) $(APPUTILS_LIB) @LIBUTIL@ + + kproplog: $(LOGOBJS) +! $(CC_LINK) -pie -o kproplog $(LOGOBJS) $(KADMSRV_LIBS) $(KRB5_BASE_LIBS) + + install: + for f in kprop kpropd kproplog; do \ +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/lib/crypto/builtin/aes/Makefile.in krb5_edit/src/lib/crypto/builtin/aes/Makefile.in +*** krb5/src/lib/crypto/builtin/aes/Makefile.in 2022-08-26 16:04:07.092000000 +0800 +--- krb5_edit/src/lib/crypto/builtin/aes/Makefile.in 2022-08-26 16:03:34.988000000 +0800 +*************** +*** 45,51 **** + depend: $(SRCS) + + aes-gen: aes-gen.o $(GEN_OBJS) +! $(CC_LINK) -o aes-gen aes-gen.o $(GEN_OBJS) + + run-aes-gen: aes-gen + ./aes-gen > kresults.out +--- 45,51 ---- + depend: $(SRCS) + + aes-gen: aes-gen.o $(GEN_OBJS) +! $(CC_LINK) -pie -o aes-gen aes-gen.o $(GEN_OBJS) + + run-aes-gen: aes-gen + ./aes-gen > kresults.out +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/lib/crypto/builtin/camellia/Makefile.in krb5_edit/src/lib/crypto/builtin/camellia/Makefile.in +*** krb5/src/lib/crypto/builtin/camellia/Makefile.in 2022-08-26 16:04:07.092000000 +0800 +--- krb5_edit/src/lib/crypto/builtin/camellia/Makefile.in 2022-08-26 16:03:34.992000000 +0800 +*************** +*** 25,31 **** + depend: $(SRCS) + + camellia-gen: camellia-gen.o $(GEN_OBJS) +! $(CC_LINK) -o camellia-gen camellia-gen.o $(GEN_OBJS) + + run-camellia-gen: camellia-gen + ./camellia-gen > kresults.out +--- 25,31 ---- + depend: $(SRCS) + + camellia-gen: camellia-gen.o $(GEN_OBJS) +! $(CC_LINK) -pie -o camellia-gen camellia-gen.o $(GEN_OBJS) + + run-camellia-gen: camellia-gen + ./camellia-gen > kresults.out +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/lib/crypto/builtin/des/Makefile.in krb5_edit/src/lib/crypto/builtin/des/Makefile.in +*** krb5/src/lib/crypto/builtin/des/Makefile.in 2022-08-26 16:04:07.092000000 +0800 +--- krb5_edit/src/lib/crypto/builtin/des/Makefile.in 2022-08-26 16:03:34.992000000 +0800 +*************** +*** 50,60 **** + + verify$(EXEEXT): t_verify.$(OBJEXT) $(TOBJS) f_parity.$(OBJEXT) \ + $(COM_ERR_DEPLIB) $(SUPPORT_DEPLIB) +! $(CC_LINK) -o $@ t_verify.$(OBJEXT) $(TOBJS) f_parity.$(OBJEXT) \ + -lcom_err $(SUPPORT_LIB) + + destest$(EXEEXT): destest.$(OBJEXT) $(TOBJS) $(SUPPORT_DEPLIB) +! $(CC_LINK) -o $@ destest.$(OBJEXT) $(TOBJS) $(SUPPORT_LIB) + + all-unix: all-libobjs + +--- 50,60 ---- + + verify$(EXEEXT): t_verify.$(OBJEXT) $(TOBJS) f_parity.$(OBJEXT) \ + $(COM_ERR_DEPLIB) $(SUPPORT_DEPLIB) +! $(CC_LINK) -pie -o $@ t_verify.$(OBJEXT) $(TOBJS) f_parity.$(OBJEXT) \ + -lcom_err $(SUPPORT_LIB) + + destest$(EXEEXT): destest.$(OBJEXT) $(TOBJS) $(SUPPORT_DEPLIB) +! $(CC_LINK) -pie -o $@ destest.$(OBJEXT) $(TOBJS) $(SUPPORT_LIB) + + all-unix: all-libobjs + +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/lib/crypto/builtin/sha1/Makefile.in krb5_edit/src/lib/crypto/builtin/sha1/Makefile.in +*** krb5/src/lib/crypto/builtin/sha1/Makefile.in 2022-08-26 16:04:07.096000000 +0800 +--- krb5_edit/src/lib/crypto/builtin/sha1/Makefile.in 2022-08-26 16:03:34.996000000 +0800 +*************** +*** 19,31 **** + + depend: $(SRCS) + t_shs: t_shs.o shs.o $(SUPPORT_DEPLIB) +! $(CC_LINK) -o t_shs t_shs.o shs.o $(SUPPORT_LIB) + + $(OUTPRE)t_shs.exe: $(OUTPRE)t_shs.obj $(OUTPRE)shs.obj + link -out:$@ $** + + t_shs3: t_shs3.o shs.o $(SUPPORT_DEPLIB) +! $(CC_LINK) -o t_shs3 t_shs3.o shs.o $(SUPPORT_LIB) + + check-unix: t_shs t_shs3 + $(RUN_TEST) $(C)t_shs -x +--- 19,31 ---- + + depend: $(SRCS) + t_shs: t_shs.o shs.o $(SUPPORT_DEPLIB) +! $(CC_LINK) -pie -o t_shs t_shs.o shs.o $(SUPPORT_LIB) + + $(OUTPRE)t_shs.exe: $(OUTPRE)t_shs.obj $(OUTPRE)shs.obj + link -out:$@ $** + + t_shs3: t_shs3.o shs.o $(SUPPORT_DEPLIB) +! $(CC_LINK) -pie -o t_shs3 t_shs3.o shs.o $(SUPPORT_LIB) + + check-unix: t_shs t_shs3 + $(RUN_TEST) $(C)t_shs -x +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/lib/crypto/crypto_tests/Makefile.in krb5_edit/src/lib/crypto/crypto_tests/Makefile.in +*** krb5/src/lib/crypto/crypto_tests/Makefile.in 2022-08-26 16:04:07.096000000 +0800 +--- krb5_edit/src/lib/crypto/crypto_tests/Makefile.in 2022-08-26 16:03:34.996000000 +0800 +*************** +*** 60,111 **** + # $(RUN_TEST) ./t_pkcs5 + + t_nfold$(EXEEXT): t_nfold.$(OBJEXT) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o $@ t_nfold.$(OBJEXT) $(KRB5_BASE_LIBS) + + t_encrypt$(EXEEXT): t_encrypt.$(OBJEXT) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o $@ t_encrypt.$(OBJEXT) $(KRB5_BASE_LIBS) + + t_decrypt$(EXEEXT): t_decrypt.$(OBJEXT) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o $@ t_decrypt.$(OBJEXT) $(KRB5_BASE_LIBS) + + t_prf$(EXEEXT): t_prf.$(OBJEXT) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o $@ t_prf.$(OBJEXT) $(KRB5_BASE_LIBS) + + t_prng$(EXEEXT): t_prng.$(OBJEXT) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o $@ t_prng.$(OBJEXT) $(KRB5_BASE_LIBS) + + t_cmac$(EXEEXT): t_cmac.$(OBJEXT) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o $@ t_cmac.$(OBJEXT) $(KRB5_BASE_LIBS) + + t_hmac$(EXEEXT): t_hmac.$(OBJEXT) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o $@ t_hmac.$(OBJEXT) $(KRB5_BASE_LIBS) + + #t_pkcs5$(EXEEXT): t_pkcs5.$(OBJEXT) $(KRB5_BASE_DEPLIBS) +! # $(CC_LINK) -o $@ t_pkcs5.$(OBJEXT) $(KRB5_BASE_LIBS) + + vectors$(EXEEXT): vectors.$(OBJEXT) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o $@ vectors.$(OBJEXT) $(KRB5_BASE_LIBS) + + t_cts$(EXEEXT): t_cts.$(OBJEXT) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o $@ t_cts.$(OBJEXT) \ + $(KRB5_BASE_LIBS) + + t_sha2$(EXEEXT): t_sha2.$(OBJEXT) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o $@ t_sha2.$(OBJEXT) \ + $(KRB5_BASE_LIBS) + + t_short$(EXEEXT): t_short.$(OBJEXT) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o $@ t_short.$(OBJEXT) \ + $(KRB5_BASE_LIBS) + + t_cksums: t_cksums.o $(CRYTPO_DEPLIB) +! $(CC_LINK) -o t_cksums t_cksums.o -lkrb5 $(KRB5_BASE_LIBS) + + aes-test: aes-test.$(OBJEXT) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o aes-test aes-test.$(OBJEXT) $(KRB5_BASE_LIBS) + + camellia-test: camellia-test.$(OBJEXT) $(CRYPTO_DEPLIB) +! $(CC_LINK) -o camellia-test camellia-test.$(OBJEXT) $(KRB5_BASE_LIBS) + + t_mddriver4.o: $(srcdir)/t_mddriver.c + $(CC) -DMD=4 $(ALL_CFLAGS) -o t_mddriver4.o -c $(srcdir)/t_mddriver.c +--- 60,111 ---- + # $(RUN_TEST) ./t_pkcs5 + + t_nfold$(EXEEXT): t_nfold.$(OBJEXT) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o $@ t_nfold.$(OBJEXT) $(KRB5_BASE_LIBS) + + t_encrypt$(EXEEXT): t_encrypt.$(OBJEXT) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o $@ t_encrypt.$(OBJEXT) $(KRB5_BASE_LIBS) + + t_decrypt$(EXEEXT): t_decrypt.$(OBJEXT) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o $@ t_decrypt.$(OBJEXT) $(KRB5_BASE_LIBS) + + t_prf$(EXEEXT): t_prf.$(OBJEXT) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o $@ t_prf.$(OBJEXT) $(KRB5_BASE_LIBS) + + t_prng$(EXEEXT): t_prng.$(OBJEXT) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o $@ t_prng.$(OBJEXT) $(KRB5_BASE_LIBS) + + t_cmac$(EXEEXT): t_cmac.$(OBJEXT) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o $@ t_cmac.$(OBJEXT) $(KRB5_BASE_LIBS) + + t_hmac$(EXEEXT): t_hmac.$(OBJEXT) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o $@ t_hmac.$(OBJEXT) $(KRB5_BASE_LIBS) + + #t_pkcs5$(EXEEXT): t_pkcs5.$(OBJEXT) $(KRB5_BASE_DEPLIBS) +! # $(CC_LINK) -pie -o $@ t_pkcs5.$(OBJEXT) $(KRB5_BASE_LIBS) + + vectors$(EXEEXT): vectors.$(OBJEXT) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o $@ vectors.$(OBJEXT) $(KRB5_BASE_LIBS) + + t_cts$(EXEEXT): t_cts.$(OBJEXT) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o $@ t_cts.$(OBJEXT) \ + $(KRB5_BASE_LIBS) + + t_sha2$(EXEEXT): t_sha2.$(OBJEXT) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o $@ t_sha2.$(OBJEXT) \ + $(KRB5_BASE_LIBS) + + t_short$(EXEEXT): t_short.$(OBJEXT) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o $@ t_short.$(OBJEXT) \ + $(KRB5_BASE_LIBS) + + t_cksums: t_cksums.o $(CRYTPO_DEPLIB) +! $(CC_LINK) -pie -o t_cksums t_cksums.o -lkrb5 $(KRB5_BASE_LIBS) + + aes-test: aes-test.$(OBJEXT) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o aes-test aes-test.$(OBJEXT) $(KRB5_BASE_LIBS) + + camellia-test: camellia-test.$(OBJEXT) $(CRYPTO_DEPLIB) +! $(CC_LINK) -pie -o camellia-test camellia-test.$(OBJEXT) $(KRB5_BASE_LIBS) + + t_mddriver4.o: $(srcdir)/t_mddriver.c + $(CC) -DMD=4 $(ALL_CFLAGS) -o t_mddriver4.o -c $(srcdir)/t_mddriver.c +*************** +*** 114,135 **** + $(CC_LINK) -DMD4 -o t_mddriver4 t_mddriver4.o $(KRB5_BASE_LIBS) + + t_mddriver: t_mddriver.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o t_mddriver t_mddriver.o $(KRB5_BASE_LIBS) + + t_kperf: t_kperf.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o t_kperf t_kperf.o $(KRB5_BASE_LIBS) + + t_str2key$(EXEEXT): t_str2key.$(OBJEXT) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o $@ t_str2key.$(OBJEXT) $(KRB5_BASE_LIBS) + + t_derive$(EXEEXT): t_derive.$(OBJEXT) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o $@ t_derive.$(OBJEXT) $(KRB5_BASE_LIBS) + + t_fork$(EXEEXT): t_fork.$(OBJEXT) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o $@ t_fork.$(OBJEXT) $(KRB5_BASE_LIBS) + + t_cf2$(EXEEXT): t_cf2.$(OBJEXT) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o $@ t_cf2.$(OBJEXT) $(KRB5_BASE_LIBS) + + clean: + $(RM) t_nfold.o t_nfold t_encrypt t_encrypt.o \ +--- 114,135 ---- + $(CC_LINK) -DMD4 -o t_mddriver4 t_mddriver4.o $(KRB5_BASE_LIBS) + + t_mddriver: t_mddriver.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o t_mddriver t_mddriver.o $(KRB5_BASE_LIBS) + + t_kperf: t_kperf.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o t_kperf t_kperf.o $(KRB5_BASE_LIBS) + + t_str2key$(EXEEXT): t_str2key.$(OBJEXT) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o $@ t_str2key.$(OBJEXT) $(KRB5_BASE_LIBS) + + t_derive$(EXEEXT): t_derive.$(OBJEXT) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o $@ t_derive.$(OBJEXT) $(KRB5_BASE_LIBS) + + t_fork$(EXEEXT): t_fork.$(OBJEXT) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o $@ t_fork.$(OBJEXT) $(KRB5_BASE_LIBS) + + t_cf2$(EXEEXT): t_cf2.$(OBJEXT) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o $@ t_cf2.$(OBJEXT) $(KRB5_BASE_LIBS) + + clean: + $(RM) t_nfold.o t_nfold t_encrypt t_encrypt.o \ +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/lib/crypto/krb/Makefile.in krb5_edit/src/lib/crypto/krb/Makefile.in +*** krb5/src/lib/crypto/krb/Makefile.in 2022-08-26 16:04:07.104000000 +0800 +--- krb5_edit/src/lib/crypto/krb/Makefile.in 2022-08-26 16:03:35.004000000 +0800 +*************** +*** 199,205 **** + fi + + t_fortuna: t_fortuna.o $(SUPPORT_DEPLIB) $(CRYPTO_DEPLIB) +! $(CC_LINK) -o $@ t_fortuna.o $(K5CRYPTO_LIB) $(SUPPORT_LIB) $(LIBS) + + clean-unix:: clean-libobjs + $(RM) t_fortuna.o t_fortuna t_fortuna.output +--- 199,205 ---- + fi + + t_fortuna: t_fortuna.o $(SUPPORT_DEPLIB) $(CRYPTO_DEPLIB) +! $(CC_LINK) -pie -o $@ t_fortuna.o $(K5CRYPTO_LIB) $(SUPPORT_LIB) $(LIBS) + + clean-unix:: clean-libobjs + $(RM) t_fortuna.o t_fortuna t_fortuna.output +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/lib/crypto/libk5crypto_gauss.exports krb5_edit/src/lib/crypto/libk5crypto_gauss.exports +*** krb5/src/lib/crypto/libk5crypto_gauss.exports 1970-01-01 08:00:00.000000000 +0800 +--- krb5_edit/src/lib/crypto/libk5crypto_gauss.exports 2022-08-26 16:03:35.008000000 +0800 +*************** +*** 0 **** +--- 1,110 ---- ++ krb5_c_make_random_key ++ krb5_c_encrypt_length ++ krb5_process_key ++ krb5_string_to_cksumtype ++ krb5_c_valid_enctype ++ krb5_c_valid_cksumtype ++ krb5_string_to_key ++ krb5_c_encrypt_iov ++ krb5_c_checksum_length ++ is_keyed_cksum ++ krb5_c_padding_length ++ is_coll_proof_cksum ++ krb5_init_random_key ++ krb5_c_string_to_key_with_params ++ krb5_c_random_make_octets ++ krb5_c_random_os_entropy ++ krb5_c_decrypt ++ krb5_c_crypto_length ++ krb5_c_block_size ++ krb5_cksumtype_to_string ++ krb5_c_keyed_checksum_types ++ krb5_c_is_keyed_cksum ++ krb5_c_crypto_length_iov ++ valid_cksumtype ++ krb5_c_random_seed ++ krb5_c_random_to_key ++ krb5_verify_checksum ++ krb5_c_free_state ++ krb5_c_verify_checksum ++ krb5_c_random_add_entropy ++ krb5_c_decrypt_iov ++ krb5_c_make_checksum ++ krb5_checksum_size ++ krb5_free_cksumtypes ++ krb5_finish_key ++ krb5_encrypt_size ++ krb5_c_keylengths ++ krb5_c_prf ++ krb5_encrypt ++ krb5_string_to_enctype ++ krb5_c_is_coll_proof_cksum ++ krb5_c_init_state ++ krb5_eblock_enctype ++ krb5_decrypt ++ krb5_c_encrypt ++ krb5_c_enctype_compare ++ krb5_c_verify_checksum_iov ++ valid_enctype ++ krb5_enctype_to_string ++ krb5_enctype_to_name ++ krb5_c_make_checksum_iov ++ krb5_calculate_checksum ++ krb5_c_string_to_key ++ krb5_use_enctype ++ krb5_random_key ++ krb5_finish_random_key ++ krb5_c_prf_length ++ krb5int_c_mandatory_cksumtype ++ krb5_c_fx_cf2_simple ++ krb5int_c_weak_enctype ++ krb5_encrypt_data ++ krb5int_c_copy_keyblock ++ krb5int_c_copy_keyblock_contents ++ krb5int_c_free_keyblock_contents ++ krb5int_c_free_keyblock ++ krb5int_c_init_keyblock ++ krb5int_hash_md4 ++ krb5int_hash_md5 ++ krb5int_hash_sha256 ++ krb5int_hash_sha384 ++ krb5int_enc_arcfour ++ krb5int_hmac ++ krb5_k_create_key ++ krb5_k_decrypt ++ krb5_k_decrypt_iov ++ krb5_k_encrypt ++ krb5_k_encrypt_iov ++ krb5_k_free_key ++ krb5_k_key_enctype ++ krb5_k_key_keyblock ++ krb5_k_make_checksum ++ krb5_k_make_checksum_iov ++ krb5_k_prf ++ krb5_k_reference_key ++ krb5_k_verify_checksum ++ krb5_k_verify_checksum_iov ++ krb5int_aes_encrypt ++ krb5int_aes_decrypt ++ krb5int_enc_des3 ++ krb5int_arcfour_gsscrypt ++ krb5int_camellia_cbc_mac ++ krb5int_cmac_checksum ++ krb5int_enc_aes128 ++ krb5int_enc_aes256 ++ krb5int_enc_camellia128 ++ krb5int_enc_camellia256 ++ krb5int_derive_key ++ krb5int_derive_random ++ krb5int_aes_enc_blk ++ krb5int_aes_enc_key ++ k5_sha256 ++ k5_sha256_final ++ k5_sha256_init ++ k5_sha256_update ++ krb5int_nfold ++ k5_allow_weak_pbkdf2iter ++ krb5_c_prfplus ++ krb5_c_derive_prfplus ++ k5_enctype_to_ssf ++ krb5int_c_deprecated_enctype +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/lib/crypto/Makefile.in krb5_edit/src/lib/crypto/Makefile.in +*** krb5/src/lib/crypto/Makefile.in 2022-08-26 16:04:07.092000000 +0800 +--- krb5_edit/src/lib/crypto/Makefile.in 2022-08-26 16:03:34.988000000 +0800 +*************** +*** 2,8 **** + BUILDTOP=$(REL)..$(S).. + SUBDIRS= krb $(CRYPTO_IMPL) crypto_tests + +! LIBBASE=k5crypto + LIBMAJOR=3 + LIBMINOR=1 + LIBINITFUNC=cryptoint_initialize_library +--- 2,8 ---- + BUILDTOP=$(REL)..$(S).. + SUBDIRS= krb $(CRYPTO_IMPL) crypto_tests + +! LIBBASE=k5crypto_gauss + LIBMAJOR=3 + LIBMINOR=1 + LIBINITFUNC=cryptoint_initialize_library +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/lib/gssapi/generic/Makefile.in krb5_edit/src/lib/gssapi/generic/Makefile.in +*** krb5/src/lib/gssapi/generic/Makefile.in 2022-08-26 16:04:07.112000000 +0800 +--- krb5_edit/src/lib/gssapi/generic/Makefile.in 2022-08-26 16:03:35.012000000 +0800 +*************** +*** 127,133 **** + RIGHTPRINT=eltprt LEFTCMP=intcmp RIGHTCMP=eltcmp + maptest.o: maptest.c maptest.h + maptest: maptest.o +! $(CC_LINK) -o maptest maptest.o + + ##DOS##LIBOBJS = $(OBJS) + +--- 127,133 ---- + RIGHTPRINT=eltprt LEFTCMP=intcmp RIGHTCMP=eltcmp + maptest.o: maptest.c maptest.h + maptest: maptest.o +! $(CC_LINK) -pie -o maptest maptest.o + + ##DOS##LIBOBJS = $(OBJS) + +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/lib/gssapi/libgssapi_krb5_gauss.exports krb5_edit/src/lib/gssapi/libgssapi_krb5_gauss.exports +*** krb5/src/lib/gssapi/libgssapi_krb5_gauss.exports 1970-01-01 08:00:00.000000000 +0800 +--- krb5_edit/src/lib/gssapi/libgssapi_krb5_gauss.exports 2022-08-26 16:03:35.020000000 +0800 +*************** +*** 0 **** +--- 1,168 ---- ++ GSS_C_ATTR_LOCAL_LOGIN_USER ++ GSS_C_INQ_SSPI_SESSION_KEY ++ GSS_C_INQ_NEGOEX_KEY ++ GSS_C_INQ_NEGOEX_VERIFY_KEY ++ GSS_C_NT_ANONYMOUS ++ GSS_C_NT_COMPOSITE_EXPORT ++ GSS_C_NT_EXPORT_NAME ++ GSS_C_NT_HOSTBASED_SERVICE ++ GSS_C_NT_HOSTBASED_SERVICE_X ++ GSS_C_NT_MACHINE_UID_NAME ++ GSS_C_NT_STRING_UID_NAME ++ GSS_C_NT_USER_NAME ++ GSS_KRB5_NT_PRINCIPAL_NAME ++ GSS_KRB5_NT_ENTERPRISE_NAME ++ GSS_KRB5_CRED_NO_CI_FLAGS_X ++ GSS_KRB5_GET_CRED_IMPERSONATOR ++ GSS_C_MA_MECH_CONCRETE ++ GSS_C_MA_MECH_PSEUDO ++ GSS_C_MA_MECH_COMPOSITE ++ GSS_C_MA_MECH_NEGO ++ GSS_C_MA_MECH_GLUE ++ GSS_C_MA_NOT_MECH ++ GSS_C_MA_DEPRECATED ++ GSS_C_MA_NOT_DFLT_MECH ++ GSS_C_MA_ITOK_FRAMED ++ GSS_C_MA_AUTH_INIT ++ GSS_C_MA_AUTH_TARG ++ GSS_C_MA_AUTH_INIT_INIT ++ GSS_C_MA_AUTH_TARG_INIT ++ GSS_C_MA_AUTH_INIT_ANON ++ GSS_C_MA_AUTH_TARG_ANON ++ GSS_C_MA_DELEG_CRED ++ GSS_C_MA_INTEG_PROT ++ GSS_C_MA_CONF_PROT ++ GSS_C_MA_MIC ++ GSS_C_MA_WRAP ++ GSS_C_MA_PROT_READY ++ GSS_C_MA_REPLAY_DET ++ GSS_C_MA_OOS_DET ++ GSS_C_MA_CBINDINGS ++ GSS_C_MA_PFS ++ GSS_C_MA_COMPRESS ++ GSS_C_MA_CTX_TRANS ++ GSS_C_MA_NEGOEX_AND_SPNEGO ++ GSS_C_SEC_CONTEXT_SASL_SSF ++ gss_accept_sec_context ++ gss_acquire_cred ++ gss_acquire_cred_with_password ++ gss_acquire_cred_impersonate_name ++ gss_add_buffer_set_member ++ gss_add_cred ++ gss_add_cred_impersonate_name ++ gss_add_cred_with_password ++ gss_add_oid_set_member ++ gss_authorize_localname ++ gss_canonicalize_name ++ gss_compare_name ++ gss_complete_auth_token ++ gss_context_time ++ gss_create_empty_buffer_set ++ gss_create_empty_oid_set ++ gss_decapsulate_token ++ gss_delete_name_attribute ++ gss_delete_sec_context ++ gss_display_mech_attr ++ gss_display_name ++ gss_display_name_ext ++ gss_display_status ++ gss_duplicate_name ++ gss_encapsulate_token ++ gss_export_cred ++ gss_export_name ++ gss_export_name_composite ++ gss_export_sec_context ++ gss_get_mic ++ gss_get_mic_iov ++ gss_get_mic_iov_length ++ gss_get_name_attribute ++ gss_import_cred ++ gss_import_name ++ gss_import_sec_context ++ gss_indicate_mechs ++ gss_init_sec_context ++ gss_indicate_mechs_by_attrs ++ gss_inquire_attrs_for_mech ++ gss_inquire_context ++ gss_inquire_cred ++ gss_inquire_cred_by_mech ++ gss_inquire_cred_by_oid ++ gss_inquire_mech_for_saslname ++ gss_inquire_mechs_for_name ++ gss_inquire_names_for_mech ++ gss_inquire_saslname_for_mech ++ gss_inquire_sec_context_by_oid ++ gss_krb5_ccache_name ++ gss_krb5_copy_ccache ++ gss_krb5_export_lucid_sec_context ++ gss_krb5_free_lucid_sec_context ++ gss_krb5_get_tkt_flags ++ gss_krb5_import_cred ++ gss_krb5_set_allowable_enctypes ++ gss_krb5_set_cred_rcache ++ gss_krb5int_make_seal_token_v3 ++ gss_krb5int_unseal_token_v3 ++ gsskrb5_extract_authtime_from_sec_context ++ gsskrb5_extract_authz_data_from_sec_context ++ gss_localname ++ gss_map_name_to_any ++ gss_mech_iakerb ++ gss_mech_krb5 ++ gss_mech_krb5_old ++ gss_mech_krb5_wrong ++ gss_mech_set_krb5 ++ gss_mech_set_krb5_both ++ gss_mech_set_krb5_old ++ gss_nt_exported_name ++ gss_nt_krb5_name ++ gss_nt_krb5_principal ++ gss_nt_machine_uid_name ++ gss_nt_service_name ++ gss_nt_service_name_v2 ++ gss_nt_string_uid_name ++ gss_nt_user_name ++ gss_oid_equal ++ gss_oid_to_str ++ gss_pname_to_uid ++ gss_pseudo_random ++ gss_process_context_token ++ gss_release_any_name_mapping ++ gss_release_buffer_set ++ gss_release_buffer ++ gss_release_cred ++ gss_release_iov_buffer ++ gss_release_name ++ gss_release_oid ++ gss_release_oid_set ++ gss_seal ++ gss_set_name_attribute ++ gss_set_neg_mechs ++ gss_set_sec_context_option ++ gss_sign ++ gss_store_cred ++ gss_str_to_oid ++ gss_test_oid_set_member ++ gss_unseal ++ gss_unwrap ++ gss_unwrap_aead ++ gss_unwrap_iov ++ gss_userok ++ gss_verify ++ gss_verify_mic ++ gss_verify_mic_iov ++ gss_wrap ++ gss_wrap_aead ++ gss_wrap_iov ++ gss_wrap_iov_length ++ gss_wrap_size_limit ++ gss_set_cred_option ++ gssspi_set_cred_option ++ gssspi_mech_invoke ++ krb5_gss_dbg_client_expcreds ++ krb5_gss_register_acceptor_identity ++ krb5_gss_use_kdc_context ++ gss_inquire_name ++ gss_acquire_cred_from ++ gss_add_cred_from ++ gss_store_cred_into ++ gssint_g_seqstate_init +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/lib/gssapi/Makefile.in krb5_edit/src/lib/gssapi/Makefile.in +*** krb5/src/lib/gssapi/Makefile.in 2022-08-26 16:04:07.112000000 +0800 +--- krb5_edit/src/lib/gssapi/Makefile.in 2022-08-26 16:03:35.012000000 +0800 +*************** +*** 18,24 **** + OBJS= + SRCS= + +! LIBBASE=gssapi_krb5 + LIBMAJOR=2 + LIBMINOR=2 + #LIBINITFUNC=gssint_lib_init +--- 18,24 ---- + OBJS= + SRCS= + +! LIBBASE=gssapi_krb5_gauss + LIBMAJOR=2 + LIBMINOR=2 + #LIBINITFUNC=gssint_lib_init +*************** +*** 27,33 **** + SUBDIROBJLISTS=generic/OBJS.ST mechglue/OBJS.ST krb5/OBJS.ST spnego/OBJS.ST + SHLIB_EXPDEPS=\ + $(KRB5_DEPLIB) $(CRYPTO_DEPLIB) $(SUPPORT_DEPLIB) $(COM_ERR_DEPLIB) +! SHLIB_EXPLIBS=-lkrb5 -lk5crypto -lcom_err $(SUPPORT_LIB) $(DL_LIB) $(LIBS) + RELDIR=gssapi + + all-unix: all-liblinks @MAINT@ verify-calling-conventions-gssapi +--- 27,33 ---- + SUBDIROBJLISTS=generic/OBJS.ST mechglue/OBJS.ST krb5/OBJS.ST spnego/OBJS.ST + SHLIB_EXPDEPS=\ + $(KRB5_DEPLIB) $(CRYPTO_DEPLIB) $(SUPPORT_DEPLIB) $(COM_ERR_DEPLIB) +! SHLIB_EXPLIBS=-lkrb5_gauss -lk5crypto_gauss -lcom_err_gauss $(SUPPORT_LIB) $(DL_LIB) $(LIBS) + RELDIR=gssapi + + all-unix: all-liblinks @MAINT@ verify-calling-conventions-gssapi +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/lib/kadm5/clnt/Makefile.in krb5_edit/src/lib/kadm5/clnt/Makefile.in +*** krb5/src/lib/kadm5/clnt/Makefile.in 2022-08-26 16:04:07.128000000 +0800 +--- krb5_edit/src/lib/kadm5/clnt/Makefile.in 2022-08-26 16:03:35.028000000 +0800 +*************** +*** 7,18 **** + LIBMINOR=0 + STOBJLISTS=../OBJS.ST OBJS.ST + SHLIB_EXPDEPS=\ +! $(TOPLIBD)/libgssrpc$(SHLIBEXT) \ +! $(TOPLIBD)/libgssapi_krb5$(SHLIBEXT) \ +! $(TOPLIBD)/libkrb5$(SHLIBEXT) \ +! $(TOPLIBD)/libk5crypto$(SHLIBEXT) \ + $(COM_ERR_DEPLIB) $(SUPPORT_LIBDEP) +! SHLIB_EXPLIBS=-lgssrpc -lgssapi_krb5 -lkrb5 -lk5crypto $(SUPPORT_LIB) -lcom_err $(LIBS) + RELDIR=kadm5/clnt + + ##DOSBUILDTOP = ..\..\.. +--- 7,18 ---- + LIBMINOR=0 + STOBJLISTS=../OBJS.ST OBJS.ST + SHLIB_EXPDEPS=\ +! $(TOPLIBD)/libgssrpc_gauss$(SHLIBEXT) \ +! $(TOPLIBD)/libgssapi_krb5_gauss$(SHLIBEXT) \ +! $(TOPLIBD)/libkrb5_gauss$(SHLIBEXT) \ +! $(TOPLIBD)/libk5crypto_gauss$(SHLIBEXT) \ + $(COM_ERR_DEPLIB) $(SUPPORT_LIBDEP) +! SHLIB_EXPLIBS=-lgssrpc_gauss -lgssapi_krb5_gauss -lkrb5_gauss -lk5crypto_gauss $(SUPPORT_LIB) -lcom_err_gauss $(LIBS) + RELDIR=kadm5/clnt + + ##DOSBUILDTOP = ..\..\.. +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/lib/kadm5/srv/Makefile.in krb5_edit/src/lib/kadm5/srv/Makefile.in +*** krb5/src/lib/kadm5/srv/Makefile.in 2022-08-26 16:04:07.132000000 +0800 +--- krb5_edit/src/lib/kadm5/srv/Makefile.in 2022-08-26 16:03:35.028000000 +0800 +*************** +*** 14,27 **** + STOBJLISTS=../OBJS.ST OBJS.ST + + SHLIB_EXPDEPS=\ +! $(TOPLIBD)/libgssrpc$(SHLIBEXT) \ +! $(TOPLIBD)/libgssapi_krb5$(SHLIBEXT) \ + $(TOPLIBD)/libkdb5$(SHLIBEXT) \ +! $(TOPLIBD)/libkrb5$(SHLIBEXT) \ +! $(TOPLIBD)/libk5crypto$(SHLIBEXT) \ + $(COM_ERR_DEPLIB) $(SUPPORT_LIBDEP) +! SHLIB_EXPLIBS = -lgssrpc -lgssapi_krb5 -lkdb5 $(KDB5_DB_LIB) \ +! -lkrb5 -lk5crypto $(SUPPORT_LIB) -lcom_err @GEN_LIB@ $(LIBS) + RELDIR=kadm5/srv + + SRCS = $(srcdir)/pwqual.c \ +--- 14,27 ---- + STOBJLISTS=../OBJS.ST OBJS.ST + + SHLIB_EXPDEPS=\ +! $(TOPLIBD)/libgssrpc_gauss$(SHLIBEXT) \ +! $(TOPLIBD)/libgssapi_krb5_gauss$(SHLIBEXT) \ + $(TOPLIBD)/libkdb5$(SHLIBEXT) \ +! $(TOPLIBD)/libkrb5_gauss$(SHLIBEXT) \ +! $(TOPLIBD)/libk5crypto_gauss$(SHLIBEXT) \ + $(COM_ERR_DEPLIB) $(SUPPORT_LIBDEP) +! SHLIB_EXPLIBS = -lgssrpc_gauss -lgssapi_krb5_gauss -lkdb5 $(KDB5_DB_LIB) \ +! -lkrb5_gauss -lk5crypto_gauss $(SUPPORT_LIB) -lcom_err_gauss @GEN_LIB@ $(LIBS) + RELDIR=kadm5/srv + + SRCS = $(srcdir)/pwqual.c \ +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/lib/kadm5/unit-test/Makefile.in krb5_edit/src/lib/kadm5/unit-test/Makefile.in +*** krb5/src/lib/kadm5/unit-test/Makefile.in 2022-08-26 16:04:07.132000000 +0800 +--- krb5_edit/src/lib/kadm5/unit-test/Makefile.in 2022-08-26 16:03:35.032000000 +0800 +*************** +*** 10,35 **** + # + + init-test: init-test.o $(KADMCLNT_DEPLIBS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o init-test init-test.o \ + $(KADMCLNT_LIBS) $(KRB5_BASE_LIBS) + + destroy-test: destroy-test.o $(KADMCLNT_DEPLIBS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o destroy-test destroy-test.o \ + $(KADMCLNT_LIBS) $(KRB5_BASE_LIBS) + + client-handle-test: client-handle-test.o $(KADMCLNT_DEPLIBS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o client-handle-test client-handle-test.o \ + $(KADMCLNT_LIBS) $(KRB5_BASE_LIBS) + + client-handle-test.o: handle-test.c + $(CC) $(ALL_CFLAGS) -DCLIENT_TEST -o client-handle-test.o -c $(srcdir)/handle-test.c + + client-iter-test: iter-test.o $(KADMLCNT_DEPLIBS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o client-iter-test iter-test.o \ + $(KADMCLNT_LIBS) $(KRB5_BASE_LIBS) + + client-setkey-test: setkey-test.o $(KADMCLNT_DEPLIBS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o client-setkey-test setkey-test.o \ + $(KADMCLNT_LIBS) $(KRB5_BASE_LIBS) + + # +--- 10,35 ---- + # + + init-test: init-test.o $(KADMCLNT_DEPLIBS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o init-test init-test.o \ + $(KADMCLNT_LIBS) $(KRB5_BASE_LIBS) + + destroy-test: destroy-test.o $(KADMCLNT_DEPLIBS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o destroy-test destroy-test.o \ + $(KADMCLNT_LIBS) $(KRB5_BASE_LIBS) + + client-handle-test: client-handle-test.o $(KADMCLNT_DEPLIBS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o client-handle-test client-handle-test.o \ + $(KADMCLNT_LIBS) $(KRB5_BASE_LIBS) + + client-handle-test.o: handle-test.c + $(CC) $(ALL_CFLAGS) -DCLIENT_TEST -o client-handle-test.o -c $(srcdir)/handle-test.c + + client-iter-test: iter-test.o $(KADMLCNT_DEPLIBS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o client-iter-test iter-test.o \ + $(KADMCLNT_LIBS) $(KRB5_BASE_LIBS) + + client-setkey-test: setkey-test.o $(KADMCLNT_DEPLIBS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o client-setkey-test setkey-test.o \ + $(KADMCLNT_LIBS) $(KRB5_BASE_LIBS) + + # +*************** +*** 37,59 **** + # + + randkey-test: randkey-test.o $(KADMSRV_DEPLIBS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o randkey-test randkey-test.o \ + $(KADMSRV_LIBS) $(KDB_DEP_LIB) $(KRB5_BASE_LIBS) + + server-handle-test: handle-test.o $(KADMSRV_DEPLIBS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o server-handle-test handle-test.o \ + $(KADMSRV_LIBS) $(KDB_DEP_LIB) $(KRB5_BASE_LIBS) + + lock-test: lock-test.o $(KADMSRV_DEPLIBS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o lock-test lock-test.o \ + $(KADMSRV_LIBS) $(KDB_DEP_LIB) $(KRB5_BASE_LIBS) + + server-iter-test: iter-test.o $(KADMSRV_DEPLIBS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o server-iter-test iter-test.o \ + $(KADMSRV_LIBS) $(KDB_DEP_LIB) $(KRB5_BASE_LIBS) + + server-setkey-test: setkey-test.o $(KADMSRV_DEPLIBS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o server-setkey-test setkey-test.o \ + $(KADMSRV_LIBS) $(KDB_DEP_LIB) $(KRB5_BASE_LIBS) + + runenv.exp: Makefile +--- 37,59 ---- + # + + randkey-test: randkey-test.o $(KADMSRV_DEPLIBS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o randkey-test randkey-test.o \ + $(KADMSRV_LIBS) $(KDB_DEP_LIB) $(KRB5_BASE_LIBS) + + server-handle-test: handle-test.o $(KADMSRV_DEPLIBS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o server-handle-test handle-test.o \ + $(KADMSRV_LIBS) $(KDB_DEP_LIB) $(KRB5_BASE_LIBS) + + lock-test: lock-test.o $(KADMSRV_DEPLIBS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o lock-test lock-test.o \ + $(KADMSRV_LIBS) $(KDB_DEP_LIB) $(KRB5_BASE_LIBS) + + server-iter-test: iter-test.o $(KADMSRV_DEPLIBS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o server-iter-test iter-test.o \ + $(KADMSRV_LIBS) $(KDB_DEP_LIB) $(KRB5_BASE_LIBS) + + server-setkey-test: setkey-test.o $(KADMSRV_DEPLIBS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o server-setkey-test setkey-test.o \ + $(KADMSRV_LIBS) $(KDB_DEP_LIB) $(KRB5_BASE_LIBS) + + runenv.exp: Makefile +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/lib/kdb/Makefile.in krb5_edit/src/lib/kdb/Makefile.in +*** krb5/src/lib/kdb/Makefile.in 2022-08-26 16:04:07.136000000 +0800 +--- krb5_edit/src/lib/kdb/Makefile.in 2022-08-26 16:03:35.032000000 +0800 +*************** +*** 13,22 **** + # Depends on libk5crypto and libkrb5 + + SHLIB_EXPDEPS = \ +! $(TOPLIBD)/libk5crypto$(SHLIBEXT) \ +! $(TOPLIBD)/libgssrpc$(SHLIBEXT) \ +! $(TOPLIBD)/libkrb5$(SHLIBEXT) +! SHLIB_EXPLIBS=-lgssrpc -lkrb5 -lk5crypto -lcom_err $(SUPPORT_LIB) $(DL_LIB) $(LIBS) + + adb_err.$(OBJEXT): adb_err.c + adb_err.c adb_err.h: $(srcdir)/adb_err.et +--- 13,22 ---- + # Depends on libk5crypto and libkrb5 + + SHLIB_EXPDEPS = \ +! $(TOPLIBD)/libk5crypto_gauss$(SHLIBEXT) \ +! $(TOPLIBD)/libgssrpc_gauss$(SHLIBEXT) \ +! $(TOPLIBD)/libkrb5_gauss$(SHLIBEXT) +! SHLIB_EXPLIBS=-lgssrpc_gauss -lkrb5_gauss -lk5crypto_gauss -lcom_err_gauss $(SUPPORT_LIB) $(DL_LIB) $(LIBS) + + adb_err.$(OBJEXT): adb_err.c + adb_err.c adb_err.h: $(srcdir)/adb_err.et +*************** +*** 68,83 **** + depend: adb_err.h + + t_stringattr: t_stringattr.o $(KDB5_DEPLIBS) $(KADM_COMM_DEPLIBS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o $@ t_stringattr.o $(KDB5_LIBS) $(KADM_COMM_LIBS) \ + $(KRB5_BASE_LIBS) + + t_ulog: t_ulog.o $(KDB5_DEPLIBS) $(KADM_COMM_DEPLIBS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o $@ t_ulog.o $(KDB5_LIBS) $(KADM_COMM_LIBS) \ + $(KRB5_BASE_LIBS) + + t_sort_key_data: t_sort_key_data.o $(KDB5_DEPLIBS) $(KADM_COMM_DEPLIBS) \ + $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o $@ t_sort_key_data.o \ + $(KDB5_LIBS) $(KADM_COMM_LIBS) $(CMOCKA_LIBS) $(KRB5_BASE_LIBS) + @lib_frag@ + @libobj_frag@ +--- 68,83 ---- + depend: adb_err.h + + t_stringattr: t_stringattr.o $(KDB5_DEPLIBS) $(KADM_COMM_DEPLIBS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o $@ t_stringattr.o $(KDB5_LIBS) $(KADM_COMM_LIBS) \ + $(KRB5_BASE_LIBS) + + t_ulog: t_ulog.o $(KDB5_DEPLIBS) $(KADM_COMM_DEPLIBS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o $@ t_ulog.o $(KDB5_LIBS) $(KADM_COMM_LIBS) \ + $(KRB5_BASE_LIBS) + + t_sort_key_data: t_sort_key_data.o $(KDB5_DEPLIBS) $(KADM_COMM_DEPLIBS) \ + $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o $@ t_sort_key_data.o \ + $(KDB5_LIBS) $(KADM_COMM_LIBS) $(CMOCKA_LIBS) $(KRB5_BASE_LIBS) + @lib_frag@ + @libobj_frag@ +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/lib/krad/Makefile.in krb5_edit/src/lib/krad/Makefile.in +*** krb5/src/lib/krad/Makefile.in 2022-08-26 16:04:07.140000000 +0800 +--- krb5_edit/src/lib/krad/Makefile.in 2022-08-26 16:03:35.036000000 +0800 +*************** +*** 44,70 **** + + T_ATTR_OBJS=attr.o t_attr.o + t_attr: $(T_ATTR_OBJS) $(TESTDEPS) +! $(CC_LINK) -o $@ $(T_ATTR_OBJS) $(TESTLIBS) + + T_ATTRSET_OBJS=attr.o attrset.o t_attrset.o + t_attrset: $(T_ATTRSET_OBJS) $(TESTDEPS) +! $(CC_LINK) -o $@ $(T_ATTRSET_OBJS) $(TESTLIBS) + + T_CODE_OBJS=code.o t_code.o + t_code: $(T_CODE_OBJS) $(TESTDEPS) +! $(CC_LINK) -o $@ $(T_CODE_OBJS) $(TESTLIBS) + + T_PACKET_OBJS=attr.o attrset.o code.o packet.o t_packet.o + t_packet: $(T_PACKET_OBJS) $(TESTDEPS) +! $(CC_LINK) -o $@ $(T_PACKET_OBJS) $(TESTLIBS) + + T_REMOTE_OBJS=attr.o attrset.o code.o packet.o remote.o t_remote.o + t_remote: $(T_REMOTE_OBJS) $(TESTDEPS) $(VERTO_DEPLIB) +! $(CC_LINK) -o $@ $(T_REMOTE_OBJS) $(TESTLIBS) $(VERTO_LIBS) + + T_CLIENT_OBJS=attr.o attrset.o code.o packet.o remote.o client.o t_client.o + t_client: $(T_CLIENT_OBJS) $(TESTDEPS) $(VERTO_DEPLIB) +! $(CC_LINK) -o $@ $(T_CLIENT_OBJS) $(TESTLIBS) $(VERTO_LIBS) + + clean-unix:: clean-libobjs + $(RM) *.o t_attr t_attrset t_code t_packet t_remote t_client +--- 44,70 ---- + + T_ATTR_OBJS=attr.o t_attr.o + t_attr: $(T_ATTR_OBJS) $(TESTDEPS) +! $(CC_LINK) -pie -o $@ $(T_ATTR_OBJS) $(TESTLIBS) + + T_ATTRSET_OBJS=attr.o attrset.o t_attrset.o + t_attrset: $(T_ATTRSET_OBJS) $(TESTDEPS) +! $(CC_LINK) -pie -o $@ $(T_ATTRSET_OBJS) $(TESTLIBS) + + T_CODE_OBJS=code.o t_code.o + t_code: $(T_CODE_OBJS) $(TESTDEPS) +! $(CC_LINK) -pie -o $@ $(T_CODE_OBJS) $(TESTLIBS) + + T_PACKET_OBJS=attr.o attrset.o code.o packet.o t_packet.o + t_packet: $(T_PACKET_OBJS) $(TESTDEPS) +! $(CC_LINK) -pie -o $@ $(T_PACKET_OBJS) $(TESTLIBS) + + T_REMOTE_OBJS=attr.o attrset.o code.o packet.o remote.o t_remote.o + t_remote: $(T_REMOTE_OBJS) $(TESTDEPS) $(VERTO_DEPLIB) +! $(CC_LINK) -pie -o $@ $(T_REMOTE_OBJS) $(TESTLIBS) $(VERTO_LIBS) + + T_CLIENT_OBJS=attr.o attrset.o code.o packet.o remote.o client.o t_client.o + t_client: $(T_CLIENT_OBJS) $(TESTDEPS) $(VERTO_DEPLIB) +! $(CC_LINK) -pie -o $@ $(T_CLIENT_OBJS) $(TESTLIBS) $(VERTO_LIBS) + + clean-unix:: clean-libobjs + $(RM) *.o t_attr t_attrset t_code t_packet t_remote t_client +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/lib/krb5/ccache/Makefile.in krb5_edit/src/lib/krb5/ccache/Makefile.in +*** krb5/src/lib/krb5/ccache/Makefile.in 2022-08-26 16:04:07.140000000 +0800 +--- krb5_edit/src/lib/krb5/ccache/Makefile.in 2022-08-26 16:03:35.040000000 +0800 +*************** +*** 126,144 **** + T_CC_OBJS=t_cc.o + + t_cc: $(T_CC_OBJS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o t_cc $(T_CC_OBJS) $(KRB5_BASE_LIBS) + + T_CCCOL_OBJS = t_cccol.o + t_cccol: $(T_CCCOL_OBJS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o $@ $(T_CCCOL_OBJS) $(KRB5_BASE_LIBS) + + T_CCCURSOR_OBJS = t_cccursor.o + t_cccursor: $(T_CCCURSOR_OBJS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o $@ $(T_CCCURSOR_OBJS) $(KRB5_BASE_LIBS) + + T_MARSHAL_OBJS = t_marshal.o + t_marshal: $(T_MARSHAL_OBJS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o $@ $(T_MARSHAL_OBJS) $(KRB5_BASE_LIBS) + + check-unix: t_cc t_marshal + $(RUN_TEST) ./t_cc +--- 126,144 ---- + T_CC_OBJS=t_cc.o + + t_cc: $(T_CC_OBJS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o t_cc $(T_CC_OBJS) $(KRB5_BASE_LIBS) + + T_CCCOL_OBJS = t_cccol.o + t_cccol: $(T_CCCOL_OBJS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o $@ $(T_CCCOL_OBJS) $(KRB5_BASE_LIBS) + + T_CCCURSOR_OBJS = t_cccursor.o + t_cccursor: $(T_CCCURSOR_OBJS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o $@ $(T_CCCURSOR_OBJS) $(KRB5_BASE_LIBS) + + T_MARSHAL_OBJS = t_marshal.o + t_marshal: $(T_MARSHAL_OBJS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o $@ $(T_MARSHAL_OBJS) $(KRB5_BASE_LIBS) + + check-unix: t_cc t_marshal + $(RUN_TEST) ./t_cc +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/lib/krb5/keytab/Makefile.in krb5_edit/src/lib/krb5/keytab/Makefile.in +*** krb5/src/lib/krb5/keytab/Makefile.in 2022-08-26 16:04:07.148000000 +0800 +--- krb5_edit/src/lib/krb5/keytab/Makefile.in 2022-08-26 16:03:35.044000000 +0800 +*************** +*** 55,61 **** + + T_KEYTAB_OBJS = t_keytab.o + t_keytab: $(T_KEYTAB_OBJS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o $@ $(T_KEYTAB_OBJS) $(KRB5_BASE_LIBS) + + clean-unix:: + $(RM) t_keytab t_keytab.o +--- 55,61 ---- + + T_KEYTAB_OBJS = t_keytab.o + t_keytab: $(T_KEYTAB_OBJS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o $@ $(T_KEYTAB_OBJS) $(KRB5_BASE_LIBS) + + clean-unix:: + $(RM) t_keytab t_keytab.o +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/lib/krb5/krb/init_ctx.c krb5_edit/src/lib/krb5/krb/init_ctx.c +*** krb5/src/lib/krb5/krb/init_ctx.c 2022-08-26 16:04:07.152000000 +0800 +--- krb5_edit/src/lib/krb5/krb/init_ctx.c 2022-08-26 16:03:35.052000000 +0800 +*************** +*** 56,61 **** +--- 56,64 ---- + #include "brand.c" + #include "../krb5_libinit.h" + ++ __thread char *G_DEFAULT_PROFILE_PATH = NULL; ++ __thread char *G_DEFAULT_CACHE_PATH = NULL; ++ + static krb5_enctype default_enctype_list[] = { + ENCTYPE_AES256_CTS_HMAC_SHA1_96, ENCTYPE_AES128_CTS_HMAC_SHA1_96, + ENCTYPE_AES256_CTS_HMAC_SHA384_192, ENCTYPE_AES128_CTS_HMAC_SHA256_128, +*************** +*** 120,125 **** +--- 123,175 ---- + return 0; + } + ++ void KRB5_CALLCONV ++ krb5_set_profile_path(char *profile_path) ++ { ++ if (NULL != profile_path) { ++ if (profile_path[0] == '\0') { ++ if (NULL != G_DEFAULT_PROFILE_PATH) { ++ free(G_DEFAULT_PROFILE_PATH); ++ } ++ G_DEFAULT_PROFILE_PATH = strdup(DEFAULT_PROFILE_PATH); ++ } else { ++ if (NULL == G_DEFAULT_PROFILE_PATH) { ++ G_DEFAULT_PROFILE_PATH = strdup(profile_path); ++ } else if (strcasecmp(profile_path, G_DEFAULT_PROFILE_PATH)) { ++ free(G_DEFAULT_PROFILE_PATH); ++ G_DEFAULT_PROFILE_PATH = strdup(profile_path); ++ } ++ } ++ } ++ } ++ ++ void KRB5_CALLCONV ++ krb5_set_cache_path(char *cache_path) ++ { ++ if (NULL != cache_path && cache_path[0] != '\0') { ++ if (NULL == G_DEFAULT_CACHE_PATH) { ++ G_DEFAULT_CACHE_PATH = strdup(cache_path); ++ } else if (strcasecmp(cache_path, G_DEFAULT_CACHE_PATH)) { ++ free(G_DEFAULT_CACHE_PATH); ++ G_DEFAULT_CACHE_PATH = strdup(cache_path); ++ } ++ } ++ } ++ ++ void KRB5_CALLCONV ++ krb5_clean_cache_profile_path() ++ { ++ if (NULL != G_DEFAULT_CACHE_PATH) { ++ free(G_DEFAULT_CACHE_PATH); ++ G_DEFAULT_CACHE_PATH = NULL; ++ } ++ ++ if (NULL != G_DEFAULT_PROFILE_PATH) { ++ free(G_DEFAULT_PROFILE_PATH); ++ G_DEFAULT_PROFILE_PATH = NULL; ++ } ++ } ++ + krb5_error_code KRB5_CALLCONV + krb5_init_context(krb5_context *context) + { +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/lib/krb5/krb/Makefile.in krb5_edit/src/lib/krb5/krb/Makefile.in +*** krb5/src/lib/krb5/krb/Makefile.in 2022-08-26 16:04:07.148000000 +0800 +--- krb5_edit/src/lib/krb5/krb/Makefile.in 2022-08-26 16:03:35.044000000 +0800 +*************** +*** 410,475 **** + T_PARSE_HOST_STRING_OBJS= t_parse_host_string.o parse_host_string.o + + t_walk_rtree: $(T_WALK_RTREE_OBJS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o t_walk_rtree $(T_WALK_RTREE_OBJS) $(KRB5_BASE_LIBS) + t_ad_fx_armor: t_ad_fx_armor.o +! $(CC_LINK) -o $@ t_ad_fx_armor.o $(KRB5_BASE_LIBS) + + t_authdata: t_authdata.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o $@ t_authdata.o $(KRB5_BASE_LIBS) + + t_kerb: $(T_KERB_OBJS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o t_kerb $(T_KERB_OBJS) $(KRB5_BASE_LIBS) + + t_ser: $(T_SER_OBJS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o t_ser $(T_SER_OBJS) $(KRB5_BASE_LIBS) + + t_deltat : $(T_DELTAT_OBJS) $(SUPPORT_DEPLIB) +! $(CC_LINK) -o t_deltat $(T_DELTAT_OBJS) $(SUPPORT_LIB) + + T_EXPAND_OBJS=t_expand.o + t_expand.o : t_expand.c + t_expand : $(T_EXPAND_OBJS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o t_expand $(T_EXPAND_OBJS) $(KRB5_BASE_LIBS) + + t_pac: $(T_PAC_OBJS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o t_pac $(T_PAC_OBJS) $(KRB5_BASE_LIBS) + + t_princ: $(T_PRINC_OBJS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o t_princ $(T_PRINC_OBJS) $(KRB5_BASE_LIBS) + + t_etypes: $(T_ETYPES_OBJS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o t_etypes $(T_ETYPES_OBJS) $(KRB5_BASE_LIBS) + + t_parse_host_string: $(T_PARSE_HOST_STRING_OBJS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o $@ $(T_PARSE_HOST_STRING_OBJS) $(CMOCKA_LIBS) \ + $(KRB5_BASE_LIBS) + + t_expire_warn: t_expire_warn.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o $@ t_expire_warn.o $(KRB5_BASE_LIBS) + + t_vfy_increds: t_vfy_increds.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o $@ t_vfy_increds.o $(KRB5_BASE_LIBS) + + t_in_ccache: t_in_ccache.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o $@ t_in_ccache.o $(KRB5_BASE_LIBS) + + t_cc_config: t_cc_config.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o $@ t_cc_config.o $(KRB5_BASE_LIBS) + + t_copy_context: t_copy_context.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o $@ t_copy_context.o $(KRB5_BASE_LIBS) + + t_response_items: t_response_items.o response_items.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o $@ t_response_items.o response_items.o $(KRB5_BASE_LIBS) + + t_sname_match: t_sname_match.o sname_match.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o $@ t_sname_match.o sname_match.o $(KRB5_BASE_LIBS) + + t_valid_times: t_valid_times.o valid_times.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o $@ t_valid_times.o valid_times.o $(KRB5_BASE_LIBS) + + t_get_etype_info: t_get_etype_info.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o $@ t_get_etype_info.o $(KRB5_BASE_LIBS) + + TEST_PROGS= t_walk_rtree t_kerb t_ser t_deltat t_expand t_authdata t_pac \ + t_in_ccache t_cc_config t_copy_context t_princ t_etypes t_vfy_increds \ +--- 410,475 ---- + T_PARSE_HOST_STRING_OBJS= t_parse_host_string.o parse_host_string.o + + t_walk_rtree: $(T_WALK_RTREE_OBJS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o t_walk_rtree $(T_WALK_RTREE_OBJS) $(KRB5_BASE_LIBS) + t_ad_fx_armor: t_ad_fx_armor.o +! $(CC_LINK) -pie -o $@ t_ad_fx_armor.o $(KRB5_BASE_LIBS) + + t_authdata: t_authdata.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o $@ t_authdata.o $(KRB5_BASE_LIBS) + + t_kerb: $(T_KERB_OBJS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o t_kerb $(T_KERB_OBJS) $(KRB5_BASE_LIBS) + + t_ser: $(T_SER_OBJS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o t_ser $(T_SER_OBJS) $(KRB5_BASE_LIBS) + + t_deltat : $(T_DELTAT_OBJS) $(SUPPORT_DEPLIB) +! $(CC_LINK) -pie -o t_deltat $(T_DELTAT_OBJS) $(SUPPORT_LIB) + + T_EXPAND_OBJS=t_expand.o + t_expand.o : t_expand.c + t_expand : $(T_EXPAND_OBJS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o t_expand $(T_EXPAND_OBJS) $(KRB5_BASE_LIBS) + + t_pac: $(T_PAC_OBJS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o t_pac $(T_PAC_OBJS) $(KRB5_BASE_LIBS) + + t_princ: $(T_PRINC_OBJS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o t_princ $(T_PRINC_OBJS) $(KRB5_BASE_LIBS) + + t_etypes: $(T_ETYPES_OBJS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o t_etypes $(T_ETYPES_OBJS) $(KRB5_BASE_LIBS) + + t_parse_host_string: $(T_PARSE_HOST_STRING_OBJS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o $@ $(T_PARSE_HOST_STRING_OBJS) $(CMOCKA_LIBS) \ + $(KRB5_BASE_LIBS) + + t_expire_warn: t_expire_warn.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o $@ t_expire_warn.o $(KRB5_BASE_LIBS) + + t_vfy_increds: t_vfy_increds.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o $@ t_vfy_increds.o $(KRB5_BASE_LIBS) + + t_in_ccache: t_in_ccache.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o $@ t_in_ccache.o $(KRB5_BASE_LIBS) + + t_cc_config: t_cc_config.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o $@ t_cc_config.o $(KRB5_BASE_LIBS) + + t_copy_context: t_copy_context.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o $@ t_copy_context.o $(KRB5_BASE_LIBS) + + t_response_items: t_response_items.o response_items.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o $@ t_response_items.o response_items.o $(KRB5_BASE_LIBS) + + t_sname_match: t_sname_match.o sname_match.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o $@ t_sname_match.o sname_match.o $(KRB5_BASE_LIBS) + + t_valid_times: t_valid_times.o valid_times.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o $@ t_valid_times.o valid_times.o $(KRB5_BASE_LIBS) + + t_get_etype_info: t_get_etype_info.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o $@ t_get_etype_info.o $(KRB5_BASE_LIBS) + + TEST_PROGS= t_walk_rtree t_kerb t_ser t_deltat t_expand t_authdata t_pac \ + t_in_ccache t_cc_config t_copy_context t_princ t_etypes t_vfy_increds \ +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/lib/krb5/libkrb5.exports krb5_edit/src/lib/krb5/libkrb5.exports +*** krb5/src/lib/krb5/libkrb5.exports 2022-08-26 16:04:07.164000000 +0800 +--- krb5_edit/src/lib/krb5/libkrb5.exports 2022-08-26 16:03:35.060000000 +0800 +*************** +*** 650,652 **** +--- 650,655 ---- + profile_ser_internalize + profile_ser_size + profile_update_relation ++ krb5_set_cache_path ++ krb5_set_profile_path ++ krb5_clean_cache_profile_path +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/lib/krb5/libkrb5_gauss.exports krb5_edit/src/lib/krb5/libkrb5_gauss.exports +*** krb5/src/lib/krb5/libkrb5_gauss.exports 1970-01-01 08:00:00.000000000 +0800 +--- krb5_edit/src/lib/krb5/libkrb5_gauss.exports 2022-08-26 16:03:35.060000000 +0800 +*************** +*** 0 **** +--- 1,655 ---- ++ _krb5_conf_boolean ++ decode_krb5_ad_kdcissued ++ decode_krb5_ad_signedpath ++ decode_krb5_ap_rep ++ decode_krb5_ap_rep_enc_part ++ decode_krb5_ap_req ++ decode_krb5_as_rep ++ decode_krb5_as_req ++ decode_krb5_authdata ++ decode_krb5_authenticator ++ decode_krb5_cammac ++ decode_krb5_cred ++ decode_krb5_enc_cred_part ++ decode_krb5_enc_data ++ decode_krb5_enc_kdc_rep_part ++ decode_krb5_enc_priv_part ++ decode_krb5_enc_sam_response_enc_2 ++ decode_krb5_enc_tkt_part ++ decode_krb5_encryption_key ++ decode_krb5_error ++ decode_krb5_etype_info ++ decode_krb5_etype_info2 ++ decode_krb5_fast_req ++ decode_krb5_fast_response ++ decode_krb5_iakerb_finished ++ decode_krb5_iakerb_header ++ decode_krb5_kdc_req_body ++ decode_krb5_otp_tokeninfo ++ decode_krb5_kkdcp_message ++ decode_krb5_pa_enc_ts ++ decode_krb5_pa_for_user ++ decode_krb5_pa_fx_fast_reply ++ decode_krb5_pa_fx_fast_request ++ decode_krb5_pa_otp_challenge ++ decode_krb5_pa_otp_req ++ decode_krb5_pa_otp_enc_req ++ decode_krb5_pa_pac_options ++ decode_krb5_pa_pac_req ++ decode_krb5_pa_s4u_x509_user ++ decode_krb5_pa_spake ++ decode_krb5_padata_sequence ++ decode_krb5_priv ++ decode_krb5_safe ++ decode_krb5_sam_challenge_2 ++ decode_krb5_sam_challenge_2_body ++ decode_krb5_sam_response_2 ++ decode_krb5_secure_cookie ++ decode_krb5_setpw_req ++ decode_krb5_spake_factor ++ decode_krb5_tgs_rep ++ decode_krb5_tgs_req ++ decode_krb5_ticket ++ decode_krb5_typed_data ++ decode_utf8_strings ++ encode_krb5_ad_kdcissued ++ encode_krb5_ad_signedpath_data ++ encode_krb5_ad_signedpath ++ encode_krb5_ap_rep ++ encode_krb5_ap_rep_enc_part ++ encode_krb5_ap_req ++ encode_krb5_as_rep ++ encode_krb5_as_req ++ encode_krb5_authdata ++ encode_krb5_authenticator ++ encode_krb5_cammac ++ encode_krb5_checksum ++ encode_krb5_cred ++ encode_krb5_enc_cred_part ++ encode_krb5_enc_data ++ encode_krb5_enc_kdc_rep_part ++ encode_krb5_enc_priv_part ++ encode_krb5_enc_sam_response_enc_2 ++ encode_krb5_enc_tkt_part ++ encode_krb5_encryption_key ++ encode_krb5_error ++ encode_krb5_etype_info ++ encode_krb5_etype_info2 ++ encode_krb5_fast_response ++ encode_krb5_iakerb_finished ++ encode_krb5_iakerb_header ++ encode_krb5_kdc_req_body ++ encode_krb5_otp_tokeninfo ++ encode_krb5_kkdcp_message ++ encode_krb5_pa_enc_ts ++ encode_krb5_pa_for_user ++ encode_krb5_pa_fx_fast_reply ++ encode_krb5_pa_otp_challenge ++ encode_krb5_pa_otp_req ++ encode_krb5_pa_otp_enc_req ++ encode_krb5_pa_pac_options ++ encode_krb5_pa_s4u_x509_user ++ encode_krb5_pa_spake ++ encode_krb5_padata_sequence ++ encode_krb5_pkinit_supp_pub_info ++ encode_krb5_priv ++ encode_krb5_s4u_userid ++ encode_krb5_safe ++ encode_krb5_sam_challenge_2 ++ encode_krb5_sam_challenge_2_body ++ encode_krb5_sam_response_2 ++ encode_krb5_secure_cookie ++ encode_krb5_sp80056a_other_info ++ encode_krb5_spake_factor ++ encode_krb5_tgs_rep ++ encode_krb5_tgs_req ++ encode_krb5_ticket ++ encode_krb5_typed_data ++ encode_utf8_strings ++ et_asn1_error_table ++ et_k524_error_table ++ et_kdb5_error_table ++ et_krb5_error_table ++ et_kv5m_error_table ++ et_prof_error_table ++ initialize_asn1_error_table ++ initialize_k524_error_table ++ initialize_kdb5_error_table ++ initialize_krb5_error_table ++ initialize_k5e1_error_table ++ initialize_kv5m_error_table ++ initialize_prof_error_table ++ k5_add_empty_pa_data ++ k5_add_pa_data_element ++ k5_add_pa_data_from_data ++ k5_alloc_pa_data ++ k5_authind_decode ++ k5_build_conf_principals ++ k5_ccselect_free_context ++ k5_change_error_message_code ++ k5_etypes_contains ++ k5_expand_path_tokens ++ k5_expand_path_tokens_extra ++ k5_externalize_auth_context ++ k5_externalize_authdata ++ k5_externalize_authdata_context ++ k5_externalize_context ++ k5_externalize_keyblock ++ k5_externalize_principal ++ k5_free_algorithm_identifier ++ k5_free_cammac ++ k5_free_data_ptr_list ++ k5_free_otp_tokeninfo ++ k5_free_kkdcp_message ++ k5_free_pa_data_element ++ k5_free_pa_otp_challenge ++ k5_free_pa_otp_req ++ k5_free_secure_cookie ++ k5_free_pa_spake ++ k5_free_serverlist ++ k5_free_spake_factor ++ k5_hostrealm_free_context ++ k5_init_trace ++ k5_internalize_auth_context ++ k5_internalize_authdata ++ k5_internalize_authdata_context ++ k5_internalize_context ++ k5_internalize_keyblock ++ k5_internalize_principal ++ k5_is_string_numeric ++ k5_kt_get_principal ++ k5_localauth_free_context ++ k5_locate_kdc ++ k5_marshal_cred ++ k5_marshal_princ ++ k5_os_free_context ++ k5_os_init_context ++ k5_parse_host_string ++ k5_plugin_free_modules ++ k5_plugin_load ++ k5_plugin_load_all ++ k5_plugin_register ++ k5_plugin_register_dyn ++ k5_rc_close ++ k5_rc_get_name ++ k5_rc_resolve ++ k5_size_auth_context ++ k5_size_authdata ++ k5_size_authdata_context ++ k5_size_context ++ k5_size_keyblock ++ k5_size_principal ++ k5_unmarshal_cred ++ k5_unmarshal_princ ++ k5_unwrap_cammac_svc ++ k5_zapfree_pa_data ++ krb524_convert_creds_kdc ++ krb524_init_ets ++ krb5_425_conv_principal ++ krb5_524_conv_principal ++ krb5_524_convert_creds ++ krb5_address_compare ++ krb5_address_order ++ krb5_address_search ++ krb5_allow_weak_crypto ++ krb5_aname_to_localname ++ krb5_anonymous_principal ++ krb5_anonymous_realm ++ krb5_appdefault_boolean ++ krb5_appdefault_string ++ krb5_auth_con_free ++ krb5_auth_con_genaddrs ++ krb5_auth_con_get_checksum_func ++ krb5_auth_con_get_authdata_context ++ krb5_auth_con_getaddrs ++ krb5_auth_con_getauthenticator ++ krb5_auth_con_getflags ++ krb5_auth_con_getivector ++ krb5_auth_con_getkey ++ krb5_auth_con_getkey_k ++ krb5_auth_con_getlocalseqnumber ++ krb5_auth_con_getlocalsubkey ++ krb5_auth_con_getpermetypes ++ krb5_auth_con_getrcache ++ krb5_auth_con_getrecvsubkey ++ krb5_auth_con_getrecvsubkey_k ++ krb5_auth_con_getremoteseqnumber ++ krb5_auth_con_getremotesubkey ++ krb5_auth_con_getsendsubkey ++ krb5_auth_con_getsendsubkey_k ++ krb5_auth_con_init ++ krb5_auth_con_initivector ++ krb5_auth_con_set_authdata_context ++ krb5_auth_con_set_checksum_func ++ krb5_auth_con_set_req_cksumtype ++ krb5_auth_con_set_safe_cksumtype ++ krb5_auth_con_setaddrs ++ krb5_auth_con_setflags ++ krb5_auth_con_setivector ++ krb5_auth_con_setpermetypes ++ krb5_auth_con_setports ++ krb5_auth_con_setrcache ++ krb5_auth_con_setrecvsubkey ++ krb5_auth_con_setrecvsubkey_k ++ krb5_auth_con_setsendsubkey ++ krb5_auth_con_setsendsubkey_k ++ krb5_auth_con_setuseruserkey ++ krb5_authdata_context_copy ++ krb5_authdata_context_free ++ krb5_authdata_context_init ++ krb5_authdata_delete_attribute ++ krb5_authdata_get_attribute_types ++ krb5_authdata_get_attribute ++ krb5_authdata_set_attribute ++ krb5_authdata_export_attributes ++ krb5_authdata_export_authdata ++ krb5_authdata_export_internal ++ krb5_authdata_free_internal ++ krb5_authdata_import_attributes ++ krb5_build_principal ++ krb5_build_principal_alloc_va ++ krb5_build_principal_ext ++ krb5_build_principal_va ++ krb5_cc_cache_match ++ krb5_cc_close ++ krb5_cc_copy_creds ++ krb5_cc_default ++ krb5_cc_default_name ++ krb5_cc_destroy ++ krb5_cc_dfl_ops ++ krb5_cc_dup ++ krb5_cc_end_seq_get ++ krb5_cc_file_ops ++ krb5_cc_gen_new ++ krb5_cc_get_config ++ krb5_cc_get_full_name ++ krb5_cc_get_name ++ krb5_cc_get_principal ++ krb5_cc_get_type ++ krb5_cc_move ++ krb5_cc_initialize ++ krb5_cc_new_unique ++ krb5_cc_next_cred ++ krb5_cc_register ++ krb5_cc_remove_cred ++ krb5_cc_resolve ++ krb5_cc_retrieve_cred ++ krb5_cc_select ++ krb5_cc_set_config ++ krb5_cc_set_default_name ++ krb5_cc_set_flags ++ krb5_cc_start_seq_get ++ krb5_cc_store_cred ++ krb5_cc_support_switch ++ krb5_cc_switch ++ krb5_cccol_cursor_free ++ krb5_cccol_cursor_new ++ krb5_cccol_cursor_next ++ krb5_cccol_have_content ++ krb5_change_cache ++ krb5_change_password ++ krb5_check_clockskew ++ krb5_check_transited_list ++ krb5_chpw_message ++ krb5_chpw_result_code_string ++ krb5_clear_error_message ++ krb5_copy_addr ++ krb5_copy_addresses ++ krb5_copy_authdata ++ krb5_copy_authenticator ++ krb5_copy_checksum ++ krb5_copy_context ++ krb5_copy_creds ++ krb5_copy_data ++ krb5_copy_error_message ++ krb5_copy_keyblock ++ krb5_copy_keyblock_contents ++ krb5_copy_principal ++ krb5_copy_ticket ++ krb5_crypto_us_timeofday ++ krb5_decode_authdata_container ++ krb5_decode_ticket ++ krb5_decrypt_tkt_part ++ krb5_deltat_to_string ++ krb5_encode_authdata_container ++ krb5_encode_kdc_rep ++ krb5_encrypt_helper ++ krb5_encrypt_tkt_part ++ krb5_expand_hostname ++ krb5_fcc_ops ++ krb5_find_authdata ++ krb5_free_ad_kdcissued ++ krb5_free_ad_signedpath ++ krb5_free_address ++ krb5_free_addresses ++ krb5_free_ap_rep ++ krb5_free_ap_rep_enc_part ++ krb5_free_ap_req ++ krb5_free_authdata ++ krb5_free_authenticator ++ krb5_free_authenticator_contents ++ krb5_free_checksum ++ krb5_free_checksum_contents ++ krb5_free_config_files ++ krb5_free_context ++ krb5_free_cred ++ krb5_free_cred_contents ++ krb5_free_cred_enc_part ++ krb5_free_creds ++ krb5_free_data ++ krb5_free_data_contents ++ krb5_free_default_realm ++ krb5_free_enc_data ++ krb5_free_enc_kdc_rep_part ++ krb5_free_enc_sam_response_enc_2 ++ krb5_free_enc_sam_response_enc_2_contents ++ krb5_free_enc_tkt_part ++ krb5_free_enctypes ++ krb5_free_error ++ krb5_free_error_message ++ krb5_free_etype_info ++ krb5_free_fast_armored_req ++ krb5_free_fast_req ++ krb5_free_fast_response ++ krb5_free_host_realm ++ krb5_free_iakerb_finished ++ krb5_free_iakerb_header ++ krb5_free_kdc_rep ++ krb5_free_kdc_req ++ krb5_free_keyblock ++ krb5_free_keyblock_contents ++ krb5_free_keytab_entry_contents ++ krb5_free_last_req ++ krb5_free_octet_data ++ krb5_free_pa_data ++ krb5_free_pa_enc_ts ++ krb5_free_pa_for_user ++ krb5_free_pa_pac_req ++ krb5_free_pa_s4u_x509_user ++ krb5_free_principal ++ krb5_free_priv ++ krb5_free_priv_enc_part ++ krb5_free_realm_tree ++ krb5_free_safe ++ krb5_free_sam_challenge_2 ++ krb5_free_sam_challenge_2_body ++ krb5_free_sam_challenge_2_body_contents ++ krb5_free_sam_challenge_2_contents ++ krb5_free_sam_response_2 ++ krb5_free_sam_response_2_contents ++ krb5_free_string ++ krb5_free_tgt_creds ++ krb5_free_ticket ++ krb5_free_tickets ++ krb5_free_tkt_authent ++ krb5_free_unparsed_name ++ krb5_fwd_tgt_creds ++ krb5_gen_portaddr ++ krb5_gen_replay_name ++ krb5_generate_seq_number ++ krb5_generate_subkey ++ krb5_get_cred_via_tkt ++ krb5_get_credentials ++ krb5_get_credentials_for_proxy ++ krb5_get_credentials_for_user ++ krb5_get_credentials_renew ++ krb5_get_credentials_validate ++ krb5_get_default_config_files ++ krb5_get_default_in_tkt_ktypes ++ krb5_get_default_realm ++ krb5_get_error_message ++ krb5_get_etype_info ++ krb5_get_fallback_host_realm ++ krb5_get_host_realm ++ krb5_get_in_tkt_with_keytab ++ krb5_get_in_tkt_with_password ++ krb5_get_in_tkt_with_skey ++ krb5_get_init_creds_keytab ++ krb5_get_init_creds_opt_alloc ++ krb5_get_init_creds_opt_free ++ krb5_get_init_creds_opt_free_pa ++ krb5_get_init_creds_opt_get_fast_flags ++ krb5_get_init_creds_opt_get_pa ++ krb5_get_init_creds_opt_init ++ krb5_get_init_creds_opt_set_address_list ++ krb5_get_init_creds_opt_set_anonymous ++ krb5_get_init_creds_opt_set_canonicalize ++ krb5_get_init_creds_opt_set_change_password_prompt ++ krb5_get_init_creds_opt_set_etype_list ++ krb5_get_init_creds_opt_set_expire_callback ++ krb5_get_init_creds_opt_set_fast_ccache ++ krb5_get_init_creds_opt_set_fast_ccache_name ++ krb5_get_init_creds_opt_set_fast_flags ++ krb5_get_init_creds_opt_set_forwardable ++ krb5_get_init_creds_opt_set_in_ccache ++ krb5_get_init_creds_opt_set_out_ccache ++ krb5_get_init_creds_opt_set_pa ++ krb5_get_init_creds_opt_set_pac_request ++ krb5_get_init_creds_opt_set_preauth_list ++ krb5_get_init_creds_opt_set_proxiable ++ krb5_get_init_creds_opt_set_renew_life ++ krb5_get_init_creds_opt_set_responder ++ krb5_get_init_creds_opt_set_salt ++ krb5_get_init_creds_opt_set_tkt_life ++ krb5_get_init_creds_password ++ krb5_get_notification_message ++ krb5_get_permitted_enctypes ++ krb5_get_profile ++ krb5_get_prompt_types ++ krb5_get_realm_domain ++ krb5_get_renewed_creds ++ krb5_get_server_rcache ++ krb5_get_tgs_ktypes ++ krb5_get_time_offsets ++ krb5_get_validated_creds ++ krb5_init_context ++ krb5_init_context_profile ++ krb5_init_creds_free ++ krb5_init_creds_get ++ krb5_init_creds_get_creds ++ krb5_init_creds_get_error ++ krb5_init_creds_get_times ++ krb5_init_creds_init ++ krb5_init_creds_set_keytab ++ krb5_init_creds_set_password ++ krb5_init_creds_set_service ++ krb5_init_creds_step ++ krb5_init_keyblock ++ krb5_init_secure_context ++ krb5_is_config_principal ++ krb5_is_permitted_enctype ++ krb5_is_referral_realm ++ krb5_is_thread_safe ++ krb5_kdc_rep_decrypt_proc ++ krb5_kt_add_entry ++ krb5_kt_client_default ++ krb5_kt_close ++ krb5_kt_default ++ krb5_kt_default_name ++ krb5_kt_dfl_ops ++ krb5_kt_dup ++ krb5_kt_end_seq_get ++ krb5_kt_free_entry ++ krb5_kt_get_entry ++ krb5_kt_get_name ++ krb5_kt_get_type ++ krb5_kt_have_content ++ krb5_kt_next_entry ++ krb5_kt_read_service_key ++ krb5_kt_register ++ krb5_kt_remove_entry ++ krb5_kt_resolve ++ krb5_kt_start_seq_get ++ krb5_ktf_ops ++ krb5_ktf_writable_ops ++ krb5_kuserok ++ krb5_lock_file ++ krb5_make_authdata_kdc_issued ++ krb5_make_full_ipaddr ++ krb5_make_fulladdr ++ krb5_mcc_ops ++ krb5_merge_authdata ++ krb5_mk_1cred ++ krb5_mk_error ++ krb5_mk_ncred ++ krb5_mk_priv ++ krb5_mk_rep ++ krb5_mk_rep_dce ++ krb5_mk_req ++ krb5_mk_req_extended ++ krb5_mk_safe ++ krb5_net_read ++ krb5_net_write ++ krb5_os_localaddr ++ krb5_overridekeyname ++ krb5_pac_add_buffer ++ krb5_pac_free ++ krb5_pac_get_buffer ++ krb5_pac_get_types ++ krb5_pac_init ++ krb5_pac_parse ++ krb5_pac_sign ++ krb5_pac_sign_ext ++ krb5_pac_verify ++ krb5_pac_verify_ext ++ krb5_pac_get_client_info ++ krb5_parse_name ++ krb5_parse_name_flags ++ krb5_prepend_error_message ++ krb5_principal2salt ++ krb5_principal2salt_norealm ++ krb5_principal_compare ++ krb5_principal_compare_any_realm ++ krb5_principal_compare_flags ++ krb5_prompter_posix ++ krb5_rc_default ++ krb5_rc_destroy ++ krb5_rc_get_lifespan ++ krb5_rc_initialize ++ krb5_rd_cred ++ krb5_rd_error ++ krb5_rd_priv ++ krb5_rd_rep ++ krb5_rd_rep_dce ++ krb5_rd_req ++ krb5_rd_req_decoded ++ krb5_rd_req_decoded_anyflag ++ krb5_rd_safe ++ krb5_read_message ++ krb5_read_password ++ krb5_realm_compare ++ krb5_recvauth ++ krb5_recvauth_version ++ krb5_responder_get_challenge ++ krb5_responder_list_questions ++ krb5_responder_set_answer ++ krb5_responder_otp_get_challenge ++ krb5_responder_otp_set_answer ++ krb5_responder_otp_challenge_free ++ krb5_responder_pkinit_get_challenge ++ krb5_responder_pkinit_set_answer ++ krb5_responder_pkinit_challenge_free ++ krb5_salttype_to_string ++ krb5_sendauth ++ krb5_sendto_kdc ++ krb5_ser_pack_bytes ++ krb5_ser_pack_int32 ++ krb5_ser_pack_int64 ++ krb5_ser_unpack_bytes ++ krb5_ser_unpack_int32 ++ krb5_ser_unpack_int64 ++ krb5_server_decrypt_ticket_keytab ++ krb5_set_config_files ++ krb5_set_debugging_time ++ krb5_set_default_in_tkt_ktypes ++ krb5_set_default_realm ++ krb5_set_default_tgs_enctypes ++ krb5_set_default_tgs_ktypes ++ krb5_set_error_message ++ krb5_set_password ++ krb5_set_password_using_ccache ++ krb5_set_principal_realm ++ krb5_set_real_time ++ krb5_set_kdc_send_hook ++ krb5_set_kdc_recv_hook ++ krb5_set_time_offsets ++ krb5_set_trace_callback ++ krb5_set_trace_filename ++ krb5_sname_match ++ krb5_sname_to_principal ++ krb5_string_to_deltat ++ krb5_string_to_salttype ++ krb5_string_to_timestamp ++ krb5int_tgtname ++ krb5_tkt_creds_free ++ krb5_tkt_creds_get ++ krb5_tkt_creds_get_creds ++ krb5_tkt_creds_get_times ++ krb5_tkt_creds_init ++ krb5_tkt_creds_step ++ krb5_timeofday ++ krb5_timestamp_to_sfstring ++ krb5_timestamp_to_string ++ krb5_unlock_file ++ krb5_unpack_full_ipaddr ++ krb5_unparse_name ++ krb5_unparse_name_ext ++ krb5_unparse_name_flags ++ krb5_unparse_name_flags_ext ++ krb5_us_timeofday ++ krb5_use_natural_time ++ krb5_verify_authdata_kdc_issued ++ krb5_verify_init_creds ++ krb5_verify_init_creds_opt_init ++ krb5_verify_init_creds_opt_set_ap_req_nofail ++ krb5_vprepend_error_message ++ krb5_vset_error_message ++ krb5_vwrap_error_message ++ krb5_walk_realm_tree ++ krb5_wrap_error_message ++ krb5_write_message ++ krb5int_accessor ++ krb5int_cc_default ++ krb5int_cleanup_library ++ krb5int_copy_data_contents ++ krb5int_copy_data_contents_add0 ++ krb5int_find_pa_data ++ krb5int_foreach_localaddr ++ krb5int_free_data_list ++ krb5int_get_authdata_containee_types ++ krb5int_init_context_kdc ++ krb5int_initialize_library ++ krb5int_parse_enctype_list ++ krb5int_random_string ++ krb5int_trace ++ profile_abandon ++ profile_add_relation ++ profile_clear_relation ++ profile_flush ++ profile_flush_to_buffer ++ profile_flush_to_file ++ profile_free_buffer ++ profile_free_list ++ profile_get_boolean ++ profile_get_integer ++ profile_get_relation_names ++ profile_get_string ++ profile_get_subsection_names ++ profile_get_values ++ profile_init ++ profile_init_flags ++ profile_init_path ++ profile_init_vtable ++ profile_iterator ++ profile_iterator_create ++ profile_iterator_free ++ profile_release ++ profile_release_string ++ profile_rename_section ++ profile_ser_externalize ++ profile_ser_internalize ++ profile_ser_size ++ profile_update_relation ++ krb5_set_cache_path ++ krb5_set_profile_path ++ krb5_clean_cache_profile_path +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/lib/krb5/Makefile.in krb5_edit/src/lib/krb5/Makefile.in +*** krb5/src/lib/krb5/Makefile.in 2022-08-26 16:04:07.140000000 +0800 +--- krb5_edit/src/lib/krb5/Makefile.in 2022-08-26 16:03:35.036000000 +0800 +*************** +*** 17,23 **** + + STLIBOBJS=krb5_libinit.o + +! LIBBASE=krb5 + LIBMAJOR=3 + LIBMINOR=3 + LIBINITFUNC=profile_library_initializer krb5int_lib_init +--- 17,23 ---- + + STLIBOBJS=krb5_libinit.o + +! LIBBASE=krb5_gauss + LIBMAJOR=3 + LIBMINOR=3 + LIBINITFUNC=profile_library_initializer krb5int_lib_init +*************** +*** 54,62 **** + + RELDIR=krb5 + SHLIB_EXPDEPS = \ +! $(TOPLIBD)/libk5crypto$(SHLIBEXT) \ + $(COM_ERR_DEPLIB) $(SUPPORT_DEPLIB) +! SHLIB_EXPLIBS=-lk5crypto -lcom_err $(SUPPORT_LIB) @GEN_LIB@ $(LIBS) + + all-unix: all-liblinks + +--- 54,62 ---- + + RELDIR=krb5 + SHLIB_EXPDEPS = \ +! $(TOPLIBD)/libk5crypto_gauss$(SHLIBEXT) \ + $(COM_ERR_DEPLIB) $(SUPPORT_DEPLIB) +! SHLIB_EXPLIBS=-lk5crypto_gauss -lcom_err_gauss $(SUPPORT_LIB) @GEN_LIB@ $(LIBS) + + all-unix: all-liblinks + +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/lib/krb5/os/ccdefname.c krb5_edit/src/lib/krb5/os/ccdefname.c +*** krb5/src/lib/krb5/os/ccdefname.c 2022-08-26 16:04:07.164000000 +0800 +--- krb5_edit/src/lib/krb5/os/ccdefname.c 2022-08-26 16:03:35.060000000 +0800 +*************** +*** 299,309 **** + if (os_ctx->default_ccname != NULL) + return os_ctx->default_ccname; + +! /* Try the environment variable first. */ +! envstr = secure_getenv(KRB5_ENV_CCNAME); +! if (envstr != NULL) { +! os_ctx->default_ccname = strdup(envstr); + return os_ctx->default_ccname; + } + + if (profile_get_string(context->profile, KRB5_CONF_LIBDEFAULTS, +--- 299,314 ---- + if (os_ctx->default_ccname != NULL) + return os_ctx->default_ccname; + +! /* Try the setable variable first. */ +! if (NULL != G_DEFAULT_CACHE_PATH) { +! os_ctx->default_ccname = strdup(G_DEFAULT_CACHE_PATH); + return os_ctx->default_ccname; ++ } else { ++ envstr = getenv(KRB5_ENV_CCNAME); ++ if (envstr != NULL) { ++ os_ctx->default_ccname = strdup(envstr); ++ return os_ctx->default_ccname; ++ } + } + + if (profile_get_string(context->profile, KRB5_CONF_LIBDEFAULTS, +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/lib/krb5/os/init_os_ctx.c krb5_edit/src/lib/krb5/os/init_os_ctx.c +*** krb5/src/lib/krb5/os/init_os_ctx.c 2022-08-26 16:04:07.164000000 +0800 +--- krb5_edit/src/lib/krb5/os/init_os_ctx.c 2022-08-26 16:03:35.064000000 +0800 +*************** +*** 298,305 **** + if (secure) { + filepath = DEFAULT_SECURE_PROFILE_PATH; + } else { +! filepath = secure_getenv("KRB5_CONFIG"); +! if (!filepath) filepath = DEFAULT_PROFILE_PATH; + } + + /* count the distinct filename components */ +--- 298,309 ---- + if (secure) { + filepath = DEFAULT_SECURE_PROFILE_PATH; + } else { +! if (NULL != G_DEFAULT_PROFILE_PATH) { +! filepath = G_DEFAULT_PROFILE_PATH; +! } else { +! filepath = getenv("KRB5_CONFIG"); +! if (!filepath) filepath = DEFAULT_PROFILE_PATH; +! } + } + + /* count the distinct filename components */ +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/lib/krb5/os/Makefile.in krb5_edit/src/lib/krb5/os/Makefile.in +*** krb5/src/lib/krb5/os/Makefile.in 2022-08-26 16:04:07.164000000 +0800 +--- krb5_edit/src/lib/krb5/os/Makefile.in 2022-08-26 16:03:35.060000000 +0800 +*************** +*** 171,177 **** + T_TRACE_OBJS = t_trace.o + + t_std_conf: $(T_STD_CONF_OBJS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o t_std_conf $(T_STD_CONF_OBJS) $(KRB5_BASE_LIBS) + + t_localaddr: localaddr.c + $(CC_LINK) $(ALL_CFLAGS) -DTEST -o t_localaddr $(srcdir)/localaddr.c $(KRB5_BASE_LIBS) $(LIBS) +--- 171,177 ---- + T_TRACE_OBJS = t_trace.o + + t_std_conf: $(T_STD_CONF_OBJS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o t_std_conf $(T_STD_CONF_OBJS) $(KRB5_BASE_LIBS) + + t_localaddr: localaddr.c + $(CC_LINK) $(ALL_CFLAGS) -DTEST -o t_localaddr $(srcdir)/localaddr.c $(KRB5_BASE_LIBS) $(LIBS) +*************** +*** 185,194 **** + link $(EXE_LINKOPTS) -out:$@ $** ws2_32.lib + + t_trace: $(T_TRACE_OBJS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o t_trace $(T_TRACE_OBJS) $(KRB5_BASE_LIBS) + + t_expand_path: t_expand_path.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o $@ t_expand_path.o $(KRB5_BASE_LIBS) + + LCLINT=lclint + LCLINTOPTS= -warnposix \ +--- 185,194 ---- + link $(EXE_LINKOPTS) -out:$@ $** ws2_32.lib + + t_trace: $(T_TRACE_OBJS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o t_trace $(T_TRACE_OBJS) $(KRB5_BASE_LIBS) + + t_expand_path: t_expand_path.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o $@ t_expand_path.o $(KRB5_BASE_LIBS) + + LCLINT=lclint + LCLINTOPTS= -warnposix \ +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/lib/krb5/rcache/Makefile.in krb5_edit/src/lib/krb5/rcache/Makefile.in +*** krb5/src/lib/krb5/rcache/Makefile.in 2022-08-26 16:04:07.168000000 +0800 +--- krb5_edit/src/lib/krb5/rcache/Makefile.in 2022-08-26 16:03:35.064000000 +0800 +*************** +*** 34,43 **** + clean-unix:: clean-libobjs + + t_memrcache: t_memrcache.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o $@ t_memrcache.o $(KRB5_BASE_LIBS) + + t_rcfile2: t_rcfile2.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o $@ t_rcfile2.o $(KRB5_BASE_LIBS) + + check-unix: t_memrcache t_rcfile2 + $(RUN_TEST) ./t_memrcache +--- 34,43 ---- + clean-unix:: clean-libobjs + + t_memrcache: t_memrcache.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o $@ t_memrcache.o $(KRB5_BASE_LIBS) + + t_rcfile2: t_rcfile2.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o $@ t_rcfile2.o $(KRB5_BASE_LIBS) + + check-unix: t_memrcache t_rcfile2 + $(RUN_TEST) ./t_memrcache +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/lib/Makefile.in krb5_edit/src/lib/Makefile.in +*** krb5/src/lib/Makefile.in 2022-08-26 16:04:07.088000000 +0800 +--- krb5_edit/src/lib/Makefile.in 2022-08-26 16:03:34.988000000 +0800 +*************** +*** 5,13 **** + + all-unix: + +! CLEANLIBS = libkrb5.a libkdb5.a libcrypto.a libgssapi_krb5.a libkadm.a \ +! libcom_err.a libpty.a ibss.a libgssapi.a libapputils.a libkrb5.so \ +! libcrypto.so + + clean-unix:: + +--- 5,13 ---- + + all-unix: + +! CLEANLIBS = libkrb5_gauss.a libkdb5.a libcrypto_gauss.a libgssapi_krb5_gauss.a libkadm.a \ +! libcom_err_gauss.a libpty.a ibss.a libgssapi_gauss.a libapputils.a libkrb5_gauss.so \ +! libcrypto_gauss.so + + clean-unix:: + +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/lib/rpc/libgssrpc_gauss.exports krb5_edit/src/lib/rpc/libgssrpc_gauss.exports +*** krb5/src/lib/rpc/libgssrpc_gauss.exports 1970-01-01 08:00:00.000000000 +0800 +--- krb5_edit/src/lib/rpc/libgssrpc_gauss.exports 2022-08-26 16:03:35.076000000 +0800 +*************** +*** 0 **** +--- 1,144 ---- ++ gssrpc_auth_debug_gss ++ gssrpc_auth_debug_gssapi ++ gssrpc_auth_gssapi_create ++ gssrpc_auth_gssapi_create_default ++ gssrpc_auth_gssapi_display_status ++ gssrpc_auth_gssapi_seal_seq ++ gssrpc_auth_gssapi_unseal_seq ++ gssrpc_auth_gssapi_unwrap_data ++ gssrpc_auth_gssapi_wrap_data ++ gssrpc_authgss_create ++ gssrpc_authgss_create_default ++ gssrpc_authgss_get_private_data ++ gssrpc_authgss_service ++ gssrpc_authnone_create ++ gssrpc_authunix_create ++ gssrpc_authunix_create_default ++ gssrpc_bindresvport ++ gssrpc_bindresvport_sa ++ gssrpc_callrpc ++ gssrpc_clnt_broadcast ++ gssrpc_clnt_create ++ gssrpc_clnt_pcreateerror ++ gssrpc_clnt_perrno ++ gssrpc_clnt_perror ++ gssrpc_clnt_spcreateerror ++ gssrpc_clnt_sperrno ++ gssrpc_clnt_sperror ++ gssrpc_clntraw_create ++ gssrpc_clnttcp_create ++ gssrpc_clntudp_bufcreate ++ gssrpc_clntudp_create ++ gssrpc_get_myaddress ++ gssrpc_getrpcport ++ gssrpc_log_debug ++ gssrpc_log_hexdump ++ gssrpc_log_status ++ gssrpc_misc_debug_gss ++ gssrpc_misc_debug_gssapi ++ gssrpc_pmap_getmaps ++ gssrpc_pmap_getport ++ gssrpc_pmap_rmtcall ++ gssrpc_pmap_set ++ gssrpc_pmap_unset ++ gssrpc_registerrpc ++ gssrpc_rpc_createrr ++ gssrpc_svc_auth_gss_ops ++ gssrpc_svc_auth_gssapi_ops ++ gssrpc_svc_auth_none ++ gssrpc_svc_auth_none_ops ++ gssrpc_svc_debug_gss ++ gssrpc_svc_debug_gssapi ++ gssrpc_svc_fdset ++ gssrpc_svc_fdset_init ++ gssrpc_svc_getreq ++ gssrpc_svc_getreqset ++ gssrpc_svc_maxfd ++ gssrpc_svc_register ++ gssrpc_svc_run ++ gssrpc_svc_sendreply ++ gssrpc_svc_unregister ++ gssrpc_svcauth_gss_get_principal ++ gssrpc_svcauth_gss_set_log_badauth_func ++ gssrpc_svcauth_gss_set_log_badauth2_func ++ gssrpc_svcauth_gss_set_log_badverf_func ++ gssrpc_svcauth_gss_set_log_miscerr_func ++ gssrpc_svcauth_gss_set_svc_name ++ gssrpc_svcauth_gssapi_set_log_badauth_func ++ gssrpc_svcauth_gssapi_set_log_badauth2_func ++ gssrpc_svcauth_gssapi_set_log_badverf_func ++ gssrpc_svcauth_gssapi_set_log_miscerr_func ++ gssrpc_svcauth_gssapi_set_names ++ gssrpc_svcauth_gssapi_unset_names ++ gssrpc_svcerr_auth ++ gssrpc_svcerr_decode ++ gssrpc_svcerr_noproc ++ gssrpc_svcerr_noprog ++ gssrpc_svcerr_progvers ++ gssrpc_svcerr_systemerr ++ gssrpc_svcerr_weakauth ++ gssrpc_svcfd_create ++ gssrpc_svcraw_create ++ gssrpc_svctcp_create ++ gssrpc_svcudp_bufcreate ++ gssrpc_svcudp_create ++ gssrpc_svcudp_enablecache ++ gssrpc_xdr_accepted_reply ++ gssrpc_xdr_array ++ gssrpc_xdr_authgssapi_creds ++ gssrpc_xdr_authgssapi_init_arg ++ gssrpc_xdr_authgssapi_init_res ++ gssrpc_xdr_authunix_parms ++ gssrpc_xdr_bool ++ gssrpc_xdr_bytes ++ gssrpc_xdr_callhdr ++ gssrpc_xdr_callmsg ++ gssrpc_xdr_char ++ gssrpc_xdr_des_block ++ gssrpc_xdr_enum ++ gssrpc_xdr_free ++ gssrpc_xdr_gss_buf ++ gssrpc_xdr_int ++ gssrpc_xdr_int32 ++ gssrpc_xdr_long ++ gssrpc_xdr_netobj ++ gssrpc_xdr_opaque ++ gssrpc_xdr_opaque_auth ++ gssrpc_xdr_pmap ++ gssrpc_xdr_pmaplist ++ gssrpc_xdr_pointer ++ gssrpc_xdr_reference ++ gssrpc_xdr_rejected_reply ++ gssrpc_xdr_replymsg ++ gssrpc_xdr_rmtcall_args ++ gssrpc_xdr_rmtcallres ++ gssrpc_xdr_rpc_gss_buf ++ gssrpc_xdr_rpc_gss_cred ++ gssrpc_xdr_rpc_gss_data ++ gssrpc_xdr_rpc_gss_init_args ++ gssrpc_xdr_rpc_gss_init_res ++ gssrpc_xdr_rpc_gss_unwrap_data ++ gssrpc_xdr_rpc_gss_wrap_data ++ gssrpc_xdr_short ++ gssrpc_xdr_sizeof ++ gssrpc_xdr_string ++ gssrpc_xdr_u_char ++ gssrpc_xdr_u_int ++ gssrpc_xdr_u_int32 ++ gssrpc_xdr_u_long ++ gssrpc_xdr_u_short ++ gssrpc_xdr_union ++ gssrpc_xdr_vector ++ gssrpc_xdr_void ++ gssrpc_xdr_wrapstring ++ gssrpc_xdralloc_create ++ gssrpc_xdralloc_getdata ++ gssrpc_xdralloc_release ++ gssrpc_xdrmem_create ++ gssrpc_xdrrec_create ++ gssrpc_xdrrec_endofrecord ++ gssrpc_xdrrec_eof ++ gssrpc_xdrrec_skiprecord ++ gssrpc_xdrstdio_create ++ gssrpc_xprt_register ++ gssrpc_xprt_unregister +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/lib/rpc/Makefile.in krb5_edit/src/lib/rpc/Makefile.in +*** krb5/src/lib/rpc/Makefile.in 2022-08-26 16:04:07.176000000 +0800 +--- krb5_edit/src/lib/rpc/Makefile.in 2022-08-26 16:03:35.076000000 +0800 +*************** +*** 7,21 **** + ##DOSBUILDTOP = ..\.. + ##DOSLIBNAME=libgssrpc.lib + +! LIBBASE=gssrpc + LIBMAJOR=4 + LIBMINOR=2 + SHLIB_EXPDEPS= \ +! $(TOPLIBD)/libgssapi_krb5$(SHLIBEXT) \ +! $(TOPLIBD)/libkrb5$(SHLIBEXT) \ +! $(TOPLIBD)/libk5crypto$(SHLIBEXT) \ + $(COM_ERR_DEPLIB) +! SHLIB_EXPLIBS=-lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err $(LIBS) + RELDIR=rpc + + SRCS = $(srcdir)/auth_none.c \ +--- 7,21 ---- + ##DOSBUILDTOP = ..\.. + ##DOSLIBNAME=libgssrpc.lib + +! LIBBASE=gssrpc_gauss + LIBMAJOR=4 + LIBMINOR=2 + SHLIB_EXPDEPS= \ +! $(TOPLIBD)/libgssapi_krb5_gauss$(SHLIBEXT) \ +! $(TOPLIBD)/libkrb5_gauss$(SHLIBEXT) \ +! $(TOPLIBD)/libk5crypto_gauss$(SHLIBEXT) \ + $(COM_ERR_DEPLIB) +! SHLIB_EXPLIBS=-lgssapi_krb5_gauss -lkrb5_gauss -lk5crypto_gauss -lcom_err_gauss $(LIBS) + RELDIR=rpc + + SRCS = $(srcdir)/auth_none.c \ +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/lib/rpc/unit-test/Makefile.in krb5_edit/src/lib/rpc/unit-test/Makefile.in +*** krb5/src/lib/rpc/unit-test/Makefile.in 2022-08-26 16:04:07.180000000 +0800 +--- krb5_edit/src/lib/rpc/unit-test/Makefile.in 2022-08-26 16:03:35.080000000 +0800 +*************** +*** 7,17 **** + all: client server + + client: client.o rpc_test_clnt.o $(GSSRPC_DEPLIBS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o client client.o rpc_test_clnt.o \ + $(GSSRPC_LIBS) $(KRB5_BASE_LIBS) + + server: server.o rpc_test_svc.o $(GSSRPC_DEPLIBS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o server server.o rpc_test_svc.o \ + $(GSSRPC_LIBS) $(KRB5_BASE_LIBS) + + client.o server.o: rpc_test.h +--- 7,17 ---- + all: client server + + client: client.o rpc_test_clnt.o $(GSSRPC_DEPLIBS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o client client.o rpc_test_clnt.o \ + $(GSSRPC_LIBS) $(KRB5_BASE_LIBS) + + server: server.o rpc_test_svc.o $(GSSRPC_DEPLIBS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o server server.o rpc_test_svc.o \ + $(GSSRPC_LIBS) $(KRB5_BASE_LIBS) + + client.o server.o: rpc_test.h +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/plugins/authdata/greet_client/Makefile.in krb5_edit/src/plugins/authdata/greet_client/Makefile.in +*** krb5/src/plugins/authdata/greet_client/Makefile.in 2022-08-26 16:04:07.188000000 +0800 +--- krb5_edit/src/plugins/authdata/greet_client/Makefile.in 2022-08-26 16:03:35.084000000 +0800 +*************** +*** 4,12 **** + LIBBASE=greet_client + LIBMAJOR=0 + LIBMINOR=0 +! SHLIB_EXPDEPS = $(TOPLIBD)/libk5crypto$(SHLIBEXT) \ +! $(TOPLIBD)/libkrb5$(SHLIBEXT) +! SHLIB_EXPLIBS= -lkrb5 -lcom_err -lk5crypto $(SUPPORT_LIB) $(LIBS) + STLIBOBJS= greet.o + + SRCS= greet.c +--- 4,12 ---- + LIBBASE=greet_client + LIBMAJOR=0 + LIBMINOR=0 +! SHLIB_EXPDEPS = $(TOPLIBD)/libk5crypto_gauss$(SHLIBEXT) \ +! $(TOPLIBD)/libkrb5_gauss$(SHLIBEXT) +! SHLIB_EXPLIBS= -lkrb5_gauss -lcom_err_gauss -lk5crypto_gauss $(SUPPORT_LIB) $(LIBS) + STLIBOBJS= greet.o + + SRCS= greet.c +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/plugins/authdata/greet_server/Makefile.in krb5_edit/src/plugins/authdata/greet_server/Makefile.in +*** krb5/src/plugins/authdata/greet_server/Makefile.in 2022-08-26 16:04:07.188000000 +0800 +--- krb5_edit/src/plugins/authdata/greet_server/Makefile.in 2022-08-26 16:03:35.084000000 +0800 +*************** +*** 4,12 **** + LIBBASE=greet_server + LIBMAJOR=1 + LIBMINOR=0 +! SHLIB_EXPDEPS = $(TOPLIBD)/libk5crypto$(SHLIBEXT) \ +! $(TOPLIBD)/libkrb5$(SHLIBEXT) +! SHLIB_EXPLIBS= -lkrb5 -lcom_err -lk5crypto $(SUPPORT_LIB) $(LIBS) + + STLIBOBJS= greet_auth.o + +--- 4,12 ---- + LIBBASE=greet_server + LIBMAJOR=1 + LIBMINOR=0 +! SHLIB_EXPDEPS = $(TOPLIBD)/libk5crypto_gauss$(SHLIBEXT) \ +! $(TOPLIBD)/libkrb5_gauss$(SHLIBEXT) +! SHLIB_EXPLIBS= -lkrb5_gauss -lcom_err_gauss -lk5crypto_gauss $(SUPPORT_LIB) $(LIBS) + + STLIBOBJS= greet_auth.o + +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/plugins/kadm5_hook/test/Makefile.in krb5_edit/src/plugins/kadm5_hook/test/Makefile.in +*** krb5/src/plugins/kadm5_hook/test/Makefile.in 2022-08-26 16:04:07.188000000 +0800 +--- krb5_edit/src/plugins/kadm5_hook/test/Makefile.in 2022-08-26 16:03:35.084000000 +0800 +*************** +*** 7,15 **** + RELDIR=../plugins/kadm5_hook/test + # Depends on libk5crypto and libkrb5 + SHLIB_EXPDEPS = \ +! $(TOPLIBD)/libk5crypto$(SHLIBEXT) \ +! $(TOPLIBD)/libkrb5$(SHLIBEXT) +! SHLIB_EXPLIBS= -lkrb5 -lcom_err -lk5crypto $(SUPPORT_LIB) $(LIBS) + + STLIBOBJS=main.o + +--- 7,15 ---- + RELDIR=../plugins/kadm5_hook/test + # Depends on libk5crypto and libkrb5 + SHLIB_EXPDEPS = \ +! $(TOPLIBD)/libk5crypto_gauss$(SHLIBEXT) \ +! $(TOPLIBD)/libkrb5_gauss$(SHLIBEXT) +! SHLIB_EXPLIBS= -lkrb5_gauss -lcom_err_gauss -lk5crypto_gauss $(SUPPORT_LIB) $(LIBS) + + STLIBOBJS=main.o + +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/plugins/kdb/db2/libdb2/test/Makefile.in krb5_edit/src/plugins/kdb/db2/libdb2/test/Makefile.in +*** krb5/src/plugins/kdb/db2/libdb2/test/Makefile.in 2022-08-26 16:04:07.200000000 +0800 +--- krb5_edit/src/plugins/kdb/db2/libdb2/test/Makefile.in 2022-08-26 16:03:35.096000000 +0800 +*************** +*** 15,21 **** + all: + + dbtest: dbtest.o $(DB_DEPLIB) +! $(CC_LINK) -o $@ dbtest.o $(STRERROR_OBJ) $(DB_LIB) + + t.be.db: $(srcdir)/t.be.txt + t.le.db: $(srcdir)/t.le.txt +--- 15,21 ---- + all: + + dbtest: dbtest.o $(DB_DEPLIB) +! $(CC_LINK) -pie -o $@ dbtest.o $(STRERROR_OBJ) $(DB_LIB) + + t.be.db: $(srcdir)/t.be.txt + t.le.db: $(srcdir)/t.le.txt +*************** +*** 29,35 **** + $(CC) $(ALL_CFLAGS) -c $(srcdir)/btree.tests/main.c -o $@ + + bttest: bttest.o $(DB_DEPLIB) +! $(CC_LINK) -o $@ bttest.o $(STRERROR_OBJ) $(DB_LIB) + + clean-unix:: + $(RM) dbtest.o dbtest __dbtest +--- 29,35 ---- + $(CC) $(ALL_CFLAGS) -c $(srcdir)/btree.tests/main.c -o $@ + + bttest: bttest.o $(DB_DEPLIB) +! $(CC_LINK) -pie -o $@ bttest.o $(STRERROR_OBJ) $(DB_LIB) + + clean-unix:: + $(RM) dbtest.o dbtest __dbtest +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/plugins/kdb/db2/Makefile.in krb5_edit/src/plugins/kdb/db2/Makefile.in +*** krb5/src/plugins/kdb/db2/Makefile.in 2022-08-26 16:04:07.188000000 +0800 +--- krb5_edit/src/plugins/kdb/db2/Makefile.in 2022-08-26 16:03:35.084000000 +0800 +*************** +*** 29,37 **** + # Also on gssrpc, for xdr stuff. + SHLIB_EXPDEPS = \ + $(GSSRPC_DEPLIBS) \ +! $(TOPLIBD)/libk5crypto$(SHLIBEXT) \ +! $(TOPLIBD)/libkrb5$(SHLIBEXT) +! SHLIB_EXPLIBS= $(GSSRPC_LIBS) -lkrb5 -lcom_err -lk5crypto $(KDB5_DB_LIB) $(KADMSRV_LIBS) $(SUPPORT_LIB) $(LIBS) @DB_EXTRA_LIBS@ + + DBDIR = libdb2 + DBOBJLISTS = $(DBOBJLISTS-@DB_VERSION@) +--- 29,37 ---- + # Also on gssrpc, for xdr stuff. + SHLIB_EXPDEPS = \ + $(GSSRPC_DEPLIBS) \ +! $(TOPLIBD)/libk5crypto_gauss$(SHLIBEXT) \ +! $(TOPLIBD)/libkrb5_gauss$(SHLIBEXT) +! SHLIB_EXPLIBS= $(GSSRPC_LIBS) -lkrb5_gauss -lcom_err_gauss -lk5crypto_gauss $(KDB5_DB_LIB) $(KADMSRV_LIBS) $(SUPPORT_LIB) $(LIBS) @DB_EXTRA_LIBS@ + + DBDIR = libdb2 + DBOBJLISTS = $(DBOBJLISTS-@DB_VERSION@) +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/plugins/kdb/ldap/ldap_util/Makefile.in krb5_edit/src/plugins/kdb/ldap/ldap_util/Makefile.in +*** krb5/src/plugins/kdb/ldap/ldap_util/Makefile.in 2022-08-26 16:04:07.200000000 +0800 +--- krb5_edit/src/plugins/kdb/ldap/ldap_util/Makefile.in 2022-08-26 16:03:35.100000000 +0800 +*************** +*** 14,20 **** + all: $(PROG) + + $(PROG): $(OBJS) $(KADMSRV_DEPLIBS) $(KRB5_BASE_DEPLIB) $(GETDATE) +! $(CC_LINK) -o $(PROG) $(OBJS) \ + $(KADMSRV_LIBS) $(KDB_DEP_LIB) $(KRB5_BASE_LIBS) + + getdate.c: $(GETDATE) +--- 14,20 ---- + all: $(PROG) + + $(PROG): $(OBJS) $(KADMSRV_DEPLIBS) $(KRB5_BASE_DEPLIB) $(GETDATE) +! $(CC_LINK) -pie -o $(PROG) $(OBJS) \ + $(KADMSRV_LIBS) $(KDB_DEP_LIB) $(KRB5_BASE_LIBS) + + getdate.c: $(GETDATE) +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/plugins/kdb/ldap/Makefile.in krb5_edit/src/plugins/kdb/ldap/Makefile.in +*** krb5/src/plugins/kdb/ldap/Makefile.in 2022-08-26 16:04:07.200000000 +0800 +--- krb5_edit/src/plugins/kdb/ldap/Makefile.in 2022-08-26 16:03:35.100000000 +0800 +*************** +*** 16,25 **** + SHLIB_EXPDEPS = \ + $(TOPLIBD)/libkdb_ldap$(SHLIBEXT) \ + $(GSSRPC_DEPLIBS) \ +! $(TOPLIBD)/libk5crypto$(SHLIBEXT) \ +! $(TOPLIBD)/libkrb5$(SHLIBEXT) \ + $(TOPLIBD)/lib$(SUPPORT_LIBNAME)$(SHLIBEXT) +! SHLIB_EXPLIBS= -lkdb_ldap $(GSSRPC_LIBS) -lkrb5 -lcom_err -lk5crypto -lkrb5support $(LIBS) + + SRCS= $(srcdir)/ldap_exp.c + +--- 16,25 ---- + SHLIB_EXPDEPS = \ + $(TOPLIBD)/libkdb_ldap$(SHLIBEXT) \ + $(GSSRPC_DEPLIBS) \ +! $(TOPLIBD)/libk5crypto_gauss$(SHLIBEXT) \ +! $(TOPLIBD)/libkrb5_gauss$(SHLIBEXT) \ + $(TOPLIBD)/lib$(SUPPORT_LIBNAME)$(SHLIBEXT) +! SHLIB_EXPLIBS= -lkdb_ldap $(GSSRPC_LIBS) -lkrb5_gauss -lcom_err_gauss -lk5crypto_gauss -lkrb5support_gauss $(LIBS) + + SRCS= $(srcdir)/ldap_exp.c + +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/plugins/preauth/pkinit/Makefile.in krb5_edit/src/plugins/preauth/pkinit/Makefile.in +*** krb5/src/plugins/preauth/pkinit/Makefile.in 2022-08-26 16:04:07.208000000 +0800 +--- krb5_edit/src/plugins/preauth/pkinit/Makefile.in 2022-08-26 16:03:35.104000000 +0800 +*************** +*** 46,52 **** + $(RUN_TEST) ./pkinit_kdf_test + + pkinit_kdf_test: pkinit_kdf_test.o $(STLIBOBJS) $(SHLIB_EXPDEPS) +! $(CC_LINK) -o $@ pkinit_kdf_test.o $(STLIBOBJS) $(SHLIB_EXPLIBS) + + @libnover_frag@ + @libobj_frag@ +--- 46,52 ---- + $(RUN_TEST) ./pkinit_kdf_test + + pkinit_kdf_test: pkinit_kdf_test.o $(STLIBOBJS) $(SHLIB_EXPDEPS) +! $(CC_LINK) -pie -o $@ pkinit_kdf_test.o $(STLIBOBJS) $(SHLIB_EXPLIBS) + + @libnover_frag@ + @libobj_frag@ +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/plugins/preauth/spake/Makefile.in krb5_edit/src/plugins/preauth/spake/Makefile.in +*** krb5/src/plugins/preauth/spake/Makefile.in 2022-08-26 16:04:07.212000000 +0800 +--- krb5_edit/src/plugins/preauth/spake/Makefile.in 2022-08-26 16:03:35.112000000 +0800 +*************** +*** 37,43 **** + $(OUTPRE)spake_client.$(OBJEXT) + + t_vectors: t_vectors.o $(STLIBOBJS) $(SHLIB_EXPDEPS) +! $(CC_LINK) -o $@ t_vectors.o $(STLIBOBJS) $(SHLIB_EXPLIBS) + + all-unix: all-liblinks + install-unix: install-libs +--- 37,43 ---- + $(OUTPRE)spake_client.$(OBJEXT) + + t_vectors: t_vectors.o $(STLIBOBJS) $(SHLIB_EXPDEPS) +! $(CC_LINK) -pie -o $@ t_vectors.o $(STLIBOBJS) $(SHLIB_EXPLIBS) + + all-unix: all-liblinks + install-unix: install-libs +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/tests/asn.1/Makefile.in krb5_edit/src/tests/asn.1/Makefile.in +*** krb5/src/tests/asn.1/Makefile.in 2022-08-26 16:04:07.220000000 +0800 +--- krb5_edit/src/tests/asn.1/Makefile.in 2022-08-26 16:03:35.116000000 +0800 +*************** +*** 16,32 **** + ENCOBJS = krb5_encode_test.o ktest.o ktest_equal.o utility.o trval.o + + krb5_encode_test: $(ENCOBJS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o krb5_encode_test $(ENCOBJS) $(KRB5_BASE_LIBS) + + DECOBJS = krb5_decode_test.o ktest.o ktest_equal.o utility.o + + krb5_decode_test: $(DECOBJS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o krb5_decode_test $(DECOBJS) $(KRB5_BASE_LIBS) + + LEAKOBJS = krb5_decode_leak.o ktest.o ktest_equal.o utility.o + + krb5_decode_leak: $(LEAKOBJS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o krb5_decode_leak $(LEAKOBJS) $(KRB5_BASE_LIBS) + + t_trval: t_trval.o + $(CC) -o t_trval $(ALL_CFLAGS) t_trval.o +--- 16,32 ---- + ENCOBJS = krb5_encode_test.o ktest.o ktest_equal.o utility.o trval.o + + krb5_encode_test: $(ENCOBJS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o krb5_encode_test $(ENCOBJS) $(KRB5_BASE_LIBS) + + DECOBJS = krb5_decode_test.o ktest.o ktest_equal.o utility.o + + krb5_decode_test: $(DECOBJS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o krb5_decode_test $(DECOBJS) $(KRB5_BASE_LIBS) + + LEAKOBJS = krb5_decode_leak.o ktest.o ktest_equal.o utility.o + + krb5_decode_leak: $(LEAKOBJS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o krb5_decode_leak $(LEAKOBJS) $(KRB5_BASE_LIBS) + + t_trval: t_trval.o + $(CC) -o t_trval $(ALL_CFLAGS) t_trval.o +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/tests/create/Makefile.in krb5_edit/src/tests/create/Makefile.in +*** krb5/src/tests/create/Makefile.in 2022-08-26 16:04:07.224000000 +0800 +--- krb5_edit/src/tests/create/Makefile.in 2022-08-26 16:03:35.120000000 +0800 +*************** +*** 6,12 **** + all: kdb5_mkdums + + kdb5_mkdums: kdb5_mkdums.o $(KDB5_DEPLIBS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o kdb5_mkdums kdb5_mkdums.o $(KDB5_DEP_LIBS) $(KDB5_LIBS) $(KRB5_BASE_LIBS) + + all: kdb5_mkdums + +--- 6,12 ---- + all: kdb5_mkdums + + kdb5_mkdums: kdb5_mkdums.o $(KDB5_DEPLIBS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o kdb5_mkdums kdb5_mkdums.o $(KDB5_DEP_LIBS) $(KDB5_LIBS) $(KRB5_BASE_LIBS) + + all: kdb5_mkdums + +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/tests/dejagnu/Makefile.in krb5_edit/src/tests/dejagnu/Makefile.in +*** krb5/src/tests/dejagnu/Makefile.in 2022-08-26 16:04:07.224000000 +0800 +--- krb5_edit/src/tests/dejagnu/Makefile.in 2022-08-26 16:03:35.120000000 +0800 +*************** +*** 23,29 **** + $(RUNTEST) --tool krb VALGRIND="$(VALGRIND)" $(RUNTESTFLAGS) + + t_inetd: t_inetd.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o t_inetd t_inetd.o $(KRB5_BASE_LIBS) + + clean: + $(RM) t_inetd t_inetd.o site.exp runenv.vars runenv.vals +--- 23,29 ---- + $(RUNTEST) --tool krb VALGRIND="$(VALGRIND)" $(RUNTESTFLAGS) + + t_inetd: t_inetd.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o t_inetd t_inetd.o $(KRB5_BASE_LIBS) + + clean: + $(RM) t_inetd t_inetd.o site.exp runenv.vars runenv.vals +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/tests/gssapi/Makefile.in krb5_edit/src/tests/gssapi/Makefile.in +*** krb5/src/tests/gssapi/Makefile.in 2022-08-26 16:04:07.228000000 +0800 +--- krb5_edit/src/tests/gssapi/Makefile.in 2022-08-26 16:03:35.124000000 +0800 +*************** +*** 58,124 **** + $(RUNPYTEST) $(srcdir)/t_negoex.py $(PYTESTFLAGS) + + ccinit: ccinit.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o ccinit ccinit.o $(KRB5_BASE_LIBS) + ccrefresh: ccrefresh.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o ccrefresh ccrefresh.o $(KRB5_BASE_LIBS) + reload: reload.o +! $(CC_LINK) -o $@ reload.o $(DL_LIB) + t_accname: t_accname.o $(COMMON_DEPS) +! $(CC_LINK) -o $@ t_accname.o $(COMMON_LIBS) + t_add_cred: t_add_cred.o $(COMMON_DEPS) +! $(CC_LINK) -o $@ t_add_cred.o $(COMMON_LIBS) + t_ccselect: t_ccselect.o $(COMMON_DEPS) +! $(CC_LINK) -o $@ t_ccselect.o $(COMMON_LIBS) + t_ciflags: t_ciflags.o $(COMMON_DEPS) +! $(CC_LINK) -o $@ t_ciflags.o $(COMMON_LIBS) + t_context: t_context.o $(COMMON_DEPS) +! $(CC_LINK) -o $@ t_context.o $(COMMON_LIBS) + t_credstore: t_credstore.o $(COMMON_DEPS) +! $(CC_LINK) -o $@ t_credstore.o $(COMMON_LIBS) + t_enctypes: t_enctypes.o $(COMMON_DEPS) +! $(CC_LINK) -o $@ t_enctypes.o $(COMMON_LIBS) + t_err: t_err.o $(COMMON_DEPS) +! $(CC_LINK) -o $@ t_err.o $(COMMON_LIBS) + t_export_cred: t_export_cred.o $(COMMON_DEPS) +! $(CC_LINK) -o $@ t_export_cred.o $(COMMON_LIBS) + t_export_name: t_export_name.o $(COMMON_DEPS) +! $(CC_LINK) -o $@ t_export_name.o $(COMMON_LIBS) + t_gssexts: t_gssexts.o $(COMMON_DEPS) +! $(CC_LINK) -o $@ t_gssexts.o $(COMMON_LIBS) + t_imp_cred: t_imp_cred.o $(COMMON_DEPS) +! $(CC_LINK) -o $@ t_imp_cred.o $(COMMON_LIBS) + t_imp_name: t_imp_name.o $(COMMON_DEPS) +! $(CC_LINK) -o $@ t_imp_name.o $(COMMON_LIBS) + t_invalid: t_invalid.o $(COMMON_DEPS) +! $(CC_LINK) -o $@ t_invalid.o $(COMMON_LIBS) + t_inq_cred: t_inq_cred.o $(COMMON_DEPS) +! $(CC_LINK) -o $@ t_inq_cred.o $(COMMON_LIBS) + t_inq_ctx: t_inq_ctx.o $(COMMON_DEPS) +! $(CC_LINK) -o $@ t_inq_ctx.o $(COMMON_LIBS) + t_inq_mechs_name: t_inq_mechs_name.o $(COMMON_DEPS) +! $(CC_LINK) -o $@ t_inq_mechs_name.o $(COMMON_LIBS) + t_iov: t_iov.o $(COMMON_DEPS) +! $(CC_LINK) -o $@ t_iov.o $(COMMON_LIBS) + t_lifetime: t_lifetime.o $(COMMON_DEPS) +! $(CC_LINK) -o $@ t_lifetime.o $(COMMON_LIBS) + t_namingexts: t_namingexts.o $(COMMON_DEPS) +! $(CC_LINK) -o $@ t_namingexts.o $(COMMON_LIBS) + t_pcontok: t_pcontok.o $(COMMON_DEPS) +! $(CC_LINK) -o $@ t_pcontok.o $(COMMON_LIBS) + t_oid: t_oid.o $(COMMON_DEPS) +! $(CC_LINK) -o $@ t_oid.o $(COMMON_LIBS) + t_prf: t_prf.o $(COMMON_DEPS) +! $(CC_LINK) -o $@ t_prf.o $(COMMON_LIBS) + t_s4u: t_s4u.o $(COMMON_DEPS) +! $(CC_LINK) -o $@ t_s4u.o $(COMMON_LIBS) + t_s4u2proxy_krb5: t_s4u2proxy_krb5.o $(COMMON_DEPS) +! $(CC_LINK) -o $@ t_s4u2proxy_krb5.o $(COMMON_LIBS) + t_saslname: t_saslname.o $(COMMON_DEPS) +! $(CC_LINK) -o $@ t_saslname.o $(COMMON_LIBS) + t_spnego: t_spnego.o $(COMMON_DEPS) +! $(CC_LINK) -o $@ t_spnego.o $(COMMON_LIBS) + t_srcattrs: t_srcattrs.o $(COMMON_DEPS) +! $(CC_LINK) -o $@ t_srcattrs.o $(COMMON_LIBS) + + clean: + $(RM) ccinit ccrefresh reload t_accname t_add_cred t_ccselect t_ciflags +--- 58,124 ---- + $(RUNPYTEST) $(srcdir)/t_negoex.py $(PYTESTFLAGS) + + ccinit: ccinit.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o ccinit ccinit.o $(KRB5_BASE_LIBS) + ccrefresh: ccrefresh.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o ccrefresh ccrefresh.o $(KRB5_BASE_LIBS) + reload: reload.o +! $(CC_LINK) -pie -o $@ reload.o $(DL_LIB) + t_accname: t_accname.o $(COMMON_DEPS) +! $(CC_LINK) -pie -o $@ t_accname.o $(COMMON_LIBS) + t_add_cred: t_add_cred.o $(COMMON_DEPS) +! $(CC_LINK) -pie -o $@ t_add_cred.o $(COMMON_LIBS) + t_ccselect: t_ccselect.o $(COMMON_DEPS) +! $(CC_LINK) -pie -o $@ t_ccselect.o $(COMMON_LIBS) + t_ciflags: t_ciflags.o $(COMMON_DEPS) +! $(CC_LINK) -pie -o $@ t_ciflags.o $(COMMON_LIBS) + t_context: t_context.o $(COMMON_DEPS) +! $(CC_LINK) -pie -o $@ t_context.o $(COMMON_LIBS) + t_credstore: t_credstore.o $(COMMON_DEPS) +! $(CC_LINK) -pie -o $@ t_credstore.o $(COMMON_LIBS) + t_enctypes: t_enctypes.o $(COMMON_DEPS) +! $(CC_LINK) -pie -o $@ t_enctypes.o $(COMMON_LIBS) + t_err: t_err.o $(COMMON_DEPS) +! $(CC_LINK) -pie -o $@ t_err.o $(COMMON_LIBS) + t_export_cred: t_export_cred.o $(COMMON_DEPS) +! $(CC_LINK) -pie -o $@ t_export_cred.o $(COMMON_LIBS) + t_export_name: t_export_name.o $(COMMON_DEPS) +! $(CC_LINK) -pie -o $@ t_export_name.o $(COMMON_LIBS) + t_gssexts: t_gssexts.o $(COMMON_DEPS) +! $(CC_LINK) -pie -o $@ t_gssexts.o $(COMMON_LIBS) + t_imp_cred: t_imp_cred.o $(COMMON_DEPS) +! $(CC_LINK) -pie -o $@ t_imp_cred.o $(COMMON_LIBS) + t_imp_name: t_imp_name.o $(COMMON_DEPS) +! $(CC_LINK) -pie -o $@ t_imp_name.o $(COMMON_LIBS) + t_invalid: t_invalid.o $(COMMON_DEPS) +! $(CC_LINK) -pie -o $@ t_invalid.o $(COMMON_LIBS) + t_inq_cred: t_inq_cred.o $(COMMON_DEPS) +! $(CC_LINK) -pie -o $@ t_inq_cred.o $(COMMON_LIBS) + t_inq_ctx: t_inq_ctx.o $(COMMON_DEPS) +! $(CC_LINK) -pie -o $@ t_inq_ctx.o $(COMMON_LIBS) + t_inq_mechs_name: t_inq_mechs_name.o $(COMMON_DEPS) +! $(CC_LINK) -pie -o $@ t_inq_mechs_name.o $(COMMON_LIBS) + t_iov: t_iov.o $(COMMON_DEPS) +! $(CC_LINK) -pie -o $@ t_iov.o $(COMMON_LIBS) + t_lifetime: t_lifetime.o $(COMMON_DEPS) +! $(CC_LINK) -pie -o $@ t_lifetime.o $(COMMON_LIBS) + t_namingexts: t_namingexts.o $(COMMON_DEPS) +! $(CC_LINK) -pie -o $@ t_namingexts.o $(COMMON_LIBS) + t_pcontok: t_pcontok.o $(COMMON_DEPS) +! $(CC_LINK) -pie -o $@ t_pcontok.o $(COMMON_LIBS) + t_oid: t_oid.o $(COMMON_DEPS) +! $(CC_LINK) -pie -o $@ t_oid.o $(COMMON_LIBS) + t_prf: t_prf.o $(COMMON_DEPS) +! $(CC_LINK) -pie -o $@ t_prf.o $(COMMON_LIBS) + t_s4u: t_s4u.o $(COMMON_DEPS) +! $(CC_LINK) -pie -o $@ t_s4u.o $(COMMON_LIBS) + t_s4u2proxy_krb5: t_s4u2proxy_krb5.o $(COMMON_DEPS) +! $(CC_LINK) -pie -o $@ t_s4u2proxy_krb5.o $(COMMON_LIBS) + t_saslname: t_saslname.o $(COMMON_DEPS) +! $(CC_LINK) -pie -o $@ t_saslname.o $(COMMON_LIBS) + t_spnego: t_spnego.o $(COMMON_DEPS) +! $(CC_LINK) -pie -o $@ t_spnego.o $(COMMON_LIBS) + t_srcattrs: t_srcattrs.o $(COMMON_DEPS) +! $(CC_LINK) -pie -o $@ t_srcattrs.o $(COMMON_LIBS) + + clean: + $(RM) ccinit ccrefresh reload t_accname t_add_cred t_ccselect t_ciflags +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/tests/hammer/Makefile.in krb5_edit/src/tests/hammer/Makefile.in +*** krb5/src/tests/hammer/Makefile.in 2022-08-26 16:04:07.232000000 +0800 +--- krb5_edit/src/tests/hammer/Makefile.in 2022-08-26 16:03:35.128000000 +0800 +*************** +*** 6,12 **** + all: kdc5_hammer + + kdc5_hammer: kdc5_hammer.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o kdc5_hammer kdc5_hammer.o $(KRB5_BASE_LIBS) + + install: + +--- 6,12 ---- + all: kdc5_hammer + + kdc5_hammer: kdc5_hammer.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o kdc5_hammer kdc5_hammer.o $(KRB5_BASE_LIBS) + + install: + +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/tests/Makefile.in krb5_edit/src/tests/Makefile.in +*** krb5/src/tests/Makefile.in 2022-08-26 16:04:07.220000000 +0800 +--- krb5_edit/src/tests/Makefile.in 2022-08-26 16:03:35.116000000 +0800 +*************** +*** 24,85 **** + KTEST_OPTS= $(KADMIN_OPTS) -p $(TEST_PREFIX) -n $(TEST_NUM) -D $(TEST_DEPTH) + + adata: adata.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o $@ adata.o $(KRB5_BASE_LIBS) + + etinfo: etinfo.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o $@ etinfo.o $(KRB5_BASE_LIBS) + + forward: forward.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o $@ forward.o $(KRB5_BASE_LIBS) + + gcred: gcred.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o $@ gcred.o $(KRB5_BASE_LIBS) + + hist: hist.o $(KDB5_DEPLIBS) $(KADMSRV_DEPLIBS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o $@ hist.o $(KDB5_LIBS) $(KADMSRV_LIBS) $(KRB5_BASE_LIBS) + + hooks: hooks.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o $@ hooks.o $(KRB5_BASE_LIBS) + + hrealm: hrealm.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o $@ hrealm.o $(KRB5_BASE_LIBS) + + icinterleave: icinterleave.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o $@ icinterleave.o $(KRB5_BASE_LIBS) + + icred: icred.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o $@ icred.o $(KRB5_BASE_LIBS) + + kdbtest: kdbtest.o $(KDB5_DEPLIBS) $(KADMSRV_DEPLIBS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o $@ kdbtest.o $(KDB5_LIBS) $(KADMSRV_LIBS) \ + $(KRB5_BASE_LIBS) + + localauth: localauth.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o $@ localauth.o $(KRB5_BASE_LIBS) + + plugorder: plugorder.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o $@ plugorder.o $(KRB5_BASE_LIBS) + + rdreq: rdreq.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o $@ rdreq.o $(KRB5_BASE_LIBS) + + replay: replay.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o $@ replay.o $(KRB5_BASE_LIBS) + + responder: responder.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o $@ responder.o $(KRB5_BASE_LIBS) + + s2p: s2p.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o $@ s2p.o $(KRB5_BASE_LIBS) + + s4u2self: s4u2self.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o $@ s4u2self.o $(KRB5_BASE_LIBS) + + s4u2proxy: s4u2proxy.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o $@ s4u2proxy.o $(KRB5_BASE_LIBS) + + unlockiter: unlockiter.o $(KDB5_DEPLIBS) $(KADMSRV_DEPLIBS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o $@ unlockiter.o $(KDB5_LIBS) $(KADMSRV_LIBS) \ + $(KRB5_BASE_LIBS) + + check-unix: kdb_check +--- 24,85 ---- + KTEST_OPTS= $(KADMIN_OPTS) -p $(TEST_PREFIX) -n $(TEST_NUM) -D $(TEST_DEPTH) + + adata: adata.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o $@ adata.o $(KRB5_BASE_LIBS) + + etinfo: etinfo.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o $@ etinfo.o $(KRB5_BASE_LIBS) + + forward: forward.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o $@ forward.o $(KRB5_BASE_LIBS) + + gcred: gcred.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o $@ gcred.o $(KRB5_BASE_LIBS) + + hist: hist.o $(KDB5_DEPLIBS) $(KADMSRV_DEPLIBS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o $@ hist.o $(KDB5_LIBS) $(KADMSRV_LIBS) $(KRB5_BASE_LIBS) + + hooks: hooks.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o $@ hooks.o $(KRB5_BASE_LIBS) + + hrealm: hrealm.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o $@ hrealm.o $(KRB5_BASE_LIBS) + + icinterleave: icinterleave.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o $@ icinterleave.o $(KRB5_BASE_LIBS) + + icred: icred.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o $@ icred.o $(KRB5_BASE_LIBS) + + kdbtest: kdbtest.o $(KDB5_DEPLIBS) $(KADMSRV_DEPLIBS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o $@ kdbtest.o $(KDB5_LIBS) $(KADMSRV_LIBS) \ + $(KRB5_BASE_LIBS) + + localauth: localauth.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o $@ localauth.o $(KRB5_BASE_LIBS) + + plugorder: plugorder.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o $@ plugorder.o $(KRB5_BASE_LIBS) + + rdreq: rdreq.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o $@ rdreq.o $(KRB5_BASE_LIBS) + + replay: replay.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o $@ replay.o $(KRB5_BASE_LIBS) + + responder: responder.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o $@ responder.o $(KRB5_BASE_LIBS) + + s2p: s2p.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o $@ s2p.o $(KRB5_BASE_LIBS) + + s4u2self: s4u2self.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o $@ s4u2self.o $(KRB5_BASE_LIBS) + + s4u2proxy: s4u2proxy.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o $@ s4u2proxy.o $(KRB5_BASE_LIBS) + + unlockiter: unlockiter.o $(KDB5_DEPLIBS) $(KADMSRV_DEPLIBS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o $@ unlockiter.o $(KDB5_LIBS) $(KADMSRV_LIBS) \ + $(KRB5_BASE_LIBS) + + check-unix: kdb_check +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/tests/resolve/Makefile.in krb5_edit/src/tests/resolve/Makefile.in +*** krb5/src/tests/resolve/Makefile.in 2022-08-26 16:04:07.232000000 +0800 +--- krb5_edit/src/tests/resolve/Makefile.in 2022-08-26 16:03:35.132000000 +0800 +*************** +*** 8,20 **** + all: resolve addrinfo-test fake-addrinfo-test + + resolve: resolve.o +! $(CC_LINK) -o $@ resolve.o $(SUPPORT_LIB) $(LIBS) + + addrinfo-test: addrinfo-test.o +! $(CC_LINK) -o $@ addrinfo-test.o $(SUPPORT_LIB) $(LIBS) + + fake-addrinfo-test: fake-addrinfo-test.o +! $(CC_LINK) -o $@ fake-addrinfo-test.o $(SUPPORT_LIB) $(LIBS) + + check: resolve addrinfo-test fake-addrinfo-test + $(RUN_TEST) ./resolve +--- 8,20 ---- + all: resolve addrinfo-test fake-addrinfo-test + + resolve: resolve.o +! $(CC_LINK) -pie -o $@ resolve.o $(SUPPORT_LIB) $(LIBS) + + addrinfo-test: addrinfo-test.o +! $(CC_LINK) -pie -o $@ addrinfo-test.o $(SUPPORT_LIB) $(LIBS) + + fake-addrinfo-test: fake-addrinfo-test.o +! $(CC_LINK) -pie -o $@ fake-addrinfo-test.o $(SUPPORT_LIB) $(LIBS) + + check: resolve addrinfo-test fake-addrinfo-test + $(RUN_TEST) ./resolve +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/tests/shlib/Makefile.in krb5_edit/src/tests/shlib/Makefile.in +*** krb5/src/tests/shlib/Makefile.in 2022-08-26 16:04:07.232000000 +0800 +--- krb5_edit/src/tests/shlib/Makefile.in 2022-08-26 16:03:35.132000000 +0800 +*************** +*** 12,18 **** + $(RUN_TEST) ./t_loader + + t_loader: t_loader.o +! $(CC_LINK) -o t_loader t_loader.o $(DL_LIB) + + check-unix: + +--- 12,18 ---- + $(RUN_TEST) ./t_loader + + t_loader: t_loader.o +! $(CC_LINK) -pie -o t_loader t_loader.o $(DL_LIB) + + check-unix: + +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/tests/threads/Makefile.in krb5_edit/src/tests/threads/Makefile.in +*** krb5/src/tests/threads/Makefile.in 2022-08-26 16:04:07.240000000 +0800 +--- krb5_edit/src/tests/threads/Makefile.in 2022-08-26 16:03:35.136000000 +0800 +*************** +*** 18,27 **** + $(RUN_TEST) ./t_rcache + + t_rcache: t_rcache.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o t_rcache t_rcache.o $(KRB5_BASE_LIBS) $(THREAD_LINKOPTS) + + prof1: prof1.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o prof1 prof1.o $(KRB5_BASE_LIBS) $(THREAD_LINKOPTS) + + prof1.o: prof1.c + +--- 18,27 ---- + $(RUN_TEST) ./t_rcache + + t_rcache: t_rcache.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o t_rcache t_rcache.o $(KRB5_BASE_LIBS) $(THREAD_LINKOPTS) + + prof1: prof1.o $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o prof1 prof1.o $(KRB5_BASE_LIBS) $(THREAD_LINKOPTS) + + prof1.o: prof1.c + +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/tests/verify/Makefile.in krb5_edit/src/tests/verify/Makefile.in +*** krb5/src/tests/verify/Makefile.in 2022-08-26 16:04:07.240000000 +0800 +--- krb5_edit/src/tests/verify/Makefile.in 2022-08-26 16:03:35.136000000 +0800 +*************** +*** 7,13 **** + all: kdb5_verify + + kdb5_verify: kdb5_verify.o $(KDB5_DEPLIBS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -o kdb5_verify kdb5_verify.o $(KDB5_LIBS) $(KDB5_DEP_LIB) $(KRB5_BASE_LIBS) + + install: + +--- 7,13 ---- + all: kdb5_verify + + kdb5_verify: kdb5_verify.o $(KDB5_DEPLIBS) $(KRB5_BASE_DEPLIBS) +! $(CC_LINK) -pie -o kdb5_verify kdb5_verify.o $(KDB5_LIBS) $(KDB5_DEP_LIB) $(KRB5_BASE_LIBS) + + install: + +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/util/et/libcom_err_gauss.exports krb5_edit/src/util/et/libcom_err_gauss.exports +*** krb5/src/util/et/libcom_err_gauss.exports 1970-01-01 08:00:00.000000000 +0800 +--- krb5_edit/src/util/et/libcom_err_gauss.exports 2022-08-26 16:03:35.140000000 +0800 +*************** +*** 0 **** +--- 1,9 ---- ++ add_error_table ++ com_err ++ com_err_va ++ error_message ++ error_table_name ++ error_table_name_r ++ remove_error_table ++ reset_com_err_hook ++ set_com_err_hook +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/util/et/Makefile.in krb5_edit/src/util/et/Makefile.in +*** krb5/src/util/et/Makefile.in 2022-08-26 16:04:07.240000000 +0800 +--- krb5_edit/src/util/et/Makefile.in 2022-08-26 16:03:35.136000000 +0800 +*************** +*** 13,19 **** + ##DOS##OBJFILE=$(OUTPRE)comerr.lst + + STLIBOBJS=error_message.o et_name.o com_err.o +! LIBBASE=com_err + LIBMAJOR=3 + LIBMINOR=0 + LIBINITFUNC=com_err_initialize +--- 13,19 ---- + ##DOS##OBJFILE=$(OUTPRE)comerr.lst + + STLIBOBJS=error_message.o et_name.o com_err.o +! LIBBASE=com_err_gauss + LIBMAJOR=3 + LIBMINOR=0 + LIBINITFUNC=com_err_initialize +*************** +*** 78,86 **** + # $(CC) -o t_com_err t_com_err.o et1.o et2.o $(LIBOBJS) + + test_et: test_et.o test1.o test2.o $(COM_ERR_DEPLIB) $(SUPPORT_DEPLIB) +! $(CC_LINK) -o test_et test_et.o test1.o test2.o -lcom_err $(SUPPORT_LIB) + t_com_err: t_com_err.o et1.o et2.o $(COM_ERR_DEPLIB) $(SUPPORT_DEPLIB) +! $(CC_LINK) -o t_com_err t_com_err.o et1.o et2.o -lcom_err $(SUPPORT_LIB) + + $(OUTPRE)test_et.exe: $(OUTPRE)test_et.$(OBJEXT) $(OUTPRE)test1.$(OBJEXT) \ + $(OUTPRE)test2.$(OBJEXT) $(CLIB) +--- 78,86 ---- + # $(CC) -o t_com_err t_com_err.o et1.o et2.o $(LIBOBJS) + + test_et: test_et.o test1.o test2.o $(COM_ERR_DEPLIB) $(SUPPORT_DEPLIB) +! $(CC_LINK) -pie -o test_et test_et.o test1.o test2.o -lcom_err_gauss $(SUPPORT_LIB) + t_com_err: t_com_err.o et1.o et2.o $(COM_ERR_DEPLIB) $(SUPPORT_DEPLIB) +! $(CC_LINK) -pie -o t_com_err t_com_err.o et1.o et2.o -lcom_err_gauss $(SUPPORT_LIB) + + $(OUTPRE)test_et.exe: $(OUTPRE)test_et.$(OBJEXT) $(OUTPRE)test1.$(OBJEXT) \ + $(OUTPRE)test2.$(OBJEXT) $(CLIB) +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/util/profile/Makefile.in krb5_edit/src/util/profile/Makefile.in +*** krb5/src/util/profile/Makefile.in 2022-08-26 16:04:07.244000000 +0800 +--- krb5_edit/src/util/profile/Makefile.in 2022-08-26 16:03:35.140000000 +0800 +*************** +*** 41,53 **** + $(srcdir)/profile_tcl.c + + DEPLIBS = $(COM_ERR_DEPLIB) $(SUPPORT_DEPLIB) +! MLIBS = -lcom_err $(SUPPORT_LIB) $(LIBS) + + LIBBASE=profile + LIBMAJOR=1 + LIBMINOR=1 + SHLIB_EXPDEPS = $(COM_ERR_DEPLIB) $(SUPPORT_DEPLIB) +! SHLIB_EXPLIBS = -lcom_err $(SUPPORT_LIB) $(LIBS) + + PROFILE_HDR=$(BUILDTOP)$(S)include$(S)profile.h + +--- 41,53 ---- + $(srcdir)/profile_tcl.c + + DEPLIBS = $(COM_ERR_DEPLIB) $(SUPPORT_DEPLIB) +! MLIBS = -lcom_err_gauss $(SUPPORT_LIB) $(LIBS) + + LIBBASE=profile + LIBMAJOR=1 + LIBMINOR=1 + SHLIB_EXPDEPS = $(COM_ERR_DEPLIB) $(SUPPORT_DEPLIB) +! SHLIB_EXPLIBS = -lcom_err_gauss $(SUPPORT_LIB) $(LIBS) + + PROFILE_HDR=$(BUILDTOP)$(S)include$(S)profile.h + +*************** +*** 77,93 **** + if exist profile.h copy profile.h $(BUILDTOP)\include\profile.h + + test_parse: test_parse.$(OBJEXT) $(OBJS) $(DEPLIBS) +! $(CC_LINK) -o test_parse test_parse.$(OBJEXT) $(OBJS) $(MLIBS) + + test_profile: test_profile.$(OBJEXT) argv_parse.$(OBJEXT) $(OBJS) $(DEPLIBS) +! $(CC_LINK) -o test_profile test_profile.$(OBJEXT) \ + argv_parse.$(OBJEXT) $(OBJS) $(MLIBS) + + test_vtable: test_vtable.$(OBJEXT) $(OBJS) $(DEPLIBS) +! $(CC_LINK) -o test_vtable test_vtable.$(OBJEXT) $(OBJS) $(MLIBS) + + test_load: test_load.$(OBJEXT) $(OBJS) $(DEPLIBS) +! $(CC_LINK) -o test_load test_load.$(OBJEXT) $(OBJS) $(MLIBS) + + modtest.conf: + echo "module `pwd`/testmod/proftest$(DYNOBJEXT):teststring" > $@ +--- 77,93 ---- + if exist profile.h copy profile.h $(BUILDTOP)\include\profile.h + + test_parse: test_parse.$(OBJEXT) $(OBJS) $(DEPLIBS) +! $(CC_LINK) -pie -o test_parse test_parse.$(OBJEXT) $(OBJS) $(MLIBS) + + test_profile: test_profile.$(OBJEXT) argv_parse.$(OBJEXT) $(OBJS) $(DEPLIBS) +! $(CC_LINK) -pie -o test_profile test_profile.$(OBJEXT) \ + argv_parse.$(OBJEXT) $(OBJS) $(MLIBS) + + test_vtable: test_vtable.$(OBJEXT) $(OBJS) $(DEPLIBS) +! $(CC_LINK) -pie -o test_vtable test_vtable.$(OBJEXT) $(OBJS) $(MLIBS) + + test_load: test_load.$(OBJEXT) $(OBJS) $(DEPLIBS) +! $(CC_LINK) -pie -o test_load test_load.$(OBJEXT) $(OBJS) $(MLIBS) + + modtest.conf: + echo "module `pwd`/testmod/proftest$(DYNOBJEXT):teststring" > $@ +*************** +*** 122,128 **** + # (cd $(srcdir) && swig -tcl8 -nosafe -o profile_tcl.c profile.swg) + profile_tcl.o: $(srcdir)/profile_tcl.c profile.h + profile_tcl: profile_tcl.o $(PROF_DEPLIB) $(COM_ERR_DEPLIB) $(SUPPORT_DEPLIB) +! $(CC_LINK) -o profile_tcl profile_tcl.o \ + $(TCL_MAYBE_RPATH) \ + -L../et -L../.. -lprofile $(TCL_LIBS) $(MLIBS) + +--- 122,128 ---- + # (cd $(srcdir) && swig -tcl8 -nosafe -o profile_tcl.c profile.swg) + profile_tcl.o: $(srcdir)/profile_tcl.c profile.h + profile_tcl: profile_tcl.o $(PROF_DEPLIB) $(COM_ERR_DEPLIB) $(SUPPORT_DEPLIB) +! $(CC_LINK) -pie -o profile_tcl profile_tcl.o \ + $(TCL_MAYBE_RPATH) \ + -L../et -L../.. -lprofile $(TCL_LIBS) $(MLIBS) + +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' krb5/src/util/support/Makefile.in krb5_edit/src/util/support/Makefile.in +*** krb5/src/util/support/Makefile.in 2022-08-26 16:04:07.248000000 +0800 +--- krb5_edit/src/util/support/Makefile.in 2022-08-26 16:03:35.144000000 +0800 +*************** +*** 11,17 **** + + SED = sed + +! LIBBASE=krb5support + LIBMAJOR=@SUPPORTLIB_MAJOR@ + LIBMINOR=1 + +--- 11,17 ---- + + SED = sed + +! LIBBASE=krb5support_gauss + LIBMAJOR=@SUPPORTLIB_MAJOR@ + LIBMINOR=1 + +*************** +*** 214,226 **** + T_K5BUF_OBJS= t_k5buf.o k5buf.o zap.o $(PRINTF_ST_OBJ) + + t_k5buf: $(T_K5BUF_OBJS) +! $(CC_LINK) -o t_k5buf $(T_K5BUF_OBJS) + + t_path: t_path.o path.o $(PRINTF_ST_OBJ) +! $(CC_LINK) -o $@ t_path.o path.o $(PRINTF_ST_OBJ) + + t_path_win: t_path_win.o path_win.o $(PRINTF_ST_OBJ) +! $(CC_LINK) -o $@ t_path_win.o path_win.o $(PRINTF_ST_OBJ) + + t_path_win.o: $(srcdir)/t_path.c + $(CC) $(ALL_CFLAGS) -DWINDOWS_PATHS -c $(srcdir)/t_path.c -o $@ +--- 214,226 ---- + T_K5BUF_OBJS= t_k5buf.o k5buf.o zap.o $(PRINTF_ST_OBJ) + + t_k5buf: $(T_K5BUF_OBJS) +! $(CC_LINK) -pie -o t_k5buf $(T_K5BUF_OBJS) + + t_path: t_path.o path.o $(PRINTF_ST_OBJ) +! $(CC_LINK) -pie -o $@ t_path.o path.o $(PRINTF_ST_OBJ) + + t_path_win: t_path_win.o path_win.o $(PRINTF_ST_OBJ) +! $(CC_LINK) -pie -o $@ t_path_win.o path_win.o $(PRINTF_ST_OBJ) + + t_path_win.o: $(srcdir)/t_path.c + $(CC) $(ALL_CFLAGS) -DWINDOWS_PATHS -c $(srcdir)/t_path.c -o $@ +*************** +*** 229,257 **** + $(CC) $(ALL_CFLAGS) -DWINDOWS_PATHS -c $(srcdir)/path.c -o $@ + + t_base64: t_base64.o base64.o +! $(CC_LINK) -o $@ t_base64.o base64.o + + T_JSON_OBJS= t_json.o json.o base64.o k5buf.o zap.o $(PRINTF_ST_OBJ) + + t_json: $(T_JSON_OBJS) +! $(CC_LINK) -o $@ $(T_JSON_OBJS) + + t_hex: t_hex.o hex.o +! $(CC_LINK) -o $@ t_hex.o hex.o + + t_hashtab: t_hashtab.o +! $(CC_LINK) -o $@ t_hashtab.o + + t_unal: t_unal.o +! $(CC_LINK) -o t_unal t_unal.o + + t_utf8: t_utf8.o utf8.o +! $(CC_LINK) -o t_utf8 t_utf8.o utf8.o + + T_UTF16_OBJS= t_utf16.o utf8_conv.o utf8.o k5buf.o zap.o $(PRINTF_ST_OBJ) + + t_utf16: $(T_UTF16_OBJS) +! $(CC_LINK) -o $@ $(T_UTF16_OBJS) + + TEST_PROGS= t_k5buf t_path t_path_win t_base64 t_json t_hex t_hashtab t_unal \ + t_utf8 t_utf16 +--- 229,257 ---- + $(CC) $(ALL_CFLAGS) -DWINDOWS_PATHS -c $(srcdir)/path.c -o $@ + + t_base64: t_base64.o base64.o +! $(CC_LINK) -pie -o $@ t_base64.o base64.o + + T_JSON_OBJS= t_json.o json.o base64.o k5buf.o zap.o $(PRINTF_ST_OBJ) + + t_json: $(T_JSON_OBJS) +! $(CC_LINK) -pie -o $@ $(T_JSON_OBJS) + + t_hex: t_hex.o hex.o +! $(CC_LINK) -pie -o $@ t_hex.o hex.o + + t_hashtab: t_hashtab.o +! $(CC_LINK) -pie -o $@ t_hashtab.o + + t_unal: t_unal.o +! $(CC_LINK) -pie -o t_unal t_unal.o + + t_utf8: t_utf8.o utf8.o +! $(CC_LINK) -pie -o t_utf8 t_utf8.o utf8.o + + T_UTF16_OBJS= t_utf16.o utf8_conv.o utf8.o k5buf.o zap.o $(PRINTF_ST_OBJ) + + t_utf16: $(T_UTF16_OBJS) +! $(CC_LINK) -pie -o $@ $(T_UTF16_OBJS) + + TEST_PROGS= t_k5buf t_path t_path_win t_base64 t_json t_hex t_hashtab t_unal \ + t_utf8 t_utf16 diff --git a/og-cmake.patch b/og-cmake.patch new file mode 100644 index 0000000000000000000000000000000000000000..67cc92383a98889bc1efc4e6ab58bcc557d7e077 --- /dev/null +++ b/og-cmake.patch @@ -0,0 +1,293 @@ +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' opengauss_server_600/cmake/src/set_thirdparty_path.cmake opengauss_server_600_edit/cmake/src/set_thirdparty_path.cmake +*** opengauss_server_600/cmake/src/set_thirdparty_path.cmake 2024-11-19 20:01:27.693621300 +0800 +--- opengauss_server_600_edit/cmake/src/set_thirdparty_path.cmake 2024-11-21 20:14:05.645621300 +0800 +*************** +*** 36,105 **** + set(LIB_UNIFIED_SUPPORT comm) + set(MEMCHECK_BUILD_TYPE debug) + set(DEPENDENCY_PATH ${3RD_PATH}/kernel/dependency) +! set(PLATFORM_PATH ${3RD_PATH}/kernel/platform) +! set(BUILDTOOLS_PATH ${3RD_PATH}/buildtools) +! set(COMPONENT_PATH ${3RD_PATH}/kernel/component) +! +! set(CJSON_HOME ${DEPENDENCY_PATH}/cjson/${SUPPORT_LLT}) +! set(ETCD_HOME ${DEPENDENCY_PATH}/etcd/${LIB_UNIFIED_SUPPORT}) +! set(EVENT_HOME ${DEPENDENCY_PATH}/event/${LIB_UNIFIED_SUPPORT}) +! set(FIO_HOME ${DEPENDENCY_PATH}/fio/${SUPPORT_LLT}) +! set(IPERF_HOME ${DEPENDENCY_PATH}/iperf/${LIB_UNIFIED_SUPPORT}) + if("${VERSION_TYPE}" STREQUAL "debug" OR "${VERSION_TYPE}" STREQUAL "memcheck") + set(JEMALLOC_HOME ${DEPENDENCY_PATH}/jemalloc/debug${JEMALLOC_SUPPORT_LLT}) + else() + set(JEMALLOC_HOME ${DEPENDENCY_PATH}/jemalloc/${VERSION_TYPE}${JEMALLOC_SUPPORT_LLT}) + endif() + set(KERBEROS_HOME ${DEPENDENCY_PATH}/kerberos/${SUPPORT_LLT}) +- set(KMC_HOME ${PLATFORM_PATH}/kmc/${LIB_UNIFIED_SUPPORT}) +- set(CGROUP_HOME ${DEPENDENCY_PATH}/libcgroup/${SUPPORT_LLT}) +- set(CURL_HOME ${DEPENDENCY_PATH}/libcurl/${SUPPORT_LLT}) +- set(EDIT_HOME ${DEPENDENCY_PATH}/libedit/${SUPPORT_LLT}) +- set(OBS_HOME ${DEPENDENCY_PATH}/libobs/${LIB_UNIFIED_SUPPORT}) +- set(XML2_HOME ${DEPENDENCY_PATH}/libxml2/${SUPPORT_LLT}) +- set(LLVM_HOME ${DEPENDENCY_PATH}/llvm/${LIB_UNIFIED_SUPPORT}) +- set(LZ4_HOME ${DEPENDENCY_PATH}/lz4/${SUPPORT_LLT}) +- set(NANOMSG_HOME ${DEPENDENCY_PATH}/nng/${LIB_UNIFIED_SUPPORT}) +- set(NCURSES_HOME ${DEPENDENCY_PATH}/ncurses/${SUPPORT_LLT}) +- set(AWSSDK_HOME ${DEPENDENCY_PATH}/aws-sdk-cpp/${SUPPORT_LLT}) + if(($ENV{WITH_TASSL}) STREQUAL "YES") + set(OPENSSL_HOME ${DEPENDENCY_PATH}/tassl/${LIB_UNIFIED_SUPPORT}) + else() + set(OPENSSL_HOME ${DEPENDENCY_PATH}/openssl/${LIB_UNIFIED_SUPPORT}) + endif() + +! set(PLJAVA_HOME ${DEPENDENCY_PATH}/pljava/${LIB_UNIFIED_SUPPORT}) +! if (EXISTS "${PLATFORM_PATH}/openjdk8/${BUILD_TUPLE}/jdk") +! set(JAVA_HOME ${PLATFORM_PATH}/openjdk8/${BUILD_TUPLE}/jdk) + else() +! set(JAVA_HOME ${PLATFORM_PATH}/huaweijdk8/${BUILD_TUPLE}/jdk) + endif() + set(ZLIB_HOME ${DEPENDENCY_PATH}/zlib1.2.11/${SUPPORT_LLT}) + set(XGBOOST_HOME ${DEPENDENCY_PATH}/xgboost/${SUPPORT_LLT}) +- set(ZSTD_HOME ${DEPENDENCY_PATH}/zstd) +- set(LICENSE_HOME ${PLATFORM_PATH}/AdaptiveLM_C_V100R005C01SPC002/${SUPPORT_LLT}) +- set(HOTPATCH_HOME ${PLATFORM_PATH}/hotpatch) +- set(SECURE_HOME ${PLATFORM_PATH}/Huawei_Secure_C/${LIB_UNIFIED_SUPPORT}) +- set(SECUREDYNAMICLIB_HOME ${PLATFORM_PATH}/Huawei_Secure_C/Dynamic_Lib) +- set(DCF_HOME ${COMPONENT_PATH}/dcf) +- set(DMS_HOME ${COMPONENT_PATH}/dms) +- set(DSS_HOME ${COMPONENT_PATH}/dss) +- +- set(MOCKCPP_HOME ${BUILDTOOLS_PATH}/mockcpp/${LIB_UNIFIED_SUPPORT}) +- set(GTEST_HOME ${BUILDTOOLS_PATH}/gtest/${LIB_UNIFIED_SUPPORT}) +- set(MASSTREE_HOME ${BUILDTOOLS_PATH}/masstree/${LIB_UNIFIED_SUPPORT}) +- set(NUMA_HOME ${DEPENDENCY_PATH}/numactl/${SUPPORT_LLT}) +- set(BOOST_HOME ${DEPENDENCY_PATH}/boost/${SUPPORT_LLT}) +- set(ODBC_HOME ${DEPENDENCY_PATH}/unixodbc) +- set(MASSTREE_HOME ${DEPENDENCY_PATH}/masstree/${LIB_UNIFIED_SUPPORT}) +- set(LCOV_HOME ${BUILDTOOLS_PATH}/gcc${GCC_VERSION_LIT}/gcc/lib/gcc/${HOST_TUPLE}) +- set(GCC_LIB_PATH $ENV{GCC_INSTALL_HOME}) +- set(MEMCHECK_LIB_PATH $ENV{GCC_INSTALL_HOME}/lib64/) +- if("${GCC_LIB_PATH}" STREQUAL "") +- set(GCC_LIB_PATH ${BUILDTOOLS_PATH}/gcc${GCC_VERSION_LIT}/gcc) +- set(MEMCHECK_HOME ${DEPENDENCY_PATH}/memcheck/${MEMCHECK_BUILD_TYPE}) +- set(MEMCHECK_LIB_PATH ${MEMCHECK_HOME}/gcc${GCC_VERSION}/lib/) +- endif() + + ############################################################################# + # lcov +--- 36,67 ---- + set(LIB_UNIFIED_SUPPORT comm) + set(MEMCHECK_BUILD_TYPE debug) + set(DEPENDENCY_PATH ${3RD_PATH}/kernel/dependency) +! + if("${VERSION_TYPE}" STREQUAL "debug" OR "${VERSION_TYPE}" STREQUAL "memcheck") + set(JEMALLOC_HOME ${DEPENDENCY_PATH}/jemalloc/debug${JEMALLOC_SUPPORT_LLT}) + else() + set(JEMALLOC_HOME ${DEPENDENCY_PATH}/jemalloc/${VERSION_TYPE}${JEMALLOC_SUPPORT_LLT}) + endif() + set(KERBEROS_HOME ${DEPENDENCY_PATH}/kerberos/${SUPPORT_LLT}) + if(($ENV{WITH_TASSL}) STREQUAL "YES") + set(OPENSSL_HOME ${DEPENDENCY_PATH}/tassl/${LIB_UNIFIED_SUPPORT}) + else() + set(OPENSSL_HOME ${DEPENDENCY_PATH}/openssl/${LIB_UNIFIED_SUPPORT}) + endif() + +! execute_process( +! COMMAND bash -c "readlink -f $(which java) | sed 's:/jre/bin/java::'" +! OUTPUT_VARIABLE JAVA_HOME_PATH +! OUTPUT_STRIP_TRAILING_WHITESPACE +! ) +! if(JAVA_HOME_PATH) +! message(STATUS "Detected JAVA_HOME: ${JAVA_HOME_PATH}") +! set(JAVA_HOME ${JAVA_HOME_PATH}) + else() +! message(FATAL_ERROR "Unable to detect JAVA_HOME") + endif() + set(ZLIB_HOME ${DEPENDENCY_PATH}/zlib1.2.11/${SUPPORT_LLT}) + set(XGBOOST_HOME ${DEPENDENCY_PATH}/xgboost/${SUPPORT_LLT}) + + ############################################################################# + # lcov +*************** +*** 209,230 **** + ############################################################################# + # obs component + ############################################################################# +- set(LIBOBS_INCLUDE_PATH ${OBS_HOME}/include) +- set(LIBOBS_LIB_PATH ${OBS_HOME}/lib) + + ############################################################################# + # xml2 component + ############################################################################# +! set(LIBXML_INCLUDE_PATH ${XML2_HOME}/include) +! set(LIBXML_LIB_PATH ${XML2_HOME}/lib) + + ############################################################################# + # llvm component + ############################################################################# +! set(LIBLLVM_BIN_PATH ${LLVM_HOME}/bin) +! set(LIBLLVM_INCLUDE_PATH ${LLVM_HOME}/include) +! set(LIBLLVM_LIB_PATH ${LLVM_HOME}/lib) +! set(LLVM_CONFIG ${LIBLLVM_BIN_PATH}/llvm-config) + + ############################################################################# + # lz4 component +--- 171,187 ---- + ############################################################################# + # obs component + ############################################################################# + + ############################################################################# + # xml2 component + ############################################################################# +! set(LIBXML_INCLUDE_PATH /usr/include) +! set(LIBXML_LIB_PATH /usr/lib64) + + ############################################################################# + # llvm component + ############################################################################# +! + + ############################################################################# + # lz4 component +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' opengauss_server_600/src/CMakeLists.txt opengauss_server_600_edit/src/CMakeLists.txt +*** opengauss_server_600/src/CMakeLists.txt 2024-11-19 20:01:27.693621300 +0800 +--- opengauss_server_600_edit/src/CMakeLists.txt 2024-11-21 20:14:05.841621300 +0800 +*************** +*** 176,297 **** + install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/common/config/cm_config.h DESTINATION include) + + # special +- install(CODE "execute_process( +- COMMAND rm ${prefix_home}/include/pg_config_os.h +- COMMAND rm ${prefix_home}/include/postgresql/server/pg_config_os.h)" +- ) +- install(CODE "execute_process( +- COMMAND cp ${CMAKE_CURRENT_SOURCE_DIR}/include/port/linux.h ${prefix_home}/include/pg_config_os.h +- COMMAND cp ${CMAKE_CURRENT_SOURCE_DIR}/include/port/linux.h ${prefix_home}/include/postgresql/server/pg_config_os.h +- COMMAND cp ${CMAKE_CURRENT_SOURCE_DIR}/include/cm/libpq-fe.h ${prefix_home}/include/cm-libpq-fe.h)" +- ) +- + # open source install part + if(NOT "${ENABLE_LITE_MODE}" STREQUAL "ON") +- install(DIRECTORY ${JAVA_HOME}/jre/ DESTINATION jre FILE_PERMISSIONS OWNER_EXECUTE GROUP_EXECUTE OWNER_READ GROUP_READ) +- endif() +- +- if("${ENABLE_MULTIPLE_NODES}" STREQUAL "OFF") +- install(DIRECTORY ${DCF_LIB_PATH} DESTINATION .) +- endif() +- if(${ENABLE_MULTIPLE_NODES}_${ENABLE_PRIVATEGAUSS} STREQUAL OFF_OFF AND NOT ${ENABLE_LITE_MODE} STREQUAL ON) +- if(EXISTS ${DMS_LIB_PATH}) +- install(DIRECTORY ${DMS_LIB_PATH} DESTINATION .) +- endif() +- if(EXISTS ${DSS_LIB_PATH}) +- install(DIRECTORY ${DSS_LIB_PATH} DESTINATION .) +- endif() +- if(EXISTS ${DSS_BIN_PATH}) +- install(DIRECTORY ${DSS_BIN_PATH} DESTINATION . FILE_PERMISSIONS OWNER_EXECUTE GROUP_EXECUTE WORLD_EXECUTE OWNER_READ GROUP_READ WORLD_READ OWNER_WRITE) +- endif() +- endif() +- +- install(DIRECTORY ${ZSTD_LIB_PATH} DESTINATION . PATTERN "*.a" EXCLUDE) +- if(NOT "${ENABLE_LITE_MODE}" STREQUAL "ON") +- install(DIRECTORY ${LIBOBS_LIB_PATH} DESTINATION .) +- install(DIRECTORY ${LIBOBS_INCLUDE_PATH} DESTINATION include/postgresql/server/access/obs) +- endif() +- install(DIRECTORY ${CJSON_LIB_PATH} DESTINATION .) +- install(DIRECTORY ${CJSON_INCLUDE_PATH}/cjson DESTINATION include/postgresql/server) +- if(NOT ${ENABLE_LITE_MODE} STREQUAL ON) +- install(DIRECTORY ${ETCD_BIN_PATH} DESTINATION .) +- install(DIRECTORY ${IPERF_LIB_PATH} DESTINATION .) +- endif() +- if(NOT ${ENABLE_LITE_MODE} STREQUAL ON) +- if(NOT ${ENABLE_MULTIPLE_NODES}_${ENABLE_PRIVATEGAUSS} STREQUAL OFF_OFF) +- install(DIRECTORY ${KMC_LIB_PATH} DESTINATION .) +- endif() +- endif() +- install(DIRECTORY ${LIBCURL_LIB_PATH} DESTINATION .) +- install(DIRECTORY ${AWSSDK_LIB_PATH} DESTINATION .) +- if(NOT "${ENABLE_LITE_MODE}" STREQUAL "ON") + install(DIRECTORY ${KERBEROS_SBIN_PATH}/ DESTINATION bin) + install(DIRECTORY ${KERBEROS_BIN_PATH} DESTINATION .) + install(DIRECTORY ${KERBEROS_LIB_PATH} DESTINATION .) + endif() +- install(DIRECTORY ${LZ4_LIB_PATH} DESTINATION .) +- install(DIRECTORY ${LZ4_BIN_PATH} DESTINATION .) +- install(DIRECTORY ${LIBOPENSSL_BIN_PATH} DESTINATION .) +- install(DIRECTORY ${LIBOPENSSL_LIB_PATH} DESTINATION . PATTERN "*.a" EXCLUDE ) + install(DIRECTORY ${ZLIB_LIB_PATH} DESTINATION . FILES_MATCHING PATTERN "libz.*") +- +- list(FIND MACRO_OPTIONS "-D__USE_NUMA" RET_NUMA) +- if(NOT ${RET_NUMA} EQUAL -1) +- install(DIRECTORY ${NUMA_LIB_PATH} DESTINATION .) +- endif() +- +- if("${ENABLE_MOT}" STREQUAL "ON") +- install(DIRECTORY ${MASSTREE_LIB_PATH} DESTINATION .) +- install(CODE "execute_process( +- COMMAND cp ${GCC_LIB_PATH}/lib64/libatomic.so.1.2.0 ${prefix_home}/lib/libatomic.so.1.2.0 +- COMMAND ln -fs libatomic.so.1.2.0 libatomic.so +- COMMAND ln -fs libatomic.so.1.2.0 libatomic.so.1 +- WORKING_DIRECTORY ${prefix_home}/lib)" +- ) +- install(CODE "message(\"-- Created symlink: libatomic.so -> libatomic.so.1.2.0\")") +- install(CODE "message(\"-- Created symlink: libatomic.so.1 -> libatomic.so.1.2.0\")") +- endif() +- +- install(FILES ${SECUREDYNAMICLIB_HOME}/libsecurec.so DESTINATION lib) +- install(FILES ${GCC_LIB_PATH}/lib64/libgcc_s.so.1 DESTINATION lib) +- install(FILES ${GCC_LIB_PATH}/lib64/libgomp.so DESTINATION lib) +- install(FILES ${GCC_LIB_PATH}/lib64/libgomp.so.1 DESTINATION lib) +- install(FILES ${GCC_LIB_PATH}/lib64/libgomp.so.1.0.0 DESTINATION lib) +- install(FILES ${XGBOOST_LIB_PATH}/libxgboost.so DESTINATION lib) +- if(NOT "${ENABLE_LITE_MODE}" STREQUAL "ON") +- install(FILES ${PLJAVA_HOME}/lib/libpljava.so DESTINATION lib) +- install(FILES ${PLJAVA_HOME}/java/pljava.jar DESTINATION lib/postgresql/java) +- install(FILES ${PLJAVA_HOME}/udstools.py DESTINATION share/postgresql/tmp) +- endif() +- if(NOT ${ENABLE_MULTIPLE_NODES}_${ENABLE_PRIVATEGAUSS} STREQUAL OFF_OFF) +- if("${SUPPORT_HOTPATCH}" STREQUAL "yes") +- install(FILES ${LIBHOTPATCH_LIB_PATH}/libdoprapatch.a DESTINATION lib) +- endif() +- endif() +- +- if("${ENABLE_MOT}" STREQUAL "ON") +- install(DIRECTORY ${MASSTREE_LIB_PATH} DESTINATION .) +- install(DIRECTORY ${GCC_LIB_PATH}/lib64/ DESTINATION lib +- FILES_MATCHING PATTERN "libatomic.so*") +- endif() +- +- install(FILES ${GCC_LIB_PATH}/lib64/libgcc_s.so.1 DESTINATION lib) +- install(DIRECTORY ${GCC_LIB_PATH}/lib64/ DESTINATION lib +- FILES_MATCHING PATTERN "libgomp.so*") +- +- install(CODE "execute_process( +- COMMAND cp ${GCC_LIB_PATH}/lib64/libstdc++.so.6.0.${LIBSTD_SUB_VERSION} ${prefix_home}/lib/libstdc++.so.6 +- WORKING_DIRECTORY ${prefix_home}/lib)" +- ) +- +- # install(DIRECTORY ${LIBCGROUP_LIB_PATH} DESTINATION . FILES_MATCHING PATTERN "libcgroup.so*") +- install(CODE "execute_process( +- COMMAND cp ${LIBCGROUP_LIB_PATH}/libcgroup.so.1.0.42 ${prefix_home}/lib/libcgroup.so +- COMMAND ln -fs libcgroup.so libcgroup.so.1 +- WORKING_DIRECTORY ${prefix_home}/lib)" +- ) +- install(CODE "message(\"-- Created symlink: libcgroup.so.1 -> libcgroup.so\")") + + # fastcheck part + install(FILES ${PROJECT_SRC_DIR}/test/regress/stub/roach_api_stub/roach_api_stub.control + DESTINATION share/postgresql/extension/ +--- 176,190 ---- + install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/common/config/cm_config.h DESTINATION include) + + # special + # open source install part + if(NOT "${ENABLE_LITE_MODE}" STREQUAL "ON") + install(DIRECTORY ${KERBEROS_SBIN_PATH}/ DESTINATION bin) + install(DIRECTORY ${KERBEROS_BIN_PATH} DESTINATION .) + install(DIRECTORY ${KERBEROS_LIB_PATH} DESTINATION .) + endif() + install(DIRECTORY ${ZLIB_LIB_PATH} DESTINATION . FILES_MATCHING PATTERN "libz.*") + ++ install(FILES ${XGBOOST_LIB_PATH}/libxgboost.so DESTINATION lib) + # fastcheck part + install(FILES ${PROJECT_SRC_DIR}/test/regress/stub/roach_api_stub/roach_api_stub.control + DESTINATION share/postgresql/extension/ diff --git a/og-delete-obs.patch b/og-delete-obs.patch new file mode 100644 index 0000000000000000000000000000000000000000..2a15ac772601f4f98ac85cbe0e914db81d597b1b --- /dev/null +++ b/og-delete-obs.patch @@ -0,0 +1,1362 @@ +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' opengauss_server_600/cmake/src/build_options.cmake opengauss_server_600_edit/cmake/src/build_options.cmake +*** opengauss_server_600/cmake/src/build_options.cmake 2024-11-19 20:01:27.693621300 +0800 +--- opengauss_server_600_edit/cmake/src/build_options.cmake 2024-11-19 20:04:06.889621300 +0800 +*************** +*** 65,70 **** +--- 65,72 ---- + option(ENABLE_ORACLE_FDW "enable export or import data with oracle,the old is --enable-oracle-fdw" OFF) + option(ENABLE_BBOX "enable bbox,the old is --enable-bbox " ON) + option(ENABLE_JEMALLOC "enable jemalloc,the old is --enable-jemalloc " ON) ++ option(ENABLE_OBS "enable obs, the old is --enable-obs " ON) ++ option(ENABLE_OPENSSL3 "enable openssl, the old is --enable-openssl " OFF) + option(BUILD_BY_CMAKE "the BUILD_BY_CMAKE is new,used in distribute pg_regress.cpp" ON) + option(DEBUG_UHEAP "collect USTORE statistics" OFF) + option(MAX_ALLOC_SEGNUM "max alloc xlog seg num in extreme_rto" 4) +*************** +*** 158,163 **** +--- 160,173 ---- + add_definitions(-DOPENEULER_MAJOR) + endif() + ++ if(ENABLE_OBS) ++ add_definitions(-DENABLE_OBS) ++ endif() ++ ++ if(ENABLE_OPENSSL3) ++ add_definitions(-DENABLE_OPENSSL3) ++ endif() ++ + set(PROTECT_OPTIONS -fwrapv -std=c++14 -fnon-call-exceptions ${OPTIMIZE_LEVEL}) + set(WARNING_OPTIONS -Wall -Wendif-labels -Wformat-security) + set(OPTIMIZE_OPTIONS -pipe -pthread -fno-aggressive-loop-optimizations -fno-expensive-optimizations -fno-omit-frame-pointer -fno-strict-aliasing -freg-struct-return) +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' opengauss_server_600/src/common/backend/pgxc_single/barrier/barrier.cpp opengauss_server_600_edit/src/common/backend/pgxc_single/barrier/barrier.cpp +*** opengauss_server_600/src/common/backend/pgxc_single/barrier/barrier.cpp 2024-11-19 20:01:27.697621300 +0800 +--- opengauss_server_600_edit/src/common/backend/pgxc_single/barrier/barrier.cpp 2024-11-19 20:04:07.237621300 +0800 +*************** +*** 401,410 **** +--- 401,412 ---- + recptr = XLogInsert(RM_BARRIER_ID, XLOG_BARRIER_CREATE, InvalidBktId); + XLogWaitFlush(recptr); + #ifndef ENABLE_LITE_MODE ++ #ifdef ENABLE_OBS + if (t_thrd.role == BARRIER_CREATOR) { + UpdateGlobalBarrierListOnMedia(id, g_instance.attr.attr_common.PGXCNodeName); + } + #endif ++ #endif + SpinLockAcquire(&g_instance.archive_obs_cxt.barrier_lock); + pg_atomic_init_u64(&g_instance.archive_obs_cxt.barrierLsn, recptr); + rc = memcpy_s(g_instance.archive_obs_cxt.barrierName, MAX_BARRIER_ID_LENGTH, id, strlen(id)); +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' opengauss_server_600/src/gausskernel/CMakeLists.txt opengauss_server_600_edit/src/gausskernel/CMakeLists.txt +*** opengauss_server_600/src/gausskernel/CMakeLists.txt 2024-11-19 20:01:27.697621300 +0800 +--- opengauss_server_600_edit/src/gausskernel/CMakeLists.txt 2024-11-19 20:04:07.509621300 +0800 +*************** +*** 257,271 **** + ) + endif() + +! if(NOT "${ENABLE_LITE_MODE}" STREQUAL "ON") +! list(APPEND gaussdb_objects +! $ +! $ +! $ +! $ +! $ +! ) +! endif() + + set(gaussdb_objects ${gaussdb_objects} ${gaussdb_server_objects}) + +--- 257,271 ---- + ) + endif() + +! # if(NOT "${ENABLE_LITE_MODE}" STREQUAL "ON") +! # list(APPEND gaussdb_objects +! # $ +! # $ +! # $ +! # $ +! # $ +! # ) +! # endif() + + set(gaussdb_objects ${gaussdb_objects} ${gaussdb_server_objects}) + +*************** +*** 299,306 **** + list(APPEND gaussdb_LINK_DIRS ${LIBXML_LIB_PATH}) + endif() + + if(NOT "${ENABLE_LITE_MODE}" STREQUAL "ON") +! list(APPEND gaussdb_LINK_LIBS -lz -lminiunz -leSDKOBS -leSDKLogAPI -lpcre -liconv -lnghttp2 -llog4cpp -lcurl -llz4 -lcjson -l${JEMALLOC_LIB_NAME} -lcgroup -lzstd -lcom_err_gauss -lgssapi_krb5_gauss -lkrb5_gauss -lgssrpc_gauss -lk5crypto_gauss -lkadm5clnt_mit -lkadm5srv_mit -lkdb5 -lkrb5support_gauss -lstdc++ -lboost_thread -lboost_chrono -lboost_system -lboost_atomic -lxml2 -laio -lncurses -ltinfo -latomic) + else() + list(APPEND gaussdb_LINK_LIBS -lz -lminiunz -lcurl -llz4 -lcjson -l${JEMALLOC_LIB_NAME} -lcgroup -lzstd -lncurses -ltinfo -lboost_thread -lboost_chrono -lboost_system -lboost_atomic) + endif() +--- 299,310 ---- + list(APPEND gaussdb_LINK_DIRS ${LIBXML_LIB_PATH}) + endif() + ++ if("${ENABLE_OBS}" STREQUAL "ON") ++ list(APPEND gaussdb_LINK_LIBS -leSDKOBS -leSDKLogAPI -lpcre -liconv -lnghttp2 -llog4cpp) ++ endif() ++ + if(NOT "${ENABLE_LITE_MODE}" STREQUAL "ON") +! list(APPEND gaussdb_LINK_LIBS -lz -lminiunz -lcurl -llz4 -lcjson -l${JEMALLOC_LIB_NAME} -lcgroup -lzstd -lcom_err_gauss -lgssapi_krb5_gauss -lkrb5_gauss -lgssrpc_gauss -lk5crypto_gauss -lkadm5clnt_mit -lkadm5srv_mit -lkdb5 -lkrb5support_gauss -lstdc++ -lboost_thread -lboost_chrono -lboost_system -lboost_atomic -lxml2 -laio -lncurses -ltinfo -latomic) + else() + list(APPEND gaussdb_LINK_LIBS -lz -lminiunz -lcurl -llz4 -lcjson -l${JEMALLOC_LIB_NAME} -lcgroup -lzstd -lncurses -ltinfo -lboost_thread -lboost_chrono -lboost_system -lboost_atomic) + endif() +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' opengauss_server_600/src/gausskernel/optimizer/commands/CMakeLists.txt opengauss_server_600_edit/src/gausskernel/optimizer/commands/CMakeLists.txt +*** opengauss_server_600/src/gausskernel/optimizer/commands/CMakeLists.txt 2024-11-19 20:01:27.697621300 +0800 +--- opengauss_server_600_edit/src/gausskernel/optimizer/commands/CMakeLists.txt 2024-11-19 20:04:07.561621300 +0800 +*************** +*** 1,7 **** + #This is the main CMAKE for build all components. + AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR} TGT_commands_SRC) + +! if("${ENABLE_LITE_MODE}" STREQUAL "ON") + list(REMOVE_ITEM TGT_commands_SRC ${CMAKE_CURRENT_SOURCE_DIR}/obs_stream.cpp) + endif() + +--- 1,7 ---- + #This is the main CMAKE for build all components. + AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR} TGT_commands_SRC) + +! if("${ENABLE_LITE_MODE}" STREQUAL "ON" OR NOT "${ENABLE_OBS}" STREQUAL "ON") + list(REMOVE_ITEM TGT_commands_SRC ${CMAKE_CURRENT_SOURCE_DIR}/obs_stream.cpp) + endif() + +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' opengauss_server_600/src/gausskernel/optimizer/commands/copy.cpp opengauss_server_600_edit/src/gausskernel/optimizer/commands/copy.cpp +*** opengauss_server_600/src/gausskernel/optimizer/commands/copy.cpp 2024-11-19 20:01:27.701621300 +0800 +--- opengauss_server_600_edit/src/gausskernel/optimizer/commands/copy.cpp 2024-11-19 20:04:07.569621300 +0800 +*************** +*** 6811,6816 **** +--- 6811,6817 ---- + if (cstate->mode == MODE_NORMAL) { + if (cstate->filename && is_obs_protocol(cstate->filename)) { + #ifndef ENABLE_LITE_MODE ++ #ifdef ENABLE_OBS + if (getNextOBS(cstate)) { + cstate->eol_type = EOL_UNKNOWN; + goto retry; +*************** +*** 6818,6823 **** +--- 6819,6825 ---- + #else + FEATURE_ON_LITE_MODE_NOT_SUPPORTED(); + #endif ++ #endif + } else { + if (getNextGDS(cstate)) { + if (cstate->eol_type != EOL_UD) +*************** +*** 9632,9637 **** +--- 9634,9640 ---- + case MODE_NORMAL: /* for GDS oriented dist import */ + if (is_obs_protocol(cstate->filename)) { + #ifndef ENABLE_LITE_MODE ++ #ifdef ENABLE_OBS + /* Attache working house routines for OBS oriented dist import */ + func.initBulkLoad = initOBSModeState; + func.endBulkLoad = endOBSModeBulkLoad; +*************** +*** 9641,9646 **** +--- 9644,9650 ---- + #else + FEATURE_ON_LITE_MODE_NOT_SUPPORTED(); + #endif ++ #endif + } else { + /* Attache working house routines for GDS oriented dist import */ + func.initBulkLoad = initNormalModeState; +*************** +*** 9707,9712 **** +--- 9711,9717 ---- + + if (is_obs_protocol(filename)) { + #ifndef ENABLE_LITE_MODE ++ #ifdef ENABLE_OBS + /* Fetch OBS write only table related attribtues */ + getOBSOptions(&cstate->obs_copy_options, options); + +*************** +*** 9726,9731 **** +--- 9731,9737 ---- + #else + FEATURE_ON_LITE_MODE_NOT_SUPPORTED(); + #endif ++ #endif + } else { + initNormalModeState(cstate, filename, tasklist); + } +*************** +*** 9889,9894 **** +--- 9895,9901 ---- + } + } else if (cstate->copy_dest == COPY_OBS) { + #ifndef ENABLE_LITE_MODE ++ #ifdef ENABLE_OBS + if (IS_PGXC_DATANODE) { + if (cstate->outBuffer->len > 0) + RemoteExportFlushData(cstate); +*************** +*** 9899,9904 **** +--- 9906,9912 ---- + #else + FEATURE_ON_LITE_MODE_NOT_SUPPORTED(); + #endif ++ #endif + } else + exportDeinitOutBuffer(cstate); + MemoryContextDelete(cstate->rowcontext); +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' opengauss_server_600/src/gausskernel/process/postmaster/CMakeLists.txt opengauss_server_600_edit/src/gausskernel/process/postmaster/CMakeLists.txt +*** opengauss_server_600/src/gausskernel/process/postmaster/CMakeLists.txt 2024-11-19 20:01:27.701621300 +0800 +--- opengauss_server_600_edit/src/gausskernel/process/postmaster/CMakeLists.txt 2024-11-19 20:04:07.697621300 +0800 +*************** +*** 1,11 **** + #This is the main CMAKE for build bin. + AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR} TGT_postmaster_SRC) + +! if("${ENABLE_LITE_MODE}" STREQUAL "ON") + list(REMOVE_ITEM TGT_postmaster_SRC + ${CMAKE_CURRENT_SOURCE_DIR}/barrier_creator.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/barrier_arch.cpp +! ${CMAKE_CURRENT_SOURCE_DIR}/aiocompleter.cpp + ) + endif() + +--- 1,11 ---- + #This is the main CMAKE for build bin. + AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR} TGT_postmaster_SRC) + +! if("${ENABLE_LITE_MODE}" STREQUAL "ON" OR NOT "${ENABLE_OBS}" STREQUAL "ON") + list(REMOVE_ITEM TGT_postmaster_SRC + ${CMAKE_CURRENT_SOURCE_DIR}/barrier_creator.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/barrier_arch.cpp +! # ${CMAKE_CURRENT_SOURCE_DIR}/aiocompleter.cpp + ) + endif() + +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' opengauss_server_600/src/gausskernel/process/postmaster/pgarch.cpp opengauss_server_600_edit/src/gausskernel/process/postmaster/pgarch.cpp +*** opengauss_server_600/src/gausskernel/process/postmaster/pgarch.cpp 2024-11-19 20:01:27.701621300 +0800 +--- opengauss_server_600_edit/src/gausskernel/process/postmaster/pgarch.cpp 2024-11-19 20:04:07.705621300 +0800 +*************** +*** 109,114 **** +--- 109,115 ---- + static void pgarch_archiveDone(const char* xlog); + static void archKill(int code, Datum arg); + #ifndef ENABLE_LITE_MODE ++ #ifdef ENABLE_OBS + static void pgarch_archiveRoachForPitrStandby(); + static bool pgarch_archiveRoachForPitrMaster(XLogRecPtr targetLsn); + static bool pgarch_archiveRoachForCoordinator(XLogRecPtr targetLsn); +*************** +*** 117,122 **** +--- 118,124 ---- + static void pgarch_ArchiverObsCopyLoop(XLogRecPtr flushPtr, doArchive fun); + static void InitArchiverLastTaskLsn(ArchiveSlotConfig* obs_archive_slot); + #endif ++ #endif + + AlarmCheckResult DataInstArchChecker(Alarm* alarm, AlarmAdditionalParam* additionalParam) + { +*************** +*** 242,249 **** +--- 244,253 ---- + setObsArchLatch(&t_thrd.arch.mainloop_latch); + + #ifndef ENABLE_LITE_MODE ++ #ifdef ENABLE_OBS + InitArchiverLastTaskLsn(NULL); + #endif ++ #endif + pgarch_MainLoop(); + + gs_thread_exit(0); +*************** +*** 338,346 **** +--- 342,352 ---- + gettimeofday(&last_copy_time, NULL); + bool time_to_stop = false; + #ifndef ENABLE_LITE_MODE ++ #ifdef ENABLE_OBS + doArchive fun = NULL; + const int millitosec = 1000; + #endif ++ #endif + + /* + * We run the copy loop immediately upon entry, in case there are +*************** +*** 393,398 **** +--- 399,405 ---- + break; + } + #ifndef ENABLE_LITE_MODE ++ #ifdef ENABLE_OBS + load_server_mode(); + if (IsServerModeStandby()) { + +*************** +*** 412,422 **** +--- 419,431 ---- + } + } + #endif ++ #endif + + /* Do what we're here for */ + if (t_thrd.arch.wakened || time_to_stop) { + t_thrd.arch.wakened = false; + #ifndef ENABLE_LITE_MODE ++ #ifdef ENABLE_OBS + obs_archive_slot = getArchiveReplicationSlot(); + if (obs_archive_slot != NULL && !IsServerModeStandby()) { + gettimeofday(&curtime, NULL); +*************** +*** 474,484 **** +--- 483,496 ---- + } + } else { + #endif ++ #endif + pgarch_ArchiverCopyLoop(); + gettimeofday(&last_copy_time, NULL); + #ifndef ENABLE_LITE_MODE ++ #ifdef ENABLE_OBS + } + #endif ++ #endif + } + + /* +*************** +*** 688,693 **** +--- 700,706 ---- + } + + #ifndef ENABLE_LITE_MODE ++ #ifdef ENABLE_OBS + /* + * pgarch_ArchiverObsCopyLoop + * +*************** +*** 771,776 **** +--- 784,790 ---- + } while (XLByteLT(t_thrd.arch.pitr_task_last_lsn, flushPtr)); + } + #endif ++ #endif + + /* + * pgarch_archiveXlog +*************** +*** 1031,1036 **** +--- 1045,1051 ---- + } + + #ifndef ENABLE_LITE_MODE ++ #ifdef ENABLE_OBS + /* + * pgarch_archiveRoachForPitrStandby + * get signal from walreceiver, fork a roach process to archive xlog +*************** +*** 1307,1309 **** +--- 1322,1325 ---- + } + + #endif ++ #endif +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' opengauss_server_600/src/gausskernel/process/postmaster/postmaster.cpp opengauss_server_600_edit/src/gausskernel/process/postmaster/postmaster.cpp +*** opengauss_server_600/src/gausskernel/process/postmaster/postmaster.cpp 2024-11-19 20:01:27.705621300 +0800 +--- opengauss_server_600_edit/src/gausskernel/process/postmaster/postmaster.cpp 2024-11-19 20:04:07.709621300 +0800 +*************** +*** 225,231 **** + + #include "distributelayer/streamMain.h" + #include "distributelayer/streamProducer.h" +! #ifndef ENABLE_LITE_MODE + #include "eSDKOBS.h" + #endif + #include "cjson/cJSON.h" +--- 225,231 ---- + + #include "distributelayer/streamMain.h" + #include "distributelayer/streamProducer.h" +! #if !defined(ENABLE_LITE_MODE) && defined(ENABLE_OBS) + #include "eSDKOBS.h" + #endif + #include "cjson/cJSON.h" +*************** +*** 1870,1876 **** + */ + initialize_feature_flags(); + +! #ifndef ENABLE_LITE_MODE + /* + * @OBS + * Create a global OBS CA object shared among threads +--- 1870,1876 ---- + */ + initialize_feature_flags(); + +! #if !defined(ENABLE_LITE_MODE) && defined(ENABLE_OBS) + /* + * @OBS + * Create a global OBS CA object shared among threads +*************** +*** 3002,3010 **** +--- 3002,3012 ---- + } + + #ifndef ENABLE_LITE_MODE ++ #ifdef ENABLE_OBS + if (g_instance.attr.attr_storage.enable_adio_function) + AioResourceInitialize(); + #endif ++ #endif + + /* start alarm checker thread. */ + if (!dummyStandbyMode) +*************** +*** 6341,6346 **** +--- 6343,6349 ---- + } + + #ifndef ENABLE_LITE_MODE ++ #ifdef ENABLE_OBS + if (g_instance.pid_cxt.BarrierCreatorPID != 0) { + barrier_creator_thread_shutdown(); + signal_child(g_instance.pid_cxt.BarrierCreatorPID, SIGTERM); +*************** +*** 6354,6359 **** +--- 6357,6363 ---- + } + } + #endif ++ #endif + + #ifdef ENABLE_MULTIPLE_NODES + if (g_instance.pid_cxt.CsnminSyncPID != 0) { +*************** +*** 6778,6788 **** +--- 6782,6794 ---- + } + + #ifndef ENABLE_LITE_MODE ++ #ifdef ENABLE_OBS + if (g_instance.pid_cxt.BarrierCreatorPID != 0) { + barrier_creator_thread_shutdown(); + signal_child(g_instance.pid_cxt.BarrierCreatorPID, SIGTERM); + } + #endif ++ #endif + + #ifdef ENABLE_MULTIPLE_NODES + if (g_instance.pid_cxt.CsnminSyncPID != 0) { +*************** +*** 8468,8478 **** +--- 8474,8486 ---- + signal_child(g_instance.pid_cxt.HeartbeatPID, SIGTERM); + + #ifndef ENABLE_LITE_MODE ++ #ifdef ENABLE_OBS + if (g_instance.pid_cxt.BarrierCreatorPID != 0) { + barrier_creator_thread_shutdown(); + signal_child(g_instance.pid_cxt.BarrierCreatorPID, SIGTERM); + } + #endif ++ #endif + #ifdef ENABLE_MULTIPLE_NODES + if (g_instance.pid_cxt.CsnminSyncPID != 0) { + csnminsync_thread_shutdown(); +*************** +*** 9637,9643 **** + + CloseGaussPidDir(); + +! #ifndef ENABLE_LITE_MODE + obs_deinitialize(); + #endif + +--- 9645,9651 ---- + + CloseGaussPidDir(); + +! #if !defined(ENABLE_LITE_MODE) && defined(ENABLE_OBS) + obs_deinitialize(); + #endif + +*************** +*** 14640,14645 **** +--- 14648,14654 ---- + } break; + + #ifndef ENABLE_LITE_MODE ++ #ifdef ENABLE_OBS + case BARRIER_CREATOR: { + if (START_BARRIER_CREATOR) { + t_thrd.proc_cxt.MyPMChildSlot = AssignPostmasterChildSlot(); +*************** +*** 14665,14670 **** +--- 14674,14680 ---- + } + } break; + #endif ++ #endif + + #ifdef ENABLE_MULTIPLE_NODES + case COMM_POOLER_CLEAN: { +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' opengauss_server_600/src/gausskernel/runtime/CMakeLists.txt opengauss_server_600_edit/src/gausskernel/runtime/CMakeLists.txt +*** opengauss_server_600/src/gausskernel/runtime/CMakeLists.txt 2024-11-19 20:01:27.705621300 +0800 +--- opengauss_server_600_edit/src/gausskernel/runtime/CMakeLists.txt 2024-11-19 20:04:07.725621300 +0800 +*************** +*** 12,18 **** + ${CMAKE_CURRENT_SOURCE_DIR}/vecexecutor + ) + +! if(NOT "${ENABLE_LITE_MODE}" STREQUAL "ON") + list(APPEND CMAKE_MODULE_PATH + ${CMAKE_CURRENT_SOURCE_DIR}/codegen + ) +--- 12,18 ---- + ${CMAKE_CURRENT_SOURCE_DIR}/vecexecutor + ) + +! if(NOT "${ENABLE_LITE_MODE}" STREQUAL "ON" AND "${ENABLE_LLVM_COMPILE}" STREQUAL "ON") + list(APPEND CMAKE_MODULE_PATH + ${CMAKE_CURRENT_SOURCE_DIR}/codegen + ) +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' opengauss_server_600/src/gausskernel/storage/access/archive/archive_am.cpp opengauss_server_600_edit/src/gausskernel/storage/access/archive/archive_am.cpp +*** opengauss_server_600/src/gausskernel/storage/access/archive/archive_am.cpp 2024-11-19 20:01:27.705621300 +0800 +--- opengauss_server_600_edit/src/gausskernel/storage/access/archive/archive_am.cpp 2024-11-19 20:04:07.777621300 +0800 +*************** +*** 30,41 **** + if (archive_config == NULL) { + return 0; + } + if (archive_config->media_type == ARCHIVE_OBS) { + return obsRead(fileName, offset, buffer, length, archive_config); + } else if (archive_config->media_type == ARCHIVE_NAS) { + return NasRead(fileName, offset, buffer, length, archive_config); + } +! + return 0; + } + +--- 30,42 ---- + if (archive_config == NULL) { + return 0; + } ++ #ifdef ENABLE_OBS + if (archive_config->media_type == ARCHIVE_OBS) { + return obsRead(fileName, offset, buffer, length, archive_config); + } else if (archive_config->media_type == ARCHIVE_NAS) { + return NasRead(fileName, offset, buffer, length, archive_config); + } +! #endif + return 0; + } + +*************** +*** 46,57 **** + return ret; + } + + if (archive_config->media_type == ARCHIVE_OBS) { + ret = obsWrite(fileName, buffer, bufferLength, archive_config); + } else if (archive_config->media_type == ARCHIVE_NAS) { + ret = NasWrite(fileName, buffer, bufferLength, archive_config); + } +! + return ret; + } + +--- 47,59 ---- + return ret; + } + ++ #ifdef ENABLE_OBS + if (archive_config->media_type == ARCHIVE_OBS) { + ret = obsWrite(fileName, buffer, bufferLength, archive_config); + } else if (archive_config->media_type == ARCHIVE_NAS) { + ret = NasWrite(fileName, buffer, bufferLength, archive_config); + } +! #endif + return ret; + } + +*************** +*** 61,73 **** + if (archive_config == NULL) { + return ret; + } +! + if (archive_config->media_type == ARCHIVE_OBS) { + ret = obsDelete(fileName, archive_config); + } else if (archive_config->media_type == ARCHIVE_NAS) { + ret = NasDelete(fileName, archive_config); + } +! + return ret; + } + +--- 63,75 ---- + if (archive_config == NULL) { + return ret; + } +! #ifdef ENABLE_OBS + if (archive_config->media_type == ARCHIVE_OBS) { + ret = obsDelete(fileName, archive_config); + } else if (archive_config->media_type == ARCHIVE_NAS) { + ret = NasDelete(fileName, archive_config); + } +! #endif + return ret; + } + +*************** +*** 77,89 **** + if (archive_config == NULL) { + return fileNameList; + } +! + if (archive_config->media_type == ARCHIVE_OBS) { + fileNameList = obsList(prefix, archive_config, reportError, shortenConnTime); + } else if (archive_config->media_type == ARCHIVE_NAS) { + fileNameList = NasList(prefix, archive_config); + } +! + return fileNameList; + } + +--- 79,91 ---- + if (archive_config == NULL) { + return fileNameList; + } +! #ifdef ENABLE_OBS + if (archive_config->media_type == ARCHIVE_OBS) { + fileNameList = obsList(prefix, archive_config, reportError, shortenConnTime); + } else if (archive_config->media_type == ARCHIVE_NAS) { + fileNameList = NasList(prefix, archive_config); + } +! #endif + return fileNameList; + } + +*************** +*** 94,105 **** + ereport(WARNING, (errmsg("when check file exist, the archive config is null"))); + return ret; + } +! + if (archive_config->media_type == ARCHIVE_OBS) { + ret = checkOBSFileExist(file_path, archive_config); + } else if (archive_config->media_type == ARCHIVE_NAS) { + ret = checkNASFileExist(file_path, archive_config); + } +! + return ret; + } +--- 96,107 ---- + ereport(WARNING, (errmsg("when check file exist, the archive config is null"))); + return ret; + } +! #ifdef ENABLE_OBS + if (archive_config->media_type == ARCHIVE_OBS) { + ret = checkOBSFileExist(file_path, archive_config); + } else if (archive_config->media_type == ARCHIVE_NAS) { + ret = checkNASFileExist(file_path, archive_config); + } +! #endif + return ret; + } +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' opengauss_server_600/src/gausskernel/storage/access/CMakeLists.txt opengauss_server_600_edit/src/gausskernel/storage/access/CMakeLists.txt +*** opengauss_server_600/src/gausskernel/storage/access/CMakeLists.txt 2024-11-19 20:01:27.705621300 +0800 +--- opengauss_server_600_edit/src/gausskernel/storage/access/CMakeLists.txt 2024-11-19 20:04:07.777621300 +0800 +*************** +*** 25,31 **** + ${CMAKE_CURRENT_SOURCE_DIR}/ustore + ) + +! if(NOT "${ENABLE_LITE_MODE}" STREQUAL "ON") + list(APPEND CMAKE_MODULE_PATH + ${CMAKE_CURRENT_SOURCE_DIR}/archive + ) +--- 25,31 ---- + ${CMAKE_CURRENT_SOURCE_DIR}/ustore + ) + +! if(NOT "${ENABLE_LITE_MODE}" STREQUAL "ON" AND "${ENABLE_OBS}" STREQUAL "ON") + list(APPEND CMAKE_MODULE_PATH + ${CMAKE_CURRENT_SOURCE_DIR}/archive + ) +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' opengauss_server_600/src/gausskernel/storage/access/obs/obs_am.cpp opengauss_server_600_edit/src/gausskernel/storage/access/obs/obs_am.cpp +*** opengauss_server_600/src/gausskernel/storage/access/obs/obs_am.cpp 2024-11-19 20:01:27.709621300 +0800 +--- opengauss_server_600_edit/src/gausskernel/storage/access/obs/obs_am.cpp 2024-11-19 20:04:07.797621300 +0800 +*************** +*** 21,27 **** + #define strpos(p, s) (strstr((p), (s)) != NULL ? strstr((p), (s)) - (p) : -1) + + #include "access/obs/obs_am.h" +! #ifndef ENABLE_LITE_MODE + #include "eSDKOBS.h" + #endif + +--- 21,27 ---- + #define strpos(p, s) (strstr((p), (s)) != NULL ? strstr((p), (s)) - (p) : -1) + + #include "access/obs/obs_am.h" +! #if !defined(ENABLE_LITE_MODE) && defined(ENABLE_OBS) + #include "eSDKOBS.h" + #endif + +*************** +*** 235,241 **** + errmsg("OBS URL's %s is not valid '%s'", invalid_element, folderName))); + } + +! #ifndef ENABLE_LITE_MODE + // Some Windows stuff + #ifndef FOPEN_EXTRA_FLAGS + #define FOPEN_EXTRA_FLAGS "" +--- 235,241 ---- + errmsg("OBS URL's %s is not valid '%s'", invalid_element, folderName))); + } + +! #if !defined(ENABLE_LITE_MODE) && defined(ENABLE_OBS) + // Some Windows stuff + #ifndef FOPEN_EXTRA_FLAGS + #define FOPEN_EXTRA_FLAGS "" +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' opengauss_server_600/src/gausskernel/storage/access/transam/xlog.cpp opengauss_server_600_edit/src/gausskernel/storage/access/transam/xlog.cpp +*** opengauss_server_600/src/gausskernel/storage/access/transam/xlog.cpp 2024-11-19 20:01:27.713621300 +0800 +--- opengauss_server_600_edit/src/gausskernel/storage/access/transam/xlog.cpp 2024-11-19 20:04:07.825621300 +0800 +*************** +*** 7812,7817 **** +--- 7812,7818 ---- + #endif + else if (XLogRecGetRmid(record) == RM_BARRIER_ID) { + #ifndef ENABLE_LITE_MODE ++ #ifdef ENABLE_OBS + if (record_info == XLOG_BARRIER_CREATE) { + recordBarrierId = (char *)XLogRecGetData(record); + ereport(u_sess->attr.attr_storage.HaModuleDebug ? LOG : DEBUG4, +*************** +*** 7822,7827 **** +--- 7823,7829 ---- + #else + FEATURE_ON_LITE_MODE_NOT_SUPPORTED(); + #endif ++ #endif + } else if (XLogRecGetRmid(record) == RM_XLOG_ID) { + if (record_info == XLOG_RESTORE_POINT) { + xl_restore_point *recordRestorePointData = (xl_restore_point *)XLogRecGetData(record); +*************** +*** 10412,10419 **** +--- 10414,10423 ---- + (uint32)t_thrd.xlog_cxt.ReadRecPtr))); + + #ifndef ENABLE_LITE_MODE ++ #ifdef ENABLE_OBS + update_stop_barrier(); + #endif ++ #endif + INSTR_TIME_SET_CURRENT(rec_startTime); + g_instance.dms_cxt.SSReformInfo.redo_start_time = GetCurrentTimestamp(); + t_thrd.xlog_cxt.RedoStartLSN = t_thrd.xlog_cxt.ReadRecPtr; +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' opengauss_server_600/src/gausskernel/storage/access/transam/xlogfuncs.cpp opengauss_server_600_edit/src/gausskernel/storage/access/transam/xlogfuncs.cpp +*** opengauss_server_600/src/gausskernel/storage/access/transam/xlogfuncs.cpp 2024-11-19 20:01:27.717621300 +0800 +--- opengauss_server_600_edit/src/gausskernel/storage/access/transam/xlogfuncs.cpp 2024-11-19 20:04:07.825621300 +0800 +*************** +*** 1202,1207 **** +--- 1202,1208 ---- + Datum gs_set_obs_delete_location_with_slotname(PG_FUNCTION_ARGS) + { + #ifndef ENABLE_LITE_MODE ++ #ifdef ENABLE_OBS + char* lsnLocation = PG_GETARG_CSTRING(0); + char* currentSlotName = PG_GETARG_CSTRING(1); + +*************** +*** 1241,1246 **** +--- 1242,1248 ---- + FEATURE_ON_LITE_MODE_NOT_SUPPORTED(); + PG_RETURN_TEXT_P(NULL); + #endif ++ #endif + } + + /* +*************** +*** 1251,1256 **** +--- 1253,1259 ---- + Datum gs_set_obs_delete_location(PG_FUNCTION_ARGS) + { + #ifndef ENABLE_LITE_MODE ++ #ifdef ENABLE_OBS + text *location = PG_GETARG_TEXT_P(0); + char *locationstr = NULL; + uint32 hi = 0; +*************** +*** 1292,1302 **** +--- 1295,1307 ---- + FEATURE_ON_LITE_MODE_NOT_SUPPORTED(); + PG_RETURN_TEXT_P(NULL); + #endif ++ #endif + } + + Datum gs_get_global_barrier_status(PG_FUNCTION_ARGS) + { + #ifndef ENABLE_LITE_MODE ++ #ifdef ENABLE_OBS + #define PG_GET_GLOBAL_BARRIER_STATUS_COLS 2 + char globalBarrierId[MAX_BARRIER_ID_LENGTH] = {0}; + char globalAchiveBarrierId[MAX_BARRIER_ID_LENGTH] = {0}; +*************** +*** 1392,1402 **** +--- 1397,1409 ---- + FEATURE_ON_LITE_MODE_NOT_SUPPORTED(); + PG_RETURN_DATUM(0); + #endif ++ #endif + } + + Datum gs_get_global_barriers_status(PG_FUNCTION_ARGS) + { + #ifndef ENABLE_LITE_MODE ++ #ifdef ENABLE_OBS + #define PG_GET_GLOBAL_BARRIERS_STATUS_COLS 3 + char globalBarrierId[MAX_BARRIER_ID_LENGTH] = {0}; + char globalAchiveBarrierId[MAX_BARRIER_ID_LENGTH] = {0}; +*************** +*** 1520,1525 **** +--- 1527,1533 ---- + #else + FEATURE_ON_LITE_MODE_NOT_SUPPORTED(); + #endif ++ #endif + PG_RETURN_DATUM(0); + } + +*************** +*** 1607,1612 **** +--- 1615,1621 ---- + Datum gs_hadr_do_switchover(PG_FUNCTION_ARGS) + { + #ifndef ENABLE_LITE_MODE ++ #ifdef ENABLE_OBS + #define TIME_GET_MILLISEC(t) (((long)(t).tv_sec * 1000) + ((long)(t).tv_usec) / 1000) + uint64_t barrier_index = 0; + int ret; +*************** +*** 1697,1702 **** +--- 1706,1712 ---- + #else + FEATURE_ON_LITE_MODE_NOT_SUPPORTED(); + #endif ++ #endif + PG_RETURN_BOOL(true); + } + +*************** +*** 1743,1748 **** +--- 1753,1759 ---- + Datum gs_upload_obs_file(PG_FUNCTION_ARGS) + { + #ifndef ENABLE_LITE_MODE ++ #ifdef ENABLE_OBS + char* slotname = PG_GETARG_CSTRING(0); + char* src = PG_GETARG_CSTRING(1); + char* dest = PG_GETARG_CSTRING(2); +*************** +*** 1781,1786 **** +--- 1792,1798 ---- + #else + FEATURE_ON_LITE_MODE_NOT_SUPPORTED(); + #endif ++ #endif + + PG_RETURN_VOID(); + } +*************** +*** 1788,1793 **** +--- 1800,1806 ---- + Datum gs_download_obs_file(PG_FUNCTION_ARGS) + { + #ifndef ENABLE_LITE_MODE ++ #ifdef ENABLE_OBS + char* slotname = PG_GETARG_CSTRING(0); + char* src = PG_GETARG_CSTRING(1); + char* dest = PG_GETARG_CSTRING(2); +*************** +*** 1831,1836 **** +--- 1844,1850 ---- + #else + FEATURE_ON_LITE_MODE_NOT_SUPPORTED(); + #endif ++ #endif + + PG_RETURN_VOID(); + } +*************** +*** 1838,1843 **** +--- 1852,1858 ---- + Datum gs_get_obs_file_context(PG_FUNCTION_ARGS) + { + #ifndef ENABLE_LITE_MODE ++ #ifdef ENABLE_OBS + char fileContext[MAXPGPATH] = {0}; + size_t readLen = 0; + char* setFileName = PG_GETARG_CSTRING(0); +*************** +*** 1882,1892 **** +--- 1897,1909 ---- + FEATURE_ON_LITE_MODE_NOT_SUPPORTED(); + PG_RETURN_TEXT_P(NULL); + #endif ++ #endif + } + + Datum gs_set_obs_file_context(PG_FUNCTION_ARGS) + { + #ifndef ENABLE_LITE_MODE ++ #ifdef ENABLE_OBS + int ret = 0; + char* setFileName = PG_GETARG_CSTRING(0); + char* setFileContext = PG_GETARG_CSTRING(1); +*************** +*** 1922,1932 **** +--- 1939,1951 ---- + FEATURE_ON_LITE_MODE_NOT_SUPPORTED(); + PG_RETURN_TEXT_P(NULL); + #endif ++ #endif + } + + Datum gs_get_hadr_key_cn(PG_FUNCTION_ARGS) + { + #ifndef ENABLE_LITE_MODE ++ #ifdef ENABLE_OBS + #define GS_GET_HADR_KEY_CN_COLS 4 + bool needLocalKeyCn = false; + char localKeyCn[MAXFNAMELEN] = {0}; +*************** +*** 2028,2033 **** +--- 2047,2053 ---- + #else + FEATURE_ON_LITE_MODE_NOT_SUPPORTED(); + #endif ++ #endif + PG_RETURN_DATUM(0); + } + +*************** +*** 2177,2182 **** +--- 2197,2203 ---- + Datum gs_get_active_archiving_standby(PG_FUNCTION_ARGS) + { + #ifndef ENABLE_LITE_MODE ++ #ifdef ENABLE_OBS + int i; + int rc; + errno_t errorno = EOK; +*************** +*** 2269,2274 **** +--- 2290,2296 ---- + FEATURE_ON_LITE_MODE_NOT_SUPPORTED(); + PG_RETURN_DATUM(0); + #endif ++ #endif + } + + #ifndef ENABLE_LITE_MODE +*************** +*** 2287,2292 **** +--- 2309,2315 ---- + Datum gs_pitr_clean_history_global_barriers(PG_FUNCTION_ARGS) + { + #ifndef ENABLE_LITE_MODE ++ #ifdef ENABLE_OBS + if (!superuser() && !(isOperatoradmin(GetUserId()) && u_sess->attr.attr_security.operation_mode)) { + ereport(ERROR, (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE), + (errmsg("Must be system admin or operator admin in operation mode to " +*************** +*** 2316,2326 **** +--- 2339,2351 ---- + FEATURE_ON_LITE_MODE_NOT_SUPPORTED(); + PG_RETURN_TEXT_P(NULL); + #endif ++ #endif + } + + Datum gs_pitr_archive_slot_force_advance(PG_FUNCTION_ARGS) + { + #ifndef ENABLE_LITE_MODE ++ #ifdef ENABLE_OBS + XLogSegNo currArchslotSegNo; + XLogRecPtr archiveSlotLocNow = InvalidXLogRecPtr; + char location[MAXFNAMELEN]; +*************** +*** 2445,2450 **** +--- 2470,2476 ---- + FEATURE_ON_LITE_MODE_NOT_SUPPORTED(); + PG_RETURN_TEXT_P(NULL); + #endif ++ #endif + } + + Datum gs_get_standby_cluster_barrier_status(PG_FUNCTION_ARGS) +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' opengauss_server_600/src/gausskernel/storage/bulkload/dist_fdw.cpp opengauss_server_600_edit/src/gausskernel/storage/bulkload/dist_fdw.cpp +*** opengauss_server_600/src/gausskernel/storage/bulkload/dist_fdw.cpp 2024-11-19 20:01:27.717621300 +0800 +--- opengauss_server_600_edit/src/gausskernel/storage/bulkload/dist_fdw.cpp 2024-11-19 20:04:07.841621300 +0800 +*************** +*** 225,233 **** +--- 225,235 ---- + extern void GetDistImportOptions(Oid relOid, DistImportPlanState *planstate, ForeignOptions *fOptions = NULL); + + #ifndef ENABLE_LITE_MODE ++ #ifdef ENABLE_OBS + static void assignOBSTaskToDataNode(List *urllist, List **totalTask, List *dnNames, DistImportPlanState *planstate, + int64 *fileNum = NULL); + #endif ++ #endif + static void assignTaskToDataNodeInSharedMode(List *urllist, List **totalTask, List *dnNames); + static void assignTaskToDataNodeInNormalMode(List *urllist, List **totalTask, List *dnNames, int dop); + +*************** +*** 236,241 **** +--- 238,244 ---- + List *getOBSFileList(List *urllist, bool encrypt, const char *access_key, const char *secret_access_key, + bool isAnalyze); + #ifndef ENABLE_LITE_MODE ++ #ifdef ENABLE_OBS + /* + * In OBS parallel data loading case, we may have # of datanodes not + * equal to # of objects, as one object can only be assign to one +*************** +*** 244,249 **** +--- 247,253 ---- + */ + static void assignOBSFileToDataNode(List *urllist, List **totalTask, List *dnNames); + #endif ++ #endif + + /* + * Foreign-data wrapper handler function: return a struct with pointers +*************** +*** 432,437 **** +--- 436,442 ---- + } + + #ifndef ENABLE_LITE_MODE ++ #ifdef ENABLE_OBS + /** + * @Description: Scheduler file for dist obs foreign table. + * @in foreignTableId, the given foreign table Oid. +*************** +*** 483,488 **** +--- 488,494 ---- + return totalTask; + } + #endif ++ #endif + + /** + * @Description: Build the related scanState information. +*************** +*** 1064,1069 **** +--- 1070,1076 ---- + } + + #ifndef ENABLE_LITE_MODE ++ #ifdef ENABLE_OBS + /* + * @Description: get all matched files in obs for each url + * @IN urllist: obs url list +*************** +*** 1194,1199 **** +--- 1201,1207 ---- + pfree(obs_file_list); + } + #endif ++ #endif + + /* + * @Description: assign task to each data node in shared mode +*************** +*** 1312,1323 **** +--- 1320,1333 ---- + const char *first_url = strVal(lfirst(list_head(urllist))); + if (is_obs_protocol(first_url)) { + #ifndef ENABLE_LITE_MODE ++ #ifdef ENABLE_OBS + assignOBSTaskToDataNode(urllist, &totalTask, dnNames, planstate, fileNum); + list_free(dnNames); + return totalTask; + #else + FEATURE_ON_LITE_MODE_NOT_SUPPORTED(); + #endif ++ #endif + } + + if (IS_SHARED_MODE(mode)) { +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' opengauss_server_600/src/gausskernel/storage/bulkload/foreignroutine.cpp opengauss_server_600_edit/src/gausskernel/storage/bulkload/foreignroutine.cpp +*** opengauss_server_600/src/gausskernel/storage/bulkload/foreignroutine.cpp 2024-11-19 20:01:27.717621300 +0800 +--- opengauss_server_600_edit/src/gausskernel/storage/bulkload/foreignroutine.cpp 2024-11-19 20:04:07.841621300 +0800 +*************** +*** 1570,1577 **** +--- 1570,1579 ---- + (void)ExecClearTuple(slot); + MemoryContextReset(node->scanMcxt); + #ifndef ENABLE_LITE_MODE ++ #ifdef ENABLE_OBS + SetObsMemoryContext(((CopyState)importState)->copycontext); + #endif ++ #endif + ReportIllegalCharExceptionThreshold(); + + PG_TRY(); +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' opengauss_server_600/src/gausskernel/storage/bulkload/parser.cpp opengauss_server_600_edit/src/gausskernel/storage/bulkload/parser.cpp +*** opengauss_server_600/src/gausskernel/storage/bulkload/parser.cpp 2024-11-19 20:01:27.717621300 +0800 +--- opengauss_server_600_edit/src/gausskernel/storage/bulkload/parser.cpp 2024-11-19 20:04:07.841621300 +0800 +*************** +*** 99,108 **** +--- 99,110 ---- + #define parser_securec_check_ss(rc) securec_check_ss(rc, "\0", "\0") + + #ifndef ENABLE_LITE_MODE ++ #ifdef ENABLE_OBS + static size_t SourceRead_OBS(Source* self, void* buffer, size_t len); + static bool SourceNext_OBS(Source* self); + #endif + #endif ++ #endif + + static Source* CreateSource(const FileList* files, SourceType sourcetype); + static void DestroyParser(Parser* self); +*************** +*** 467,477 **** +--- 469,481 ---- + #else + if (m_sourcetype == SOURCE_TYPE_OBS) { + #ifndef ENABLE_LITE_MODE ++ #ifdef ENABLE_OBS + SourceRead = SourceRead_OBS; + SourceNext = SourceNext_OBS; + #else + FEATURE_ON_LITE_MODE_NOT_SUPPORTED(); + #endif ++ #endif + } else { + SourceRead = SourceRead_File; + SourceNext = SourceNext_File; +*************** +*** 1303,1314 **** +--- 1307,1320 ---- + } + #else + #ifndef ENABLE_LITE_MODE ++ #ifdef ENABLE_OBS + /* for OBS, append the overload data in overload buffer */ + SaveOverloadBuf(m_overload_buf, buf, buf_len, isComplete); + #else + FEATURE_ON_LITE_MODE_NOT_SUPPORTED(); + #endif + #endif ++ #endif + /* + * Here the curent overload buffer is already done so the actual buf_len can be returned. + */ +*************** +*** 1471,1476 **** +--- 1477,1483 ---- + + #ifdef OBS_SERVER + #ifndef ENABLE_LITE_MODE ++ #ifdef ENABLE_OBS + static size_t SourceRead_OBS(Source* self, void* buffer, size_t len) + { + size_t nread = 0; +*************** +*** 1692,1694 **** +--- 1699,1702 ---- + } + #endif + #endif ++ #endif +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' opengauss_server_600/src/gausskernel/storage/bulkload/vecforeignroutine.cpp opengauss_server_600_edit/src/gausskernel/storage/bulkload/vecforeignroutine.cpp +*** opengauss_server_600/src/gausskernel/storage/bulkload/vecforeignroutine.cpp 2024-11-19 20:01:27.717621300 +0800 +--- opengauss_server_600_edit/src/gausskernel/storage/bulkload/vecforeignroutine.cpp 2024-11-19 20:04:07.841621300 +0800 +*************** +*** 125,132 **** +--- 125,134 ---- + MemoryContextReset(scanMcxt); + oldMemoryContext = MemoryContextSwitchTo(scanMcxt); + #ifndef ENABLE_LITE_MODE ++ #ifdef ENABLE_OBS + SetObsMemoryContext(((CopyState)importState)->copycontext); + #endif ++ #endif + for (batch->m_rows = 0; batch->m_rows < BatchMaxSize; batch->m_rows++) { + retry: + PG_TRY(); +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' opengauss_server_600/src/gausskernel/storage/replication/archive_walreceiver.cpp opengauss_server_600_edit/src/gausskernel/storage/replication/archive_walreceiver.cpp +*** opengauss_server_600/src/gausskernel/storage/replication/archive_walreceiver.cpp 2024-11-19 20:01:27.717621300 +0800 +--- opengauss_server_600_edit/src/gausskernel/storage/replication/archive_walreceiver.cpp 2024-11-19 20:04:07.913621300 +0800 +*************** +*** 37,42 **** +--- 37,43 ---- + #include "pgxc/pgxc.h" + + #ifndef ENABLE_LITE_MODE ++ #ifdef ENABLE_OBS + #define CUR_OBS_FILE_VERSION 1 + #define TIMEOUT_FOR_ARCHIVE_RECEIVER 600 + +*************** +*** 1870,1872 **** +--- 1871,1874 ---- + FEATURE_ON_LITE_MODE_NOT_SUPPORTED(); + } + #endif ++ #endif +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' opengauss_server_600/src/gausskernel/storage/replication/slot.cpp opengauss_server_600_edit/src/gausskernel/storage/replication/slot.cpp +*** opengauss_server_600/src/gausskernel/storage/replication/slot.cpp 2024-11-19 20:01:27.717621300 +0800 +--- opengauss_server_600_edit/src/gausskernel/storage/replication/slot.cpp 2024-11-19 20:04:07.929621300 +0800 +*************** +*** 2598,2603 **** +--- 2598,2604 ---- + } + + #ifndef ENABLE_LITE_MODE ++ #ifdef ENABLE_OBS + void get_hadr_cn_info(char* keyCn, bool* isExitKey, char* deleteCn, bool* isExitDelete, + ArchiveSlotConfig *archive_conf) + { +*************** +*** 2625,2630 **** +--- 2626,2632 ---- + } + } + #endif ++ #endif + + void GetReplslotPath(char *path) + { +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' opengauss_server_600/src/gausskernel/storage/replication/slotfuncs.cpp opengauss_server_600_edit/src/gausskernel/storage/replication/slotfuncs.cpp +*** opengauss_server_600/src/gausskernel/storage/replication/slotfuncs.cpp 2024-11-19 20:01:27.717621300 +0800 +--- opengauss_server_600_edit/src/gausskernel/storage/replication/slotfuncs.cpp 2024-11-19 20:04:07.929621300 +0800 +*************** +*** 268,273 **** +--- 268,274 ---- + Datum pg_create_physical_replication_slot_extern(PG_FUNCTION_ARGS) + { + #ifndef ENABLE_LITE_MODE ++ #ifdef ENABLE_OBS + Name name = PG_GETARG_NAME(0); + bool isDummyStandby = PG_GETARG_BOOL(1); + XLogRecPtr currFlushPtr = InvalidXLogRecPtr; +*************** +*** 357,362 **** +--- 358,364 ---- + FEATURE_ON_LITE_MODE_NOT_SUPPORTED(); + PG_RETURN_DATUM(0); + #endif ++ #endif + } + + void create_logical_replication_slot(const Name name, Name plugin, bool isDummyStandby, Oid databaseId, +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' opengauss_server_600/src/include/access/obs/obs_am.h opengauss_server_600_edit/src/include/access/obs/obs_am.h +*** opengauss_server_600/src/include/access/obs/obs_am.h 2024-11-19 20:01:27.717621300 +0800 +--- opengauss_server_600_edit/src/include/access/obs/obs_am.h 2024-11-19 20:04:07.945621300 +0800 +*************** +*** 30,36 **** + #include "nodes/pg_list.h" + #include "storage/buf/buffile.h" + #include "replication/slot.h" +! #ifndef ENABLE_LITE_MODE + #include "eSDKOBS.h" + #endif + +--- 30,36 ---- + #include "nodes/pg_list.h" + #include "storage/buf/buffile.h" + #include "replication/slot.h" +! #if !defined(ENABLE_LITE_MODE) && defined(ENABLE_OBS) + #include "eSDKOBS.h" + #endif + +*************** +*** 132,138 **** + bool in_computing; + /* size_t m_offset; =>get_cond.start_byte */ + /* obs_bucket_context m_bucketCtx; =>m_option.bucket_options */ +! #ifndef ENABLE_LITE_MODE + obs_options m_option; + obs_object_info m_object_info; + +--- 132,138 ---- + bool in_computing; + /* size_t m_offset; =>get_cond.start_byte */ + /* obs_bucket_context m_bucketCtx; =>m_option.bucket_options */ +! #if !defined(ENABLE_LITE_MODE) && defined(ENABLE_OBS) + obs_options m_option; + obs_object_info m_object_info; + +*************** +*** 152,158 **** + typedef struct list_service_data { + int headerPrinted; + int allDetails; +! #ifndef ENABLE_LITE_MODE + obs_status ret_status; + #endif + } list_service_data; +--- 152,158 ---- + typedef struct list_service_data { + int headerPrinted; + int allDetails; +! #if !defined(ENABLE_LITE_MODE) && defined(ENABLE_OBS) + obs_status ret_status; + #endif + } list_service_data; +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' opengauss_server_600/src/test/regress/obstools/obstool.c opengauss_server_600_edit/src/test/regress/obstools/obstool.c +*** opengauss_server_600/src/test/regress/obstools/obstool.c 2024-11-19 20:01:27.721621300 +0800 +--- opengauss_server_600_edit/src/test/regress/obstools/obstool.c 2024-11-19 20:04:11.089621300 +0800 +*************** +*** 15,21 **** +--- 15,23 ---- + #include "getopt.h" + #endif + ++ #ifdef ENABLE_OBS + #include "eSDKOBS.h" ++ #endif + #include "securec.h" + + /* Some Windows stuff */ +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' opengauss_server_600/src/test/ut/CMakeLists.txt opengauss_server_600_edit/src/test/ut/CMakeLists.txt +*** opengauss_server_600/src/test/ut/CMakeLists.txt 2024-11-19 20:01:27.721621300 +0800 +--- opengauss_server_600_edit/src/test/ut/CMakeLists.txt 2024-11-19 20:04:11.561621300 +0800 +*************** +*** 11,17 **** + ${LIBOBS_LIB_PATH} ${LZ4_LIB_PATH}) + + # -l +! set(UNIT_TEST_BASE_LIB_LIST pthread gtest_main gtest mockcpp cjson dcf xgboost zstd nghttp2 iconv eSDKOBS eSDKLogAPI log4cpp lz4 db) + + add_subdirectory(demo) + add_subdirectory(db4ai) +--- 11,21 ---- + ${LIBOBS_LIB_PATH} ${LZ4_LIB_PATH}) + + # -l +! if("${ENABLE_OBS}" STREQUAL "ON") +! set(UNIT_TEST_BASE_LIB_LIST pthread gtest_main gtest mockcpp cjson dcf xgboost zstd nghttp2 iconv eSDKOBS eSDKLogAPI log4cpp lz4 db) +! else() +! set(UNIT_TEST_BASE_LIB_LIST pthread gtest_main gtest mockcpp cjson dcf xgboost zstd lz4 db) +! endif() + + add_subdirectory(demo) + add_subdirectory(db4ai) diff --git a/og-dolphin.patch b/og-dolphin.patch new file mode 100644 index 0000000000000000000000000000000000000000..4f9bcfcb3ffcc2c29d3090d8711e3713913dd740 --- /dev/null +++ b/og-dolphin.patch @@ -0,0 +1,184 @@ +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' openGauss-server-600/CMakeLists.txt openGauss-server-600-edit/CMakeLists.txt +*** openGauss-server-600/CMakeLists.txt 2024-12-13 09:59:47.660744190 +0800 +--- openGauss-server-600-edit/CMakeLists.txt 2024-12-13 09:55:28.144744190 +0800 +*************** +*** 37,42 **** +--- 37,49 ---- + MESSAGE(FATAL_ERROR " The option ENABLE_PRIVATEGAUSS is not supported thus should be turned off.") + endif() + ++ if("${ENABLE_LITE_MODE}" STREQUAL "") ++ set(ENABLE_LITE_MODE "OFF") ++ endif() ++ if("${ENABLE_MOT}" STREQUAL "") ++ set(ENABLE_MOT "OFF") ++ endif() ++ + #FIXME: make it an argument + set(openGauss ".") + set(ENV{openGauss} ".") +*************** +*** 107,113 **** + install(DIRECTORY ${CMAKE_BINARY_DIR}/libsimsearch DESTINATION lib) + + if(EXISTS ${CMAKE_SOURCE_DIR}/contrib/dolphin) +! install(CODE "execute_process(COMMAND bash cmake.sh WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/contrib/dolphin)") + install(FILES ${CMAKE_SOURCE_DIR}/contrib/dolphin/dolphin.control + DESTINATION share/postgresql/extension/ + ) +--- 114,120 ---- + install(DIRECTORY ${CMAKE_BINARY_DIR}/libsimsearch DESTINATION lib) + + if(EXISTS ${CMAKE_SOURCE_DIR}/contrib/dolphin) +! install(CODE "execute_process(COMMAND bash cmake.sh ${ENABLE_LITE_MODE} ${ENABLE_MOT} WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/contrib/dolphin)") + install(FILES ${CMAKE_SOURCE_DIR}/contrib/dolphin/dolphin.control + DESTINATION share/postgresql/extension/ + ) +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' openGauss-server-600/contrib/CMakeLists.txt openGauss-server-600-edit/contrib/CMakeLists.txt +*** openGauss-server-600/contrib/CMakeLists.txt 2024-12-13 09:59:02.268744190 +0800 +--- openGauss-server-600-edit/contrib/CMakeLists.txt 2024-12-13 11:26:28.136744190 +0800 +*************** +*** 30,35 **** +--- 30,42 ---- + ${CMAKE_CURRENT_SOURCE_DIR}/gms_profiler + ) + ++ if(NOT "${ENABLE_LITE_MODE}" STREQUAL "ON") ++ INCLUDE_DIRECTORIES(${LIBODBC_INCLUDE_PATH}) ++ INCLUDE_DIRECTORIES(${LIBODBC_LIB_PATH}) ++ list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/dblink) ++ add_subdirectory(dblink) ++ endif() ++ + add_subdirectory(hstore) + add_subdirectory(test_decoding) + add_subdirectory(mppdb_decoding) +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' openGauss-server-600/contrib/dblink/CMakeList.txt openGauss-server-600-edit/contrib/dblink/CMakeList.txt +*** openGauss-server-600/contrib/dblink/CMakeLists.txt 1970-01-01 08:00:00.000000000 +0800 +--- openGauss-server-600-edit/contrib/dblink/CMakeLists.txt 2024-12-13 09:55:28.144744190 +0800 +*************** +*** 0 **** +--- 1,23 ---- ++ #This is the main CMAKE for build all gms_stats. ++ # gms_stats ++ AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR} TGT_dblink_SRC) ++ set(TGT_dblink_INC ++ ${PROJECT_OPENGS_DIR}/contrib/dblink ++ ${PROJECT_OPENGS_DIR}/contrib ++ ) ++ ++ set(dblink_DEF_OPTIONS ${MACRO_OPTIONS}) ++ set(dblink_COMPILE_OPTIONS ${OPTIMIZE_OPTIONS} ${OS_OPTIONS} ${PROTECT_OPTIONS} ${WARNING_OPTIONS} ${LIB_SECURE_OPTIONS} ${CHECK_OPTIONS}) ++ set(dblink_LINK_OPTIONS ${LIB_LINK_OPTIONS}) ++ add_shared_libtarget(dblink TGT_dblink_SRC TGT_dblink_INC "${dblink_DEF_OPTIONS}" "${dblink_COMPILE_OPTIONS}" "${dblink_LINK_OPTIONS}") ++ target_link_libraries(dblink PUBLIC -lodbc) ++ target_link_directories(dblink PUBLIC ${ODBC_HOME}/lib) ++ set_target_properties(dblink PROPERTIES PREFIX "") ++ ++ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/dblink.control ++ DESTINATION share/postgresql/extension/ ++ ) ++ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/dblink--1.0.sql ++ DESTINATION share/postgresql/extension/ ++ ) ++ install(TARGETS dblink DESTINATION lib/postgresql) +\ No newline at end of file +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' plugin_600_2/contrib/dolphin/cmake.sh plugin_600_2_edit/contrib/dolphin/cmake.sh +*** plugin_600_2/contrib/dolphin/cmake.sh 2024-12-13 10:03:21.704744190 +0800 +--- plugin_600_2_edit/contrib/dolphin/cmake.sh 2024-12-13 10:03:06.804744190 +0800 +*************** +*** 1,5 **** + #!/bin/bash +! CMAKE_OPT="-DENABLE_MULTIPLE_NODES=OFF -DENABLE_PRIVATEGAUSS=OFF -DENABLE_THREAD_SAFETY=ON -DENABLE_LITE_MODE=ON" + cpus_num=$(grep -w processor /proc/cpuinfo|wc -l) + rm -f dolphin--4.0.sql + touch dolphin--4.0.sql +--- 1,5 ---- + #!/bin/bash +! CMAKE_OPT="-DENABLE_MULTIPLE_NODES=OFF -DENABLE_PRIVATEGAUSS=OFF -DENABLE_THREAD_SAFETY=ON -DENABLE_LITE_MODE=$1 -DENABLE_MOT=$2 -DENABLE_LLVM_COMPILE=OFF -DENABLE_OBS=OFF -DENABLE_OPENSSL3=ON -DWITH_OPENEULER_OS=ON -DENABLE_OPENEULER_MAJOR=ON" + cpus_num=$(grep -w processor /proc/cpuinfo|wc -l) + rm -f dolphin--4.0.sql + touch dolphin--4.0.sql +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' plugin_600_2/contrib/dolphin/plugin_optimizer/commands/copy.cpp plugin_600_2_edit/contrib/dolphin/plugin_optimizer/commands/copy.cpp +*** plugin_600_2/contrib/dolphin/plugin_optimizer/commands/copy.cpp 2024-12-13 16:32:03.204744190 +0800 +--- plugin_600_2_edit/contrib/dolphin/plugin_optimizer/commands/copy.cpp 2024-12-13 16:32:17.728744190 +0800 +*************** +*** 7089,7094 **** +--- 7089,7095 ---- + if (cstate->mode == MODE_NORMAL) { + if (cstate->filename && is_obs_protocol(cstate->filename)) { + #ifndef ENABLE_LITE_MODE ++ #ifdef ENABLE_OBS + if (getNextOBS(cstate)) { + cstate->eol_type = EOL_UNKNOWN; + goto retry; +*************** +*** 7096,7101 **** +--- 7097,7103 ---- + #else + FEATURE_ON_LITE_MODE_NOT_SUPPORTED(); + #endif ++ #endif + } else { + if (getNextGDS(cstate)) { + if (cstate->eol_type != EOL_UD) +*************** +*** 10060,10065 **** +--- 10062,10068 ---- + case MODE_NORMAL: /* for GDS oriented dist import */ + if (is_obs_protocol(cstate->filename)) { + #ifndef ENABLE_LITE_MODE ++ #ifdef ENABLE_OBS + /* Attache working house routines for OBS oriented dist import */ + func.initBulkLoad = initOBSModeState; + func.endBulkLoad = endOBSModeBulkLoad; +*************** +*** 10069,10074 **** +--- 10072,10078 ---- + #else + FEATURE_ON_LITE_MODE_NOT_SUPPORTED(); + #endif ++ #endif + } else { + /* Attache working house routines for GDS oriented dist import */ + func.initBulkLoad = initNormalModeState; +*************** +*** 10135,10140 **** +--- 10139,10145 ---- + + if (is_obs_protocol(filename)) { + #ifndef ENABLE_LITE_MODE ++ #ifdef ENABLE_OBS + /* Fetch OBS write only table related attribtues */ + getOBSOptions(&cstate->obs_copy_options, options); + +*************** +*** 10154,10159 **** +--- 10159,10165 ---- + #else + FEATURE_ON_LITE_MODE_NOT_SUPPORTED(); + #endif ++ #endif + } else { + initNormalModeState(cstate, filename, tasklist); + } +*************** +*** 10317,10322 **** +--- 10323,10329 ---- + } + } else if (cstate->copy_dest == COPY_OBS) { + #ifndef ENABLE_LITE_MODE ++ #ifdef ENABLE_OBS + if (IS_PGXC_DATANODE) { + if (cstate->outBuffer->len > 0) + RemoteExportFlushData(cstate); +*************** +*** 10327,10332 **** +--- 10334,10340 ---- + #else + FEATURE_ON_LITE_MODE_NOT_SUPPORTED(); + #endif ++ #endif + } else + exportDeinitOutBuffer(cstate); + MemoryContextDelete(cstate->rowcontext); diff --git a/og-edit.patch b/og-edit.patch deleted file mode 100644 index fed5bb24fc6fed991b475be37baed5013e2ce93b..0000000000000000000000000000000000000000 --- a/og-edit.patch +++ /dev/null @@ -1,33 +0,0 @@ -diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' openGauss-server-5.0.1/src/bin/psql/startup.cpp openGauss-server-5.0.1-edit/src/bin/psql/startup.cpp -*** openGauss-server-5.0.1/src/bin/psql/startup.cpp 2024-05-07 20:16:39.232795908 +0800 ---- openGauss-server-5.0.1-edit/src/bin/psql/startup.cpp 2024-05-07 20:17:58.501380445 +0800 -*************** -*** 530,535 **** ---- 530,539 ---- - pset.popt.topt.recordSep.separator_zero = false; - } - -+ if (options.port == NULL) { -+ options.port = GetEnvStr("PORT"); -+ } -+ - if (options.username == NULL) - password_prompt = pg_strdup(_("Password: ")); - else { -diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' openGauss-server-5.0.1/src/gausskernel/dbmind/db4ai/executor/Makefile openGauss-server-5.0.1-edit/src/gausskernel/dbmind/db4ai/executor/Makefile -*** openGauss-server-5.0.1/src/gausskernel/dbmind/db4ai/executor/Makefile 2024-05-07 20:16:39.632798858 +0800 ---- openGauss-server-5.0.1-edit/src/gausskernel/dbmind/db4ai/executor/Makefile 2024-05-07 20:17:58.897383365 +0800 -*************** -*** 11,21 **** - - include $(top_builddir)/src/Makefile.global - -- PLATFORM_ARCH = $(shell uname -p) -- ifeq ($(PLATFORM_ARCH),x86_64) -- override CPPFLAGS += -mavx -- endif -- - ifneq "$(MAKECMDGOALS)" "clean" - ifneq "$(MAKECMDGOALS)" "distclean" - ifneq "$(shell which g++ |grep hutaf_llt |wc -l)" "1" ---- 11,16 ---- diff --git a/og-openssl3-adptor.patch b/og-openssl3-adptor.patch new file mode 100644 index 0000000000000000000000000000000000000000..c450587a40768d3c088d4a0455da62364c074094 --- /dev/null +++ b/og-openssl3-adptor.patch @@ -0,0 +1,111 @@ +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' opengauss_server_600/src/common/interfaces/libpq/fe-secure.cpp opengauss_server_600_edit/src/common/interfaces/libpq/fe-secure.cpp +*** opengauss_server_600/src/common/interfaces/libpq/fe-secure.cpp 2024-11-19 20:01:27.697621300 +0800 +--- opengauss_server_600_edit/src/common/interfaces/libpq/fe-secure.cpp 2024-11-19 20:04:07.461621300 +0800 +*************** +*** 446,451 **** +--- 446,454 ---- + libpq_gettext("SSL error: %s, remote datanode %s, error: %s\n"), + errm, conn->remote_nodename, strerror(errno)); + SSLerrfree(errm); ++ #ifdef ENABLE_OPENSSL3 ++ REMEMBER_EPIPE(spinfo, errno == EPIPE); ++ #endif + /* assume the connection is broken */ + result_errno = ECONNRESET; + n = -1; +*************** +*** 596,601 **** +--- 599,607 ---- + libpq_gettext("SSL error: %s, remote datanode %s, error: %s\n"), errm, + conn->remote_nodename, strerror(errno)); + SSLerrfree(errm); ++ #ifdef ENABLE_OPENSSL3 ++ REMEMBER_EPIPE(spinfo, errno == EPIPE); ++ #endif + /* assume the connection is broken */ + result_errno = ECONNRESET; + n = -1; +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' opengauss_server_600/src/gausskernel/security/keymgr/encrypt/security_aead_aes_hmac_enc_key.cpp opengauss_server_600_edit/src/gausskernel/security/keymgr/encrypt/security_aead_aes_hmac_enc_key.cpp +*** opengauss_server_600/src/gausskernel/security/keymgr/encrypt/security_aead_aes_hmac_enc_key.cpp 2024-11-19 20:01:27.705621300 +0800 +--- opengauss_server_600_edit/src/gausskernel/security/keymgr/encrypt/security_aead_aes_hmac_enc_key.cpp 2024-11-19 20:04:07.773621300 +0800 +*************** +*** 47,52 **** +--- 47,62 ---- + + const int RAND_COUNT = 100; + ++ #ifdef ENABLE_OPENSSL3 ++ void HmacCtxGroup::free_hmac_ctx(HMAC_CTX** ctx_tmp) const ++ { ++ if (*ctx_tmp != NULL) { ++ HMAC_CTX_free(*ctx_tmp); ++ *ctx_tmp = NULL; ++ } ++ } ++ #endif ++ + /* Derives all the required keys from the given root key */ + AeadAesHamcEncKey::AeadAesHamcEncKey(unsigned char *root_key, size_t root_key_size) + { +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' opengauss_server_600/src/gausskernel/security/keymgr/encrypt/security_sm2_enc_key.cpp opengauss_server_600_edit/src/gausskernel/security/keymgr/encrypt/security_sm2_enc_key.cpp +*** opengauss_server_600/src/gausskernel/security/keymgr/encrypt/security_sm2_enc_key.cpp 2024-11-19 20:01:27.705621300 +0800 +--- opengauss_server_600_edit/src/gausskernel/security/keymgr/encrypt/security_sm2_enc_key.cpp 2024-11-19 20:04:07.773621300 +0800 +*************** +*** 163,174 **** +--- 163,176 ---- + return CMKEM_EVP_ERR; + } + ++ #ifndef ENABLE_OPENSSL3 + ret = EVP_PKEY_set_alias_type(public_evp_key, EVP_PKEY_SM2); + if (ret != 1) { + cmkem_errmsg("EVP_PKEY_set_alias_type to EVP_PKEY_SM2 failed!"); + EVP_PKEY_free(public_evp_key); + return CMKEM_EVP_ERR; + } ++ #endif + + /* do cipher. */ + ctx = EVP_PKEY_CTX_new(public_evp_key, NULL); +*************** +*** 253,264 **** +--- 255,268 ---- + return CMKEM_EVP_ERR; + } + ++ #ifndef ENABLE_OPENSSL3 + ret = EVP_PKEY_set_alias_type(private_evp_key, EVP_PKEY_SM2); + if (ret != 1) { + cmkem_errmsg("EVP_PKEY_set_alias_type to EVP_PKEY_SM2 failed!"); + EVP_PKEY_free(private_evp_key); + return CMKEM_EVP_ERR; + } ++ #endif + + /* do cipher. */ + ctx = EVP_PKEY_CTX_new(private_evp_key, NULL); +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' opengauss_server_600/src/include/keymgr/encrypt/security_aead_aes_hamc_enc_key.h opengauss_server_600_edit/src/include/keymgr/encrypt/security_aead_aes_hamc_enc_key.h +*** opengauss_server_600/src/include/keymgr/encrypt/security_aead_aes_hamc_enc_key.h 2024-11-19 20:01:27.721621300 +0800 +--- opengauss_server_600_edit/src/include/keymgr/encrypt/security_aead_aes_hamc_enc_key.h 2024-11-19 20:04:08.037621300 +0800 +*************** +*** 49,54 **** +--- 49,57 ---- + HMAC_CTX* ctx_worker; + HMAC_CTX* ctx_template; + private: ++ #ifdef ENABLE_OPENSSL3 ++ void free_hmac_ctx(HMAC_CTX** ctx_tmp) const; ++ #else + void free_hmac_ctx(HMAC_CTX** ctx_tmp) + { + if (*ctx_tmp != NULL) { +*************** +*** 56,61 **** +--- 59,65 ---- + *ctx_tmp = NULL; + } + } ++ #endif + }; + + /* diff --git a/og-riscv64-support.patch b/og-riscv64-support.patch new file mode 100644 index 0000000000000000000000000000000000000000..06449812744463022db1061ec83c572b650cab05 --- /dev/null +++ b/og-riscv64-support.patch @@ -0,0 +1,81 @@ +From bd23d5c22df1b5174c073c933d40c1a17204f2a2 Mon Sep 17 00:00:00 2001 +From: huangji +Date: Tue, 5 Nov 2024 09:40:31 +0000 +Subject: [PATCH 4/4] add riscv64 support + +Signed-off-by: huangji +--- + config/config.guess | 3 +++ + configure | 2 ++ + src/common/port/CMakeLists.txt | 8 ++++++++ + src/include/storage/lock/s_lock.h | 2 +- + 4 files changed, 14 insertions(+), 1 deletion(-) + +diff --git a/config/config.guess b/config/config.guess +index 15f22ac..71c5ca3 100644 +--- a/config/config.guess ++++ b/config/config.guess +@@ -963,6 +963,9 @@ EOF + loongarch*:Linux:*:*) + echo "$UNAME_MACHINE"-linux-"$LIBC" + exit ;; ++ riscv32:Linux:*:* | riscv64:Linux:*:*) ++ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" ++ exit ;; + mips:Linux:*:* | mips64:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c +diff --git a/configure b/configure +index d4f0bf5..c600ba8 100755 +--- a/configure ++++ b/configure +@@ -29069,6 +29069,8 @@ if [ "$PLATFORM_ARCH"X == "aarch64"X ] ; then + else + CFLAGS="-march=armv8-a+crc $CFLAGS" + fi ++elif [ "$PLATFORM_ARCH"X == "riscv64"X ] ; then ++ CFLAGS="-march=rv64g $CFLAGS" + elif [ "$PLATFORM_ARCH"X == "x86_64"X ] ; then + CFLAGS="-mcx16 $CFLAGS_SSE42 $CFLAGS" + else +diff --git a/src/common/port/CMakeLists.txt b/src/common/port/CMakeLists.txt +index b9a6a28..e511eb0 100755 +--- a/src/common/port/CMakeLists.txt ++++ b/src/common/port/CMakeLists.txt +@@ -94,6 +94,10 @@ if("${BUILD_TUPLE}" STREQUAL "loongarch64") + list(REMOVE_ITEM TGT_port_SRC ${CMAKE_CURRENT_SOURCE_DIR}/pg_crc32c_choose.cpp ${CMAKE_CURRENT_SOURCE_DIR}/pg_crc32c_sse42.cpp) + endif() + ++if("${BUILD_TUPLE}" STREQUAL "riscv64") ++ list(REMOVE_ITEM TGT_port_SRC ${CMAKE_CURRENT_SOURCE_DIR}/pg_crc32c_choose.cpp ${CMAKE_CURRENT_SOURCE_DIR}/pg_crc32c_sse42.cpp) ++endif() ++ + SET(TGT_pgport_INC + ${PROJECT_SRC_DIR}/common/backend + ${PROJECT_SRC_DIR}/common/port +@@ -167,6 +171,10 @@ if("${BUILD_TUPLE}" STREQUAL "loongarch64") + list(REMOVE_ITEM TGT_pgport_srv_SRC ${CMAKE_CURRENT_SOURCE_DIR}/port_srv/pg_crc32c_choose.cpp ${CMAKE_CURRENT_SOURCE_DIR}/port_srv/pg_crc32c_sse42.cpp) + endif() + ++if("${BUILD_TUPLE}" STREQUAL "riscv64") ++ list(REMOVE_ITEM TGT_pgport_srv_SRC ${CMAKE_CURRENT_SOURCE_DIR}/port_srv/pg_crc32c_choose.cpp ${CMAKE_CURRENT_SOURCE_DIR}/port_srv/pg_crc32c_sse42.cpp) ++endif() ++ + SET(TGT_pgport_srv_INC + ${PROJECT_SRC_DIR}/common/backend + ${PROJECT_SRC_DIR}/common/port +diff --git a/src/include/storage/lock/s_lock.h b/src/include/storage/lock/s_lock.h +index 715d84a..bf7b041 100644 +--- a/src/include/storage/lock/s_lock.h ++++ b/src/include/storage/lock/s_lock.h +@@ -283,7 +283,7 @@ static __inline__ int tas(volatile slock_t* lock) + * the int-width variant of the builtin works on more chips than other widths. + */ + +-#if defined(__aarch64__) || defined(__aarch64) ++#if defined(__aarch64__) || defined(__aarch64) || defined(__riscv) + + #ifdef ENABLE_THREAD_CHECK + extern "C" { +-- +2.33.0 diff --git a/og-security.patch b/og-security.patch new file mode 100644 index 0000000000000000000000000000000000000000..41af71005a7c42941d7a21979b36b0447bb12922 --- /dev/null +++ b/og-security.patch @@ -0,0 +1,64 @@ +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' opengauss_server_600/src/bin/gs_persist/CMakeLists.txt opengauss_server_600_edit/src/bin/gs_persist/CMakeLists.txt +*** opengauss_server_600/src/bin/gs_persist/CMakeLists.txt 2024-11-19 20:01:27.693621300 +0800 +--- opengauss_server_600_edit/src/bin/gs_persist/CMakeLists.txt 2024-11-19 20:04:07.089621300 +0800 +*************** +*** 13,19 **** + set(gssgpersist_DEF_OPTIONS ${MACRO_OPTIONS}) + set(gssgpersist_COMPILE_OPTIONS ${OPTIMIZE_OPTIONS} ${OS_OPTIONS} ${PROTECT_OPTIONS} ${WARNING_OPTIONS} ${BIN_SECURE_OPTIONS} ${CHECK_OPTIONS}) + set(gssgpersist_LINK_OPTIONS ${BIN_LINK_OPTIONS}) +! set(gssgpersist_LINK_LIBS -lsecurec -ldl -lrt) + + if("${ENABLE_UT}" STREQUAL "ON") + add_shared_libtarget(ut_gs_persist_lib tgt_gssgpersist_SRC tgt_gssgpersist_INC "${gssgpersist_DEF_OPTIONS}" "${gssgpersist_COMPILE_OPTIONS}" "${gssgpersist_LINK_OPTIONS}") +--- 13,19 ---- + set(gssgpersist_DEF_OPTIONS ${MACRO_OPTIONS}) + set(gssgpersist_COMPILE_OPTIONS ${OPTIMIZE_OPTIONS} ${OS_OPTIONS} ${PROTECT_OPTIONS} ${WARNING_OPTIONS} ${BIN_SECURE_OPTIONS} ${CHECK_OPTIONS}) + set(gssgpersist_LINK_OPTIONS ${BIN_LINK_OPTIONS}) +! set(gssgpersist_LINK_LIBS -l${SECURE_C_CHECK} -ldl -lrt) + + if("${ENABLE_UT}" STREQUAL "ON") + add_shared_libtarget(ut_gs_persist_lib tgt_gssgpersist_SRC tgt_gssgpersist_INC "${gssgpersist_DEF_OPTIONS}" "${gssgpersist_COMPILE_OPTIONS}" "${gssgpersist_LINK_OPTIONS}") +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' opengauss_server_600/src/common/interfaces/libpq/CMakeLists.txt opengauss_server_600_edit/src/common/interfaces/libpq/CMakeLists.txt +*** opengauss_server_600/src/common/interfaces/libpq/CMakeLists.txt 2024-11-19 20:01:27.697621300 +0800 +--- opengauss_server_600_edit/src/common/interfaces/libpq/CMakeLists.txt 2024-11-19 20:04:07.441621300 +0800 +*************** +*** 118,126 **** + set(pq_LINK_OPTIONS ${LIB_LINK_OPTIONS}) + add_shared_libtarget(pq TGT_pq_SRC TGT_pq_INC "${pq_DEF_OPTIONS}" "${pq_COMPILE_OPTIONS}" "${pq_LINK_OPTIONS}") + if(NOT "${ENABLE_LITE_MODE}" STREQUAL "ON") +! target_link_libraries(pq PRIVATE com_err_gauss crypto gssapi_krb5_gauss gssrpc_gauss k5crypto_gauss krb5_gauss krb5support_gauss securec ssl) + else() +! target_link_libraries(pq PRIVATE crypto securec ssl) + endif() + target_link_directories(pq PUBLIC + ${LIBOPENSSL_LIB_PATH} ${KERBEROS_LIB_PATH} ${SECURE_LIB_PATH} +--- 118,126 ---- + set(pq_LINK_OPTIONS ${LIB_LINK_OPTIONS}) + add_shared_libtarget(pq TGT_pq_SRC TGT_pq_INC "${pq_DEF_OPTIONS}" "${pq_COMPILE_OPTIONS}" "${pq_LINK_OPTIONS}") + if(NOT "${ENABLE_LITE_MODE}" STREQUAL "ON") +! target_link_libraries(pq PRIVATE com_err_gauss crypto gssapi_krb5_gauss gssrpc_gauss k5crypto_gauss krb5_gauss krb5support_gauss ${SECURE_C_CHECK} ssl) + else() +! target_link_libraries(pq PRIVATE crypto ${SECURE_C_CHECK} ssl) + endif() + target_link_directories(pq PUBLIC + ${LIBOPENSSL_LIB_PATH} ${KERBEROS_LIB_PATH} ${SECURE_LIB_PATH} +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' opengauss_server_600/src/gausskernel/security/keymgr/CMakeLists.txt opengauss_server_600_edit/src/gausskernel/security/keymgr/CMakeLists.txt +*** opengauss_server_600/src/gausskernel/security/keymgr/CMakeLists.txt 2024-11-19 20:01:27.705621300 +0800 +--- opengauss_server_600_edit/src/gausskernel/security/keymgr/CMakeLists.txt 2024-11-19 20:04:07.773621300 +0800 +*************** +*** 64,70 **** + if("${ENABLE_KT}" STREQUAL "ON") + add_dependencies(keymgr gs_ktool) + endif() +! set(libkey_LINKS -lcjson -lcurl -lsecurec -lssl -lcrypto -ldl -lrt) + if("${ENABLE_KT}" STREQUAL "ON") + list(APPEND libkey_LINKS -lgs_ktool -lkmc) + endif() +--- 64,70 ---- + if("${ENABLE_KT}" STREQUAL "ON") + add_dependencies(keymgr gs_ktool) + endif() +! set(libkey_LINKS -lcjson -lcurl -l${SECURE_C_CHECK} -lssl -lcrypto -ldl -lrt) + if("${ENABLE_KT}" STREQUAL "ON") + list(APPEND libkey_LINKS -lgs_ktool -lkmc) + endif() diff --git a/og-syntax.patch b/og-syntax.patch new file mode 100644 index 0000000000000000000000000000000000000000..40cd773106b418b0998722bfb9eaf8e8977f184d --- /dev/null +++ b/og-syntax.patch @@ -0,0 +1,93 @@ +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' opengauss_server_600/src/bin/pg_basebackup/pg_basebackup.cpp opengauss_server_600_edit/src/bin/pg_basebackup/pg_basebackup.cpp +*** opengauss_server_600/src/bin/pg_basebackup/pg_basebackup.cpp 2024-11-19 20:01:27.697621300 +0800 +--- opengauss_server_600_edit/src/bin/pg_basebackup/pg_basebackup.cpp 2024-11-19 20:04:07.105621300 +0800 +*************** +*** 1689,1695 **** + struct dirent* ent; + while (1) { + ent = readdir(dir); +! if (ent <= 0) { + break; + } + if ((strcmp(".", ent->d_name) == 0) || (strcmp("..", ent->d_name) == 0)) { +--- 1689,1695 ---- + struct dirent* ent; + while (1) { + ent = readdir(dir); +! if (ent == NULL) { + break; + } + if ((strcmp(".", ent->d_name) == 0) || (strcmp("..", ent->d_name) == 0)) { +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' opengauss_server_600/src/bin/pg_ctl/backup.cpp opengauss_server_600_edit/src/bin/pg_ctl/backup.cpp +*** opengauss_server_600/src/bin/pg_ctl/backup.cpp 2024-11-19 20:01:27.697621300 +0800 +--- opengauss_server_600_edit/src/bin/pg_ctl/backup.cpp 2024-11-19 20:04:07.109621300 +0800 +*************** +*** 1985,1991 **** + } + while (1) { + de = readdir(dir); +! if (de <= 0) { + break; + } + if (strcmp(de->d_name, ".") == 0 || strcmp(de->d_name, "..") == 0) { +--- 1985,1991 ---- + } + while (1) { + de = readdir(dir); +! if (de == NULL) { + break; + } + if (strcmp(de->d_name, ".") == 0 || strcmp(de->d_name, "..") == 0) { +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' opengauss_server_600/src/gausskernel/runtime/opfusion/opfusion_util.cpp opengauss_server_600_edit/src/gausskernel/runtime/opfusion/opfusion_util.cpp +*** opengauss_server_600/src/gausskernel/runtime/opfusion/opfusion_util.cpp 2024-11-19 20:01:27.705621300 +0800 +--- opengauss_server_600_edit/src/gausskernel/runtime/opfusion/opfusion_util.cpp 2024-11-19 20:04:07.757621300 +0800 +*************** +*** 446,452 **** + + /* check whether to have order by */ + if (node->aggstrategy != AGG_PLAIN || +! node->groupingSets > 0) { + return NOBYPASS_NOT_PLAIN_AGG; + } + +--- 446,452 ---- + + /* check whether to have order by */ + if (node->aggstrategy != AGG_PLAIN || +! node->groupingSets != NULL) { + return NOBYPASS_NOT_PLAIN_AGG; + } + +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' opengauss_server_600/src/include/gs_policy/policy_common.h opengauss_server_600_edit/src/include/gs_policy/policy_common.h +*** opengauss_server_600/src/include/gs_policy/policy_common.h 2024-11-19 20:01:27.721621300 +0800 +--- opengauss_server_600_edit/src/include/gs_policy/policy_common.h 2024-11-19 20:04:08.029621300 +0800 +*************** +*** 30,35 **** +--- 30,37 ---- + #include "gs_map.h" + #include "gs_vector.h" + #include "pgaudit.h" ++ #include ++ #include + + struct GsPolicyFQDN { + GsPolicyFQDN():m_value_schema(0), m_value_object(0), is_function(false){} +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' openGauss-server-600/src/gausskernel/storage/access/nbtree/nbtree.cpp openGauss-server-600-edit/src/gausskernel/storage/access/nbtree/nbtree.cpp +*** openGauss-server-600/src/gausskernel/storage/access/nbtree/nbtree.cpp 2024-12-12 11:20:52.332744190 +0800 +--- openGauss-server-600-edit/src/gausskernel/storage/access/nbtree/nbtree.cpp 2024-12-12 11:20:18.144744190 +0800 +*************** +*** 1108,1114 **** + * that. + */ + Assert(num_dead_heap_tids >= Max(num_deletable, 1)); +! Assert(num_deletable > 0 || updatable > 0); + _bt_delitems_vacuum(rel, buf, deletable, num_deletable, updatable, num_updatable, + vstate->lastBlockVacuumed); + +--- 1108,1114 ---- + * that. + */ + Assert(num_dead_heap_tids >= Max(num_deletable, 1)); +! Assert(num_deletable != NULL || updatable != NULL); + _bt_delitems_vacuum(rel, buf, deletable, num_deletable, updatable, num_updatable, + vstate->lastBlockVacuumed); diff --git a/openGauss-server-5.0.1.tar.gz b/openGauss-server-5.0.1.tar.gz deleted file mode 100644 index f9d4da41ad685ee482e3d9209e01b075913a43c0..0000000000000000000000000000000000000000 Binary files a/openGauss-server-5.0.1.tar.gz and /dev/null differ diff --git a/openGauss-server-6.0.0.tar.gz b/openGauss-server-6.0.0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..18d0cb0938ca142921b426caa75def90e457c2ac --- /dev/null +++ b/openGauss-server-6.0.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0dd3f78f9b324e7ba31ae457824760347f380e8693e4f56d9392db199886ae06 +size 92324495 diff --git a/opengauss-bashprofile b/opengauss-bashprofile index 012b243208feb7e79b17eb802ed10e14c94a6647..595b7cb452557774cc85d612bfc3931a17497d77 100644 --- a/opengauss-bashprofile +++ b/opengauss-bashprofile @@ -1,5 +1,6 @@ export GAUSSHOME=/usr/local/opengauss -export LD_LIBRARY_PATH=/usr/local/opengauss/lib:$LD_LIBRARY_PATH -export PATH=/usr/local/opengauss/bin:$PATH +export LD_LIBRARY_PATH=${GAUSSHOME}/lib:$LD_LIBRARY_PATH +export PATH=${GAUSSHOME}/bin:$PATH export PGDATA=/var/lib/opengauss/data -export PORT=7654 +export PGPORT=7654 +export PGDATABASE=postgres diff --git a/opengauss-server.spec b/opengauss-server.spec index 0cfca1f0db5513fa70ef65928140b748f079158e..d5d25aa6a247060d7309956c5e89468a567236c3 100644 --- a/opengauss-server.spec +++ b/opengauss-server.spec @@ -1,5 +1,7 @@ %define zlib_name zlib %define zlib_version 1.2.12 +%define krb5_name krb5 +%define krb5_version 1.18.3-final %define xgboost_name xgboost %define xgboost_version v1.4.1 %define dmlc_name dmlc-core @@ -7,54 +9,63 @@ %define port 7654 %define datapath /var/lib/opengauss %define apppath %{_prefix}/local/opengauss -%define tmppath /var/lib/opengauss/pkg_5.0.1 +%define tmppath /var/lib/opengauss/pkg_6.0.0 Name: opengauss -Version: 5.0.1 -Release: 15 +Version: 6.0.0 +Release: 22 Summary: openGauss is an open source relational database management system License: MulanPSL-2.0 and MIT and BSD and zlib and TCL and Apache-2.0 and BSL-1.0 URL: https://gitee.com/opengauss/openGauss-server Source0: openGauss-server-%{version}.tar.gz -Source2: %{zlib_name}-%{zlib_version}.tar.gz +Source1: %{zlib_name}-%{zlib_version}.tar.gz +Source2: %{krb5_name}-%{krb5_version}.tar.gz Source3: %{dmlc_name}-%{dmlc_version}.tar.gz Source4: %{xgboost_name}-%{xgboost_version}.tar.gz -Source5: opengauss-bashprofile -Source6: opengauss.service -Source7: autostart.sh -Source8: version.cfg -Source9: opengauss_upgrade_start.sh -Source10: opengauss_upgrade_common.sh -Source11: opengauss_upgrade_config.sh -Source12: opengauss_upgrade_errorcode.sh - -Patch0: og-edit.patch -Patch1: cmake_compile.patch -Patch2: compile_2309.patch -Patch3: openssl3-adptor.patch -Patch4: upgrade.patch -Patch20: zlib.patch -Patch21: zlib-CVE-2022-37434.patch + +Source20: opengauss-bashprofile +Source21: opengauss.service +Source22: autostart.sh +Source23: version.cfg +Source24: opengauss_upgrade_start.sh +Source25: opengauss_upgrade_common.sh +Source26: opengauss_upgrade_config.sh +Source27: opengauss_upgrade_errorcode.sh +Source28: upgrade.sh +Source29: krb-configure + +Patch0: og-cmake.patch +Patch1: og-delete-obs.patch +Patch2: og-openssl3-adptor.patch +Patch3: og-security.patch +Patch4: og-syntax.patch +Patch5: og-riscv64-support.patch +Patch6: og-dolphin.patch +Patch11: zlib.patch +Patch12: zlib-CVE-2022-37434.patch +Patch21: krb5-backport-Add-a-simple-DER-support-header.patch +Patch22: krb5-backport-CVE-2024-37370-CVE-2024-37371-Fix-vulnerabilities-in-GSS-message-token-handling.patch +Patch23: krb5-cve-2022-42898.patch +Patch24: krb5-CVE-2023-36054.patch +Patch25: krb5.patch BuildRequires: cmake gcc gcc-c++ openssl-devel python tar -BuildRequires: cjson lz4-devel zstd-devel boost-devel cjson-devel -BuildRequires: libcgroup-devel libcurl-devel unixODBC-devel jemalloc-devel krb5-devel +BuildRequires: lz4-devel zstd-devel boost-devel cjson-devel +BuildRequires: libcgroup-devel libcurl-devel unixODBC-devel jemalloc-devel BuildRequires: java-1.8.0-openjdk-devel libedit-devel libaio-devel -BuildRequires: bison flex, DCF >= 5 -BuildRequires: numactl-devel -%ifarch sw_64 -BuildRequires: libatomic -%endif +BuildRequires: bison flex, DCF >= 6 +BuildRequires: numactl-devel libxml2-devel xerces-c-devel pkgconfig(aws-cpp-sdk-core) +BuildRequires: libatomic autoconf -%global _privatelibs lib(cjson|ecpg|z|pg|pq)\\.so* +%global _privatelibs lib(krb5_gauss|ecpg|z|pg|pq)\\.so* %global __provides_exclude %{_privatelibs} %global __requires_exclude %{_privatelibs} Requires: lz4-devel zstd-devel boost-devel cjson-devel tar Requires: libcgroup-devel libcurl-devel unixODBC-devel jemalloc-devel Requires: java-1.8.0-openjdk-devel libedit-devel libaio-devel -Requires: DCF >= 5, lsof -Requires: numactl-devel +Requires: DCF >= 6, lsof +Requires: numactl-devel libxml2-devel xerces-c-devel pkgconfig(aws-cpp-sdk-core) %description openGauss kernel : openGauss is an open source relational database management system. @@ -63,28 +74,54 @@ openGauss kernel : openGauss is an open source relational database management sy %prep %setup -q -c -n %{name}-%{version} +%setup -q -D -T -a 1 %setup -q -D -T -a 2 %setup -q -D -T -a 3 %setup -q -D -T -a 4 pushd openGauss-server-%{version} - - -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 +%patch -P0 -p1 +%patch -P1 -p1 +%patch -P2 -p1 +%patch -P3 -p1 +%patch -P4 -p1 +%patch -P5 -p1 +%patch -P6 -p1 popd pushd %{zlib_name}-%{zlib_version} -%patch20 -p1 -%patch21 -p1 +%patch -P11 -p1 +%patch -P12 -p1 +popd + +pushd %{krb5_name}-%{krb5_name}-%{krb5_version} +%patch -P21 -p1 +%patch -P22 -p1 +%patch -P23 -p1 +%patch -P24 -p1 +%patch -P25 -p1 popd %build build_target=$(pwd)/binarylibs/kernel/dependency +########### build krb5 ########### +pushd %{krb5_name}-%{krb5_name}-%{krb5_version} +krb5_dir=${build_target}/kerberos/comm + +cd src +rm -rf configure; cp %{SOURCE29} ./configure +autoheader; chmod +x configure; sed -i 's/lcom_err/lcom_err_gauss/g' configure +./configure --prefix=${krb5_dir} LDFLAGS='-Wl,-z,relro,-z,now' CFLAGS='-fstack-protector-strong -fPIC' --disable-rpath --disable-pkinit --with-system-verto=no + +make -s %{?_smp_mflags} +make install -s %{?_smp_mflags} + +rm -rf ${krb5_dir}/lib/pkgconfig +rm -rf ${krb5_dir}/share +rm -rf ${krb5_dir}/var +popd + ########### build zlib ########### pushd %{zlib_name}-%{zlib_version} zlib_dir=${build_target}/zlib1.2.11/comm @@ -95,6 +132,9 @@ CONFIGURE_EXTRA_FLAG="--64" %ifarch sw_64 CONFIGURE_EXTRA_FLAG="" %endif +%ifarch riscv64 + CONFIGURE_EXTRA_FLAG="" +%endif ./configure ${CONFIGURE_EXTRA_FLAG} --prefix=${zlib_dir} sed -i '21a CFLAGS += -fPIC' Makefile MAKE_EXTRA_FLAG="-m64" @@ -104,6 +144,9 @@ MAKE_EXTRA_FLAG="-m64" %ifarch sw_64 MAKE_EXTRA_FLAG="" %endif +%ifarch riscv64 + MAKE_EXTRA_FLAG="" +%endif make CFLAGS="-fPIE -fPIC" SFLAGS="-O2 -fPIC -fstack-protector-strong -Wl,-z,noexecstack -Wl,-z,relro,-z,now ${MAKE_EXTRA_FLAG} -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN" %{?_smp_mflags} make install cd contrib/minizip/ @@ -136,18 +179,24 @@ cp -r ${xgboost_dir} ${build_target}/xgboost/llt popd ########### build opengauss ########### +%ifarch riscv64 +CMAKE_EXTRA_FLAG="-DENABLE_BBOX=OFF" +rm -rf openGauss-server-%{version}/contrib/dolphin +%endif pushd openGauss-server-%{version} opengauss_source_dir=$(pwd) -export ENABLE_LITE_MODE=ON +export BUILD_TUPLE=$(uname -m) export DEBUG_TYPE=release export THIRD_BIN_PATH=${build_target}/../../../binarylibs export LD_LIBRARY_PATH=$THIRD_BIN_PATH/kernel/dependency/zlib1.2.11/comm/lib:$LD_LIBRARY_PATH +export LD_LIBRARY_PATH=$THIRD_BIN_PATH/kernel/dependency/kerberos/comm/lib:$LD_LIBRARY_PATH export LD_LIBRARY_PATH=$THIRD_BIN_PATH/kernel/dependency/xgboost/comm/lib:$LD_LIBRARY_PATH export PREFIX_HOME=${opengauss_source_dir}/mppdb_temp_install mkdir -p tmp_build cd tmp_build -cmake .. -DENABLE_MULTIPLE_NODES=OFF -DENABLE_PRIVATEGAUSS=OFF -DENABLE_THREAD_SAFETY=ON -DENABLE_LITE_MODE=ON -DENABLE_OPENEULER_MAJOR=ON -DWITH_OPENEULER_OS=ON +cmake .. -DENABLE_MULTIPLE_NODES=OFF -DENABLE_THREAD_SAFETY=ON -DWITH_OPENEULER_OS=ON -DENABLE_OPENEULER_MAJOR=ON \ + -DENABLE_LLVM_COMPILE=OFF -DENABLE_OBS=OFF -DENABLE_OPENSSL3=ON ${CMAKE_EXTRA_FLAG} make %{?_smp_mflags} make install @@ -161,35 +210,41 @@ mkdir -p %{buildroot}%{tmppath}/script # separate_debug_symbol.sh dir cd ${opengauss_source_dir}/build/script chmod +x ./separate_debug_information.sh +sed -i '/"$BIN_DIR\/gaussdb\.map"/d' ./separate_debug_information.sh ./separate_debug_information.sh rm -rf ${opengauss_source_dir}/mppdb_temp_install/packages rm -rf ${opengauss_source_dir}/mppdb_temp_install/symbols -function get_os_kernel() { - kernel="" - if [[ -f "/etc/euleros-release" ]]; then - kernel=$(cat /etc/euleros-release | awk -F ' ' '{print $1}' | tr a-z A-Z) - if [[ "${kernel}" = "Euleros" ]]; then - kernel="Euler" - fi - elif [[ -f "/etc/openEuler-release" ]]; then - kernel=$(cat /etc/openEuler-release | awk -F ' ' '{print $1}') - elif [[ -f "/etc/centos-release" ]]; then - kernel=$(cat /etc/centos-release | awk -F ' ' '{print $1}') - else - kernel=$(lsb_release -d | awk -F ' ' '{print $2}') - fi -} -get_os_kernel -platform_arch=$(uname -p) +# package +os_name=$(cat /etc/os-release | grep -w NAME | awk -F '"' '{print $2}') +if [[ -f "/etc/openEuler-release" ]]; then + os_name="openEuler" +elif [[ -f "/etc/euleros-release" ]]; then + os_name="EulerOS" +elif [[ -f "/etc/centos-release" ]]; then + os_name="CentOS" +elif [[ -f "/etc/FusionOS-release" ]]; then + os_name="FusionOS" +elif [[ -f "/etc/kylin-release" ]]; then + os_name="Kylin" +elif [[ -f "/etc/asianux-release" ]]; then + os_name="Asianux" +elif [[ -f "/etc/CSIOS-release" ]]; then + os_name="CSIOS" +else + os_name=$(lsb_release -d | awk -F ' ' '{print $2}'| tr A-Z a-z | sed 's/.*/\L&/; s/[a-z]*/\u&/g') +fi + +os_version=$(cat /etc/os-release | grep -w VERSION_ID | awk -F '"' '{print $2}') + +platform_arch=$(uname -m) +kernel_package_name=openGauss-Server-%{version}-${os_name}-${os_version}-${platform_arch} cd ${opengauss_source_dir}/mppdb_temp_install -tar -zcf openGauss-Lite-%{version}-${kernel}-${platform_arch}.bin * -sha256sum openGauss-Lite-%{version}-${kernel}-${platform_arch}.bin | awk '{print $1}' > openGauss-Lite-%{version}-${kernel}-${platform_arch}.sha256 +tar -zcf ${kernel_package_name}.tar.bz2 * +sha256sum ${kernel_package_name}.tar.bz2 | awk '{print $1}' > ${kernel_package_name}.sha256 # copy binarylibs packages to %{tmppath} cp -r ${opengauss_source_dir}/mppdb_temp_install/* %{buildroot}%{tmppath} -sed -i "/wal_insert_status_entries/d" ${opengauss_source_dir}/build/script/opengauss_config_file_mini -cp ${opengauss_source_dir}/build/script/opengauss_config_file_mini %{buildroot}%{tmppath}/share/postgresql/ # make package upgrade sql cd ${opengauss_source_dir}/tmp_build @@ -204,80 +259,68 @@ fi cp -r upgrade_sql.tar.gz %{buildroot}%{tmppath} cp -r upgrade_sql.sha256 %{buildroot}%{tmppath} -popd - # opengauss datanode dir. install -d -m 700 $RPM_BUILD_ROOT%{?_localstatedir}/lib/opengauss/data # opengauss .bash_profile -install -m 644 %{SOURCE5} $RPM_BUILD_ROOT%{?_localstatedir}/lib/opengauss/.bash_profile +install -m 644 %{SOURCE20} $RPM_BUILD_ROOT%{?_localstatedir}/lib/opengauss/.bash_profile # auto start files -install -m 644 %{SOURCE6} %{buildroot}%{tmppath}/script/opengauss.service -install -m 700 %{SOURCE7} %{buildroot}%{tmppath}/script/autostart.sh +install -m 644 %{SOURCE21} %{buildroot}%{tmppath}/script/opengauss.service +install -m 644 %{SOURCE22} %{buildroot}%{tmppath}/script/autostart.sh # upgrade script -install -m 644 %{SOURCE8} %{buildroot}%{tmppath}/version.cfg -install -m 644 %{SOURCE9} %{buildroot}%{tmppath}/opengauss_upgrade_start.sh -install -m 644 %{SOURCE10} %{buildroot}%{tmppath}/opengauss_upgrade_common.sh -install -m 644 %{SOURCE11} %{buildroot}%{tmppath}/opengauss_upgrade_config.sh -install -m 644 %{SOURCE12} %{buildroot}%{tmppath}/opengauss_upgrade_errorcode.sh +install -m 644 %{SOURCE23} %{buildroot}%{tmppath}/version.cfg +install -m 644 %{SOURCE24} %{buildroot}%{tmppath}/opengauss_upgrade_start.sh +install -m 644 %{SOURCE25} %{buildroot}%{tmppath}/opengauss_upgrade_common.sh +install -m 644 %{SOURCE26} %{buildroot}%{tmppath}/opengauss_upgrade_config.sh +install -m 644 %{SOURCE27} %{buildroot}%{tmppath}/opengauss_upgrade_errorcode.sh +install -m 644 %{SOURCE28} %{buildroot}%{tmppath}/upgrade.sh + +popd %pre +# add opengauss user /usr/sbin/groupadd -r opengauss >/dev/null 2>&1 || : /usr/sbin/useradd -M -N -g opengauss -r -d %{datapath} -s /bin/bash -c "openGauss Server" opengauss >/dev/null 2>&1 || : # for install step # 1:install 2:upgrade -if [ $1 -gt 1 ]; then - echo "upgrade pre" -else +if [ $1 -eq 1 ]; then + echo "Preparing for install" portinfo=$(lsof -i:%{port}) if [ "${portinfo}" != "" ]; then - echo "The port[%{port}] is occupied. Please use command 'lsof -i:%{port} to check it.'" - exit 1 + echo "Error: The port[%{port}] is occupied. Please use command 'lsof -i:%{port} to check it.'" fi -fi - -%post -# set opengauss mini config parameters -set_mini_configparam(){ - config_mini_file=%{apppath}/share/postgresql/opengauss_config_file_mini - echo "port = %{port}" >> ${config_mini_file} - - config_sample_file=%{apppath}/share/postgresql/postgresql.conf.sample - if [[ -f $config_mini_file ]] - then - if [[ ! -f "$config_sample_file" ]] - then - echo "postgresql.conf.sample does not exist" - else - while IFS= read -r line; do - SUBSTRING=$(echo $line | cut -d'=' -f 1)"= " - if grep -q "$SUBSTRING" $config_sample_file ; then - sed -i "/$SUBSTRING/c$line" $config_sample_file - else - echo $line >> $config_sample_file - fi - done < $config_mini_file + if [ -d /var/lib/opengauss/data ]; then + if [ "`ls -A /var/lib/opengauss/data`" != "" ]; then + echo "Datanode dir(/var/lib/opengauss/data) is not empty." + echo "Please delete dir and reinstall opengauss." + exit 1 + fi + process_id=$(ps -ef | grep /var/lib/opengauss/data | grep -v grep | awk '{print $2}') + if [ "$process_id" != "" ]; then + echo "A process of opengauss already exists. Use command (ps -ef | grep /var/lib/opengauss/data) to confirm." + echo "Please kill the process and reinstall opengauss." + exit 1 fi fi -} - -start_opengauss(){ - process_id=$(ps -ef | grep /var/lib/opengauss/data | grep -v grep | awk '{print $2}') - if [ "$process_id" != "" ]; then - echo "A process of opengauss already exists. Use command (ps -ef | grep /var/lib/opengauss/data) to confirm." - echo "Please kill the process and reinstall opengauss." - return 0 + +elif [ $1 -eq 2 ]; then + echo "Preparing for upgrade" + old_version=$(rpm -qi opengauss | grep -i version | awk -F':' '{print $2}' | sed 's/^[ \t]*//;s/[ \t]*$//') + if [ "$(printf '%s\n' "%{version}" "$old_version" | sort -V | head -n1)" == "%{version}" ]; then + echo "Error: New version (%{version}) must be greater than the old version ($old_version)." + exit 1 fi - - if [ "`ls -A /var/lib/opengauss/data`" != "" ]; then - echo "Datanode dir(/var/lib/opengauss/data) is not empty." - echo "Please delete dir and reinstall opengauss." - return 0 + if [[ "${old_version}" == "2.1.0" && %{version} == "6.0.0" ]]; then + echo "The opengauss do not support upgrade from 2.1.0 to 6.0.0." + exit 1 fi - +fi + +%post +start_opengauss(){ result=$(su - opengauss -c "source ~/.bash_profile; gs_initdb -D /var/lib/opengauss/data -U opengauss --nodename=single_node") if [ $? -ne 0 ]; then echo "Init openGauss database failed." @@ -292,10 +335,15 @@ add_service(){ systemctl daemon-reload } -# for install step -# 1:install 2:upgrade -if [ $1 -eq 1 ]; then - echo "install" > /var/lib/opengauss/recode_install_flag +remove_service(){ + service_name=/usr/lib/systemd/system/opengauss.service + if [ -f $service_name ]; then + systemctl disable opengauss.service + rm $service_name + fi +} + +create_dir() { if [ -d /usr/local/opengauss ]; then rm -rf /usr/local/opengauss fi @@ -303,71 +351,47 @@ if [ $1 -eq 1 ]; then cp -r /var/lib/opengauss/pkg_%{version}/* /usr/local/opengauss chmod -R 755 /usr/local/opengauss chown -R opengauss:opengauss /usr/local/opengauss - set_mini_configparam +} + +upgrade_create_dir() { + rm -rf /var/lib/opengauss/opengauss_upgrade/pkg_%{version} + rm -rf /var/lib/opengauss/opengauss_upgrade/bak + rm -rf /var/lib/opengauss/opengauss_upgrade/tmp + mkdir -p /var/lib/opengauss/opengauss_upgrade/pkg_%{version} + mkdir -p /var/lib/opengauss/opengauss_upgrade/bak + mkdir -p /var/lib/opengauss/opengauss_upgrade/tmp + chown -R opengauss:opengauss /var/lib/opengauss +} + +# for install step +# 1:install 2:upgrade +if [ $1 -eq 1 ]; then + echo "install" > /var/lib/opengauss/recode_install_flag + create_dir start_opengauss add_service elif [ $1 -eq 2 ]; then echo "upgrade" > /var/lib/opengauss/recode_install_flag - mkdir -p /var/lib/opengauss/opengauss_upgrade - mkdir -p /var/lib/opengauss/opengauss_upgrade/bak - mkdir -p /var/lib/opengauss/opengauss_upgrade/tmp - cp -r /var/lib/opengauss/pkg_%{version} /var/lib/opengauss/opengauss_upgrade - chmod -R 755 /var/lib/opengauss/opengauss_upgrade - chown -R opengauss:opengauss /var/lib/opengauss/opengauss_upgrade - chmod -R 755 /usr/local/opengauss - chown -R opengauss:opengauss /usr/local/opengauss - chmod -R 755 /var/lib/opengauss/pkg_%{version} - chown -R opengauss:opengauss /var/lib/opengauss/pkg_%{version} - echo "start upgrade..." - echo "upgrade pre" - su - opengauss -c "source ~/.bash_profile; cd /var/lib/opengauss/opengauss_upgrade/pkg_%{version}/; sh opengauss_upgrade_start.sh -t upgrade_pre" + upgrade_create_dir + local cmd="source ~/.bash_profile; cd /var/lib/opengauss/pkg_%{version}; sh upgrade.sh" + local result + result=$(su - opengauss -c "$cmd") if [ $? -ne 0 ]; then - echo "Upgrade pre-check failed." - echo "Please cd /var/lib/opengauss_upgrade/pkg_%{version}/; sh opengauss_upgrade_start.sh -t upgrade_pre" + echo "Upgrade failed." + echo "$result, Please cat the log information: cat /var/lib/opengauss/opengauss_upgrade/opengauss_upgrade.log" exit 1 fi - echo "upgrade bin" - su - opengauss -c "source ~/.bash_profile; cd /var/lib/opengauss/opengauss_upgrade/pkg_%{version}/; sh opengauss_upgrade_start.sh -t upgrade_bin" - if [ $? -ne 0 ]; then - echo "Upgrade binary failed." - exit 1 - fi - echo "upgrade post" - su - opengauss -c "source ~/.bash_profile; cd /var/lib/opengauss/opengauss_upgrade/pkg_%{version}/; sh opengauss_upgrade_start.sh -t upgrade_post" - if [ $? -ne 0 ]; then - echo "Upgrade post-check failed." - echo "Please cd /var/lib/opengauss/opengauss_upgrade/pkg_%{version}/; sh opengauss_upgrade_start.sh -t upgrade_post" - exit 1 - fi - su - opengauss -c "source ~/.bash_profile; cd /var/lib/opengauss/opengauss_upgrade/pkg_%{version}/; sh opengauss_upgrade_start.sh -t upgrade_commit" - if [ $? -ne 0 ]; then - echo "Upgrade commit failed." - exit 1 - fi - - servicename=/usr/lib/systemd/system/opengauss.service - if [ -f $servicename ]; then - systemctl disable opengauss.service - rm $servicename - fi - cp %{tmppath}/script/opengauss.service /usr/lib/systemd/system/ - systemctl daemon-reload - - # upgrade backup - pid=$(ps -ef | grep /var/lib/opengauss/data | grep -v grep | awk '{print $2}') - if [ "$pid" != "" ]; then - kill -9 $pid - fi - cp -rf /usr/local/opengauss /usr/local/opengauss_%{version} + remove_service + add_service fi %preun remove_service(){ - servicename=/usr/lib/systemd/system/opengauss.service - if [ -f $servicename ]; then + service_name=/usr/lib/systemd/system/opengauss.service + if [ -f $service_name ]; then systemctl disable opengauss.service - rm $servicename + rm $service_name fi } @@ -413,27 +437,56 @@ if [ $flag = "install" ]; then echo "Please run: systemctl start opengauss.service" else echo "upgrade posttrans" - cp -rf /usr/local/opengauss_%{version}/* /usr/local/opengauss + if [ -d "/usr/local/opengauss" ] && [ "$(ls -A /usr/local/opengauss)" ]; then + rm -rf /usr/local/opengauss + fi + mkdir -p /usr/local/opengauss + upgrade_result=$(cat /var/lib/opengauss/opengauss_upgrade/tmp/upgrade_result.txt) + if [ $upgrade_result == "success" ]; then + echo "opengauss upgrade successfully" + cp -rf /var/lib/opengauss/opengauss_upgrade/pkg_%{version}/* /usr/local/opengauss + else: + echo "opengauss upgrade failed, rollback in progress" + cp -rf /var/lib/opengauss/opengauss_upgrade/bak/* /usr/local/opengauss + fi chown -R opengauss:opengauss /usr/local/opengauss chmod -R 755 /usr/local/opengauss + chmod -R 700 /var/lib/opengauss/data systemctl restart opengauss.service - echo "opengauss upgrade successfully" fi %files -%defattr (-,root,root) -%{apppath} -%{tmppath} %doc -%attr(700,opengauss,opengauss) %dir %{?_localstatedir}/lib/opengauss -%attr(700,opengauss,opengauss) %dir %{?_localstatedir}/lib/opengauss/data -%attr(755,opengauss,opengauss) %dir %{apppath} -%attr(755,opengauss,opengauss) %dir %{tmppath} -%attr(644,opengauss,opengauss) %config(noreplace) %{?_localstatedir}/lib/opengauss/.bash_profile +%defattr (755,opengauss,opengauss) +%{apppath} + +%defattr (700,opengauss,opengauss) +%{?_localstatedir}/lib/opengauss %changelog +* Sat Dec 14 2024 liuheng - 6.0.0-22 +- Fix bugs: when upgrading, the new version cannot be lower than the old version + +* Sat Dec 14 2024 liuheng - 6.0.0-21 +- Fix different versions of autoconf and resolve exceptions + +* Fri Dec 13 2024 liuheng - 6.0.0-20 +- Fix bugs: #IBB3VO + +* Tue Dec 10 2024 liuheng - 6.0.0-19 +- Fix bugs: #IBAAVY + +* Thu Dec 5 2024 xiaofan - 6.0.0-18 +- Support riscv64 + +* Mon Dec 2 2024 liuheng - 6.0.0-17 +- Adaptation upgrade + +* Thu Nov 14 2024 liuheng - 6.0.0-16 +- Update version to 6.0.0 + * Thu Jun 20 2024 liuheng - 5.0.1-15 - Fix bugs: Initialize Remove Password diff --git a/opengauss_upgrade_config.sh b/opengauss_upgrade_config.sh index d442d9027c8cf10c18126156c72ababcfd911a1d..d9fc8f0831296c4b4ddb7d2f0a78dd7a2c6bb481 100644 --- a/opengauss_upgrade_config.sh +++ b/opengauss_upgrade_config.sh @@ -13,10 +13,10 @@ GAUSS_ADMIN_USER="opengauss" GAUSS_LOG_PATH="/var/lib/opengauss/opengauss_upgrade" #数据库升级根位置 -GAUSS_UPGRADE_BASE_PATH="/var/lib/opengauss/opengauss_upgrade/pkg_5.0.1" +GAUSS_UPGRADE_BASE_PATH="/var/lib/opengauss/opengauss_upgrade/pkg_6.0.0" #数据库SQL包位置 -GAUSS_SQL_TAR_PATH="/var/lib/opengauss/opengauss_upgrade/pkg_5.0.1" +GAUSS_SQL_TAR_PATH="/var/lib/opengauss/opengauss_upgrade/pkg_6.0.0" #数据库低版本备份位置 GAUSS_BACKUP_BASE_PATH="/var/lib/opengauss/opengauss_upgrade/bak" diff --git a/openssl3-adptor.patch b/openssl3-adptor.patch deleted file mode 100755 index 023d2f49352106a2fe7b9ad59153806257fd60ad..0000000000000000000000000000000000000000 --- a/openssl3-adptor.patch +++ /dev/null @@ -1,89 +0,0 @@ -diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' openGauss-server-5.0.1/src/common/interfaces/libpq/client_logic_hooks/encryption_hooks/sm2_enc_key.cpp openGauss-server-5.0.1-edit/src/common/interfaces/libpq/client_logic_hooks/encryption_hooks/sm2_enc_key.cpp -*** openGauss-server-5.0.1/src/common/interfaces/libpq/client_logic_hooks/encryption_hooks/sm2_enc_key.cpp 2024-05-07 20:16:39.548798239 +0800 ---- openGauss-server-5.0.1-edit/src/common/interfaces/libpq/client_logic_hooks/encryption_hooks/sm2_enc_key.cpp 2024-05-07 20:17:58.813382746 +0800 -*************** -*** 152,165 **** - EVP_PKEY_free(public_evp_key); - return CMKEM_EVP_ERR; - } -! - ret = EVP_PKEY_set_alias_type(public_evp_key, EVP_PKEY_SM2); - if (ret != 1) { - cmkem_errmsg("EVP_PKEY_set_alias_type to EVP_PKEY_SM2 failed!"); - EVP_PKEY_free(public_evp_key); - return CMKEM_EVP_ERR; - } -! - /* do cipher. */ - ctx = EVP_PKEY_CTX_new(public_evp_key, NULL); - EVP_PKEY_free(public_evp_key); ---- 152,165 ---- - EVP_PKEY_free(public_evp_key); - return CMKEM_EVP_ERR; - } -! #ifndef WITH_OPENEULER_OS - ret = EVP_PKEY_set_alias_type(public_evp_key, EVP_PKEY_SM2); - if (ret != 1) { - cmkem_errmsg("EVP_PKEY_set_alias_type to EVP_PKEY_SM2 failed!"); - EVP_PKEY_free(public_evp_key); - return CMKEM_EVP_ERR; - } -! #endif - /* do cipher. */ - ctx = EVP_PKEY_CTX_new(public_evp_key, NULL); - EVP_PKEY_free(public_evp_key); -*************** -*** 242,255 **** - EVP_PKEY_free(private_evp_key); - return CMKEM_EVP_ERR; - } -! - ret = EVP_PKEY_set_alias_type(private_evp_key, EVP_PKEY_SM2); - if (ret != 1) { - cmkem_errmsg("EVP_PKEY_set_alias_type to EVP_PKEY_SM2 failed!"); - EVP_PKEY_free(private_evp_key); - return CMKEM_EVP_ERR; - } -! - /* do cipher. */ - ctx = EVP_PKEY_CTX_new(private_evp_key, NULL); - EVP_PKEY_free(private_evp_key); ---- 242,255 ---- - EVP_PKEY_free(private_evp_key); - return CMKEM_EVP_ERR; - } -! #ifndef WITH_OPENEULER_OS - ret = EVP_PKEY_set_alias_type(private_evp_key, EVP_PKEY_SM2); - if (ret != 1) { - cmkem_errmsg("EVP_PKEY_set_alias_type to EVP_PKEY_SM2 failed!"); - EVP_PKEY_free(private_evp_key); - return CMKEM_EVP_ERR; - } -! #endif - /* do cipher. */ - ctx = EVP_PKEY_CTX_new(private_evp_key, NULL); - EVP_PKEY_free(private_evp_key); -diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' openGauss-server-5.0.1/src/include/gs_policy/policy_common.h openGauss-server-5.0.1-edit/src/include/gs_policy/policy_common.h -*** openGauss-server-5.0.1/src/include/gs_policy/policy_common.h 2024-05-07 20:16:40.004801601 +0800 ---- openGauss-server-5.0.1-edit/src/include/gs_policy/policy_common.h 2024-05-08 15:15:54.570657064 +0800 -*************** -*** 22,27 **** ---- 22,28 ---- - */ - #ifndef _GS_POLICY_COMMON_H - #define _GS_POLICY_COMMON_H -+ #include - #include "nodes/parsenodes.h" - #include "nodes/plannodes.h" - -*************** -*** 31,36 **** ---- 32,39 ---- - #include "gs_vector.h" - #include "pgaudit.h" - -+ using std::vector; -+ - struct GsPolicyFQDN { - GsPolicyFQDN():m_value_schema(0), m_value_object(0), is_function(false){} - Oid m_value_schema; /* schema */ diff --git a/upgrade.patch b/upgrade.patch deleted file mode 100644 index fdca56d712882abb289f3fa168170962da23d4e5..0000000000000000000000000000000000000000 --- a/upgrade.patch +++ /dev/null @@ -1,159 +0,0 @@ -diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' openGauss-server-5.0.1/liteom/upgrade_common.sh openGauss-server-5.0.1-edit/liteom/upgrade_common.sh -*** openGauss-server-5.0.1/liteom/upgrade_common.sh 2024-05-09 14:48:32.000000000 +0800 ---- openGauss-server-5.0.1-edit/liteom/upgrade_common.sh 2024-06-07 17:31:52.228407016 +0800 -*************** -*** 273,284 **** - } - - function check_version() { -- if [[ ! -f "${GAUSSHOME}/version.cfg" ]]; then -- die "Cannot find current version.cfg!" ${err_upgrade_pre} -- else -- old_version=$(tail -n 1 "$GAUSSHOME"/version.cfg) -- old_cfg=$(sed -n 2p "$GAUSSHOME"/version.cfg | sed 's/\.//g') -- fi - if [[ -f "$GAUSS_UPGRADE_BIN_PATH"/version.cfg ]]; then - new_version_cfg_path="${GAUSS_UPGRADE_BIN_PATH}/version.cfg" - elif [[ -f "$GAUSS_UPGRADE_BASE_PATH"/version.cfg ]]; then ---- 273,278 ---- -*************** -*** 290,333 **** - new_version=$(tail -n 1 "$new_version_cfg_path") - new_cfg=$(sed -n 2p "$new_version_cfg_path" | sed 's/\.//g') - -- if [[ X"$old_version" == X || X"$old_cfg" == X || X"$new_version" == X || X"$new_cfg" == X ]]; then -- die "Maybe version.cfg is not normal" ${err_upgrade_pre} -- fi -- if ! echo "$old_cfg"|grep -Ewq "[0-9]{3,6}";then -- die "Maybe version.cfg is not normal" ${err_upgrade_pre} -- fi - if ! echo "$new_cfg"|grep -Ewq "[0-9]{3,6}";then - die "Maybe version.cfg is not normal" ${err_upgrade_pre} - fi - -! if [[ "$old_version" == "$new_version" ]]; then -! die "New version is same as old, the commitId is $old_version!" ${err_version_same} -! fi -! if [[ ${new_cfg} -lt ${old_cfg} ]]; then -! die "Current version is newer!" ${err_upgrade_pre} -! fi -! big_cfg="False" -! if [[ ${new_cfg} -gt ${old_cfg} ]]; then -! log "Big upgrade is needed!" -! big_cfg="True" -! fi - - local flag_file="$GAUSS_TMP_PATH"/version_flag -- if echo "old_version=$old_version" > "$flag_file" && chmod 600 "$flag_file"; then -- debug "Begin to generate $flag_file" -- else -- die "Write $flag_file failed" ${err_upgrade_pre} -- fi - if ! echo "new_version=$new_version" >> "$flag_file"; then - die "Write $flag_file failed" ${err_upgrade_pre} - fi - if ! echo "big_cfg=$big_cfg" >> "$flag_file"; then - die "Write $flag_file failed" ${err_upgrade_pre} - fi -- if ! echo "old_cfg=$old_cfg" >> "$flag_file"; then -- die "Write $flag_file failed" ${err_upgrade_pre} -- fi -- log "Old version commitId is $old_version, version info is $old_cfg" - log "New version commitId is $new_version, version info is $new_cfg" - - ##need version.cfg to check big upgrade,note user exec sql on primary dn ---- 284,302 ---- - new_version=$(tail -n 1 "$new_version_cfg_path") - new_cfg=$(sed -n 2p "$new_version_cfg_path" | sed 's/\.//g') - - if ! echo "$new_cfg"|grep -Ewq "[0-9]{3,6}";then - die "Maybe version.cfg is not normal" ${err_upgrade_pre} - fi - -! big_cfg="True" - - local flag_file="$GAUSS_TMP_PATH"/version_flag - if ! echo "new_version=$new_version" >> "$flag_file"; then - die "Write $flag_file failed" ${err_upgrade_pre} - fi - if ! echo "big_cfg=$big_cfg" >> "$flag_file"; then - die "Write $flag_file failed" ${err_upgrade_pre} - fi - log "New version commitId is $new_version, version info is $new_cfg" - - ##need version.cfg to check big upgrade,note user exec sql on primary dn -*************** -*** 1239,1242 **** - fi - rm -f "$GAUSS_TMP_PATH"/version_flag - rm -f "$GAUSS_TMP_PATH"/record_step.txt -! } -\ No newline at end of file ---- 1208,1211 ---- - fi - rm -f "$GAUSS_TMP_PATH"/version_flag - rm -f "$GAUSS_TMP_PATH"/record_step.txt -! } -diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' openGauss-server-5.0.1/liteom/upgrade_config.sh openGauss-server-5.0.1-edit/liteom/upgrade_config.sh -*** openGauss-server-5.0.1/liteom/upgrade_config.sh 2024-05-09 14:48:32.000000000 +0800 ---- openGauss-server-5.0.1-edit/liteom/upgrade_config.sh 2024-06-06 16:56:26.681705002 +0800 -*************** -*** 4,31 **** - # version: 1.0 - - # 数据库监听端口 -! GAUSS_LISTEN_PORT="" - - # 数据库管理员用户名 -! GAUSS_ADMIN_USER="" - - #数据库升级回退日志路径 -! GAUSS_LOG_PATH="" - - #数据库升级根位置 -! GAUSS_UPGRADE_BASE_PATH="" - - #数据库SQL包位置 -! GAUSS_SQL_TAR_PATH="" - - #数据库低版本备份位置 -! GAUSS_BACKUP_BASE_PATH="" - - #数据库临时目录 -! GAUSS_TMP_PATH="" - - #是否使用存在的bin解压包 - GAUSS_UPGRADE_BIN_PATH="" - - #需要同步的cluster config 列表 -! GAUSS_UPGRADE_SYNC_CONFIG_LIST="" -\ No newline at end of file ---- 4,31 ---- - # version: 1.0 - - # 数据库监听端口 -! GAUSS_LISTEN_PORT="7654" - - # 数据库管理员用户名 -! GAUSS_ADMIN_USER="opengauss" - - #数据库升级回退日志路径 -! GAUSS_LOG_PATH="/usr/local/opengauss_upgrade" - - #数据库升级根位置 -! GAUSS_UPGRADE_BASE_PATH="/usr/local/opengauss_upgrade/pkg_5.0.1" - - #数据库SQL包位置 -! GAUSS_SQL_TAR_PATH="/usr/local/opengauss_upgrade/pkg_5.0.1" - - #数据库低版本备份位置 -! GAUSS_BACKUP_BASE_PATH="/usr/local/opengauss_upgrade/bak" - - #数据库临时目录 -! GAUSS_TMP_PATH="/usr/local/opengauss_upgrade/tmp" - - #是否使用存在的bin解压包 - GAUSS_UPGRADE_BIN_PATH="" - - #需要同步的cluster config 列表 -! GAUSS_UPGRADE_SYNC_CONFIG_LIST="" diff --git a/upgrade.sh b/upgrade.sh new file mode 100644 index 0000000000000000000000000000000000000000..1738a3a66cb60daa081a74685511b4a7bf275a79 --- /dev/null +++ b/upgrade.sh @@ -0,0 +1,654 @@ +#/bin/bash +err_upgrade_pre=201 +err_upgrade_bin=202 +err_upgrade_post=203 +err_rollback_pre=204 +err_rollback_bin=205 +err_rollback_post=206 +err_check_init=207 +err_parameter=208 +err_upgrade_commit=209 +err_version_same=210 +err_no_need_commit=211 +err_inner_sys=212 +err_dn_role_null=213 + +version=6.0.0 +GAUSS_BASE_PATH="/usr/local/opengauss" +GAUSS_UPGRADE_BASE_PATH="/var/lib/opengauss/opengauss_upgrade/pkg_${version}" +GAUSS_BACKUP_BASE_PATH="/var/lib/opengauss/opengauss_upgrade/bak" +GAUSS_TMP_PATH="/var/lib/opengauss/opengauss_upgrade/tmp" +GAUSS_LOG_FILE="/var/lib/opengauss/opengauss_upgrade/opengauss_upgrade.log" +new_opengauss_dir=/var/lib/opengauss/pkg_${version} +GAUSS_LISTEN_PORT=7654 +GAUSS_UPGRADE_RESULT_FILE=${GAUSS_TMP_PATH}/upgrade_result.txt + +function create_dir() { + rm -rf ${GAUSS_BACKUP_BASE_PATH} + rm -rf ${GAUSS_TMP_PATH} + rm -rf ${GAUSS_UPGRADE_BASE_PATH} + mkdir -p ${GAUSS_UPGRADE_BASE_PATH} + mkdir -p ${GAUSS_BACKUP_BASE_PATH} + mkdir -p ${GAUSS_TMP_PATH} + # touch ${GAUSS_LOG_FILE} +} + +# create_dir + +function cp_new_all_pkg_to_tmp_dir() { + cp -rf ${new_opengauss_dir}/* ${GAUSS_UPGRADE_BASE_PATH} +} + +cp_new_all_pkg_to_tmp_dir + +function debug() { + local current_time=$(date +"%Y-%m-%d %H:%M:%S") + echo "[$current_time]" "$1" >>"${GAUSS_LOG_FILE}" +} + +function log() { + local current_time=$(date +"%Y-%m-%d %H:%M:%S") + echo "[$current_time]" "$1" >>"${GAUSS_LOG_FILE}" + echo "$1" +} + +function die() { + local current_time=$(date +"%Y-%m-%d %H:%M:%S") + if [[ -f "${GAUSS_LOG_FILE}" ]]; then + echo "[$current_time]" "$1" >>"${GAUSS_LOG_FILE}" + fi + echo -e "\033[31mError: $1\033[0m" + exit $2 +} + +function check_config_path() { + local temp_value="$1" + if [[ "$temp_value" == *[\(\)\{\}\[\]\<\>\"\'\`\\\ \*\!\|\;\&\$\~\?]* ]]; then + die "$temp_value may contain illegal characters" ${err_check_init} + fi + if echo "$temp_value" | grep -Eq "^/{1,}$"; then + die "path cannot be / " ${err_check_init} + fi +} + +function check_env() { + if [[ "$GAUSSHOME" == "" ]]; then + die "GAUSSHOME cannot be null!" ${err_check_init} + fi + if [[ "$GAUSSDATA" == "" ]] && [[ "$PGDATA" == "" ]]; then + die "GAUSSDATA or PGDATA cannot be all null!" ${err_check_init} + fi + if [[ "$PGDATA" == "" ]]; then + PGDATA=${GAUSSDATA} + fi + if [[ "$GAUSSDATA" == "" ]]; then + GAUSSDATA=${PGDATA} + fi + check_config_path "$GAUSSHOME" + check_config_path "$GAUSSDATA" + check_config_path "$PGDATA" + # ensure GAUSSDATA not contain GAUSSHOME + if echo "$GAUSSDATA" | grep -wq "^$GAUSSHOME"; then + die "GAUSSDATA cannot be in GAUSSHOME!" ${err_check_init} + fi + log "Current env value: GAUSSHOME is $GAUSSHOME, PGDATA is $PGDATA." +} + +function check_upgrade_config() { + local tempfile="$GAUSS_TMP_PATH"/".temp_check_guc_value" + # guc output from opengauss or gauss is diff + if gs_guc check -D ${PGDATA} -c "$1" >"$tempfile" 2>&1; then + tempvalue=$(cat "$tempfile" | tail -2 | head -1 | sed 's/\[[^][]*\]//g' | sed 's/[[:space:]]//g' | awk -F= '{print $2}') + if ! rm -f ${tempfile}; then + log "rm -f $tempfile failed" + return 1 + fi + if [[ "$tempvalue" == "$2" ]]; then + debug "guc check $1=$2 successfully" + return 0 + elif [[ "$1" == "sync_config_strategy" && "$tempvalue" == "NULL" ]]; then + debug "guc check $1=$2 successfully" + return 0 + else + return 1 + fi + else + if ! rm -f ${tempfile}; then + log "rm -f $tempfile failed" + return 1 + fi + return 1 + fi +} + +function reload_upgrade_config() { + if check_upgrade_config "$1" "$2"; then + return 0 + fi + # only primary need to reload upgrade_mode, standby wait sync from primary + query_dn_role + if [[ X"$dn_role" == X"standby" || X"$dn_role" == X"cascade_standby" ]]; then + return 0 + fi + # ensure value of sync_config_strategy is all_node or default + if ! check_upgrade_config "sync_config_strategy" "all_node"; then + return 1 + fi + + local current_time=$(date +"%Y-%m-%d %H:%M:%S") + echo -n \[${current_time}\] " " >>"${GAUSS_LOG_FILE}" + for i in $(seq 1 3); do + if gs_guc reload -D ${PGDATA} -c "$1=$2" >>"${GAUSS_LOG_FILE}" 2>&1; then + return 0 + fi + sleep 2 + done + return 1 +} + +function check_version() { + version=$(gaussdb -V) + if [[ $version =~ "V500R002C00" || $version =~ "2.1.0" ]]; then + echo "2.1.0" >${GAUSSHOME}/version.cfg + echo "92.421" >>${GAUSSHOME}/version.cfg + echo "1f6832d" >>${GAUSSHOME}/version.cfg + old_version=1f6832d + old_cfg=$(sed -n 2p "$GAUSSHOME/version.cfg" | sed 's/\.//g') + else + if [[ ! -f "${GAUSSHOME}/version.cfg" ]]; then + die "Cannot find current version.cfg!" ${err_upgrade_pre} + else + old_version=$(sed -n 3p "$GAUSSHOME"/version.cfg) + old_cfg=$(sed -n 2p "$GAUSSHOME/version.cfg" | sed 's/\.//g') + fi + fi + if [[ -f "$GAUSS_UPGRADE_BASE_PATH"/version.cfg ]]; then + new_version_cfg_path="${GAUSS_UPGRADE_BASE_PATH}/version.cfg" + else + die "Cannot find new version.cfg!" ${err_upgrade_pre} + fi + + new_version=$(sed -n 3p "$new_version_cfg_path") + new_cfg=$(sed -n 2p "$new_version_cfg_path" | sed 's/\.//g') + + if [[ X"$old_version" == X || X"$old_cfg" == X || X"$new_version" == X || X"$new_cfg" == X ]]; then + die "Maybe version.cfg is not normal" ${err_upgrade_pre} + fi + if ! echo "$old_cfg" | grep -Ewq "[0-9]{3,6}"; then + die "Maybe version.cfg is not normal" ${err_upgrade_pre} + fi + if ! echo "$new_cfg" | grep -Ewq "[0-9]{3,6}"; then + die "Maybe version.cfg is not normal" ${err_upgrade_pre} + fi + + if [[ "$old_version" == "$new_version" ]]; then + die "New version is same as old, the commitId is $old_version!" ${err_version_same} + fi + if [[ ${new_cfg} -lt ${old_cfg} ]]; then + die "Current version is newer!" ${err_upgrade_pre} + fi + + log "Old version commitId is $old_version, version info is $old_cfg" + log "New version commitId is $new_version, version info is $new_cfg" +} + +function check_disk() { + avail_disk=$(df -BM "$GAUSS_UPGRADE_BASE_PATH" | tail -n 1 | awk '{print $4}') + avail_disk=${avail_disk:0:-1} + if [[ X"$min_disk" == "X" ]]; then + min_disk=2048 + fi + if [[ ${avail_disk} -lt ${min_disk} ]]; then + die "avail disk must be >= ${min_disk}MB, check with cmd: df -BM $GAUSS_UPGRADE_BASE_PATH!" ${err_check_init} + fi + log "Check available disk space successfully." +} + +function start_dbnode() { + start_cmd="gs_ctl start -D ${PGDATA} " + log "start gaussdb by cmd: $start_cmd" + ${start_cmd} >>"${GAUSS_LOG_FILE}" 2>&1 + if [ $? -ne 0 ]; then + die "failed to $start_cmd" + fi +} + +function rollback_post() { + if ! check_db_process; then + die "Gaussdb is not running" ${err_rollback_post} + fi + if ! reload_upgrade_config upgrade_mode 2; then + die "set upgrade_mode to 2 failed" ${err_upgrade_post} + fi + if exec_sql "$GAUSS_UPGRADE_BASE_PATH"/temp_sql/temp_rollback-post_maindb.sql maindb && exec_sql "$GAUSS_UPGRADE_BASE_PATH"/temp_sql/temp_rollback-post_otherdb.sql otherdb; then + debug "rollback post sql successfully" + else + die "rollback post sql failed" ${err_rollback_post} + fi +} + +function prepare_sql() { + #$1: upgrade,upgrade-post,rollback,rollback-post + #$2: maindb,otherdb + temp_old=${old_cfg} + temp_new=${new_cfg} + local action="$1" + local dbname="$2" + local tempfile="$GAUSS_TMP_PATH"/temp_sql/"temp_"${action}_${dbname}.sql + temp_file_num=0 + if echo "START TRANSACTION;set IsInplaceUpgrade = on;" >"$tempfile" && chmod 600 "$tempfile"; then + debug "Begin to generate $tempfile" + else + die "Write $tempfile failed" ${err_upgrade_pre} + fi + if ! echo "SET search_path = 'pg_catalog';SET local client_min_messages = NOTICE;SET local log_min_messages = NOTICE;" >>"$tempfile"; then + die "Write $tempfile failed" ${err_upgrade_pre} + fi + if ! echo "SET statement_timeout = 3600000;" >>"$tempfile"; then + die "Write $tempfile failed" ${err_upgrade_pre} + fi + if [[ "$action" == "upgrade" || "$action" == "upgrade-post" ]]; then + while [[ ${temp_old} -lt ${temp_new} ]]; do + ((temp_old = $temp_old + 1)) + local upgrade_sql_file="upgrade_sql/upgrade_catalog_${dbname}/${action}_catalog_${dbname}_${temp_old:0:2}_${temp_old:2}.sql" + if [[ -f "$upgrade_sql_file" ]]; then + if ! cat "$upgrade_sql_file" >>"$tempfile"; then + die "Write $tempfile failed" ${err_upgrade_pre} + fi + debug "$upgrade_sql_file >> $tempfile" + ((temp_file_num = temp_file_num + 1)) + fi + done + fi + if [[ "$1" == "rollback" || "$1" == "rollback-post" ]]; then + while [[ ${temp_new} -gt ${temp_old} ]]; do + local upgrade_sql_file="upgrade_sql/rollback_catalog_${dbname}/${action}_catalog_${dbname}_${temp_new:0:2}_${temp_new:2}.sql" + if [[ -f "$upgrade_sql_file" ]]; then + if ! cat "$upgrade_sql_file" >>"$tempfile"; then + die "Write $tempfile failed" ${err_upgrade_pre} + fi + debug "$upgrade_sql_file >>$tempfile" + ((temp_file_num = temp_file_num + 1)) + fi + ((temp_new = $temp_new - 1)) + done + fi + if ! echo "COMMIT;" >>"$tempfile"; then + die "Write $tempfile failed" ${err_upgrade_pre} + fi + #file not meet requirements + if [[ ${temp_file_num} -eq 0 ]]; then + debug "No sql file for ${action} ${dbname}!" + rm -f "$tempfile" + else + debug "get ${temp_file_num} files for ${action} ${dbname}!" + fi +} + +function prepare_sql_all() { + local dir_temp_sql="$GAUSS_TMP_PATH"/temp_sql + local sql_tar_file="$GAUSS_UPGRADE_BASE_PATH"/upgrade_sql.tar.gz + local sql_tar_sha="$GAUSS_UPGRADE_BASE_PATH"/upgrade_sql.sha256 + + if [[ ! -f "${sql_tar_file}" ]] || [[ ! -f "${sql_tar_sha}" ]]; then + die "${sql_tar_file} or ${sql_tar_sha} not exit!" ${err_upgrade_pre} + else + local sha_expect=$(cat ${sql_tar_sha}) + local sha_current=$(sha256sum ${sql_tar_file} | awk '{print $1}') + if [[ "$sha_expect" != "$sha_current" ]]; then + die "The sha256 value of $sql_tar_file does not match $sql_tar_sha!" ${err_upgrade_pre} + fi + if [[ -d "$dir_temp_sql" ]]; then + rm -rf "$dir_temp_sql" + fi + if mkdir -p -m 700 "$dir_temp_sql" && tar -zxf "$sql_tar_file" -C "$dir_temp_sql"; then + log "decompress upgrade_sql.tar.gz successfully." + else + die "decompress upgrade_sql.tar.gz failed" ${err_upgrade_pre} + fi + fi + #total 8 + cd "$dir_temp_sql" + for action in upgrade upgrade-post rollback rollback-post; do + for db_base in maindb otherdb; do + prepare_sql ${action} ${db_base} + done + done +} + +function pre_exec_sql() { + if exec_sql "$GAUSS_TMP_PATH"/temp_sql/temp_upgrade_maindb.sql maindb && exec_sql "$GAUSS_TMP_PATH"/temp_sql/temp_upgrade_otherdb.sql otherdb; then + debug "exec pre sql successfully" + return 0 + else + log "exec pre sql failed" + return 1 + fi +} + +function post_exec_sql() { + if exec_sql "$GAUSS_TMP_PATH"/temp_sql/temp_upgrade-post_maindb.sql maindb && exec_sql "$GAUSS_TMP_PATH"/temp_sql/temp_upgrade-post_otherdb.sql otherdb; then + debug "upgrade post sql successfully" + else + die "upgrade post sql failed" ${err_upgrade_post} + fi +} + +function stop_dbnode() { + if ! check_db_process; then + return 0 + fi + gs_ctl stop -D ${PGDATA} >>"${GAUSS_LOG_FILE}" 2>&1 +} + +function check_db_process() { + legal_path=$(echo "$GAUSSHOME/bin/gaussdb" | sed 's#//*#/#g') + ps wwx | grep "${legal_path}" | grep -v grep >/dev/null +} + +function query_dn_role() { + gs_ctl query -D ${PGDATA} >"${GAUSS_TMP_PATH}/temp_dn_role" + dn_role_temp=$(grep local_role "${GAUSS_TMP_PATH}/temp_dn_role" | head -1 | awk '{print $3}') + # rm -f "${GAUSS_TMP_PATH}/temp_dn_role" + if [[ "$dn_role_temp" = "Normal" ]]; then + dn_role_temp="normal" + elif [[ "$dn_role_temp" = "Primary" ]]; then + dn_role_temp="primary" + elif [[ "$dn_role_temp" = "Standby" ]]; then + dn_role_temp="standby" + elif [[ "$dn_role_temp" = "Cascade" ]]; then + dn_role_temp="cascade_standby" + else + dn_role_temp="" + fi + + dn_role="$dn_role_temp" + if [[ "$dn_role" != "$dn_role_temp" ]]; then + die "dn_role maybe not right" ${err_dn_role_null} + fi +} + +function rollback_bin() { + export GAUSSHOME=${GAUSS_BASE_PATH} + export LD_LIBRARY_PATH=${GAUSSHOME}/lib:$LD_LIBRARY_PATH + export PATH=${GAUSSHOME}/bin:$PATH + start_dbnode + if ! reload_upgrade_config upgrade_mode 0; then + die "set upgrade_mode to 0 failed" ${err_upgrade_post} + fi +} + +function rollback_pre_sql() { + if exec_sql "$GAUSS_TMP_PATH"/temp_sql/temp_rollback_maindb.sql maindb && exec_sql "$GAUSS_TMP_PATH"/temp_sql/temp_rollback_otherdb.sql otherdb; then + debug "rollback pre sql successfully" + else + die "rollback pre sql failed" ${err_rollback_pre} + fi +} + +function rollback_post() { + if ! reload_upgrade_config upgrade_mode 2; then + die "set upgrade_mode to 2 failed" ${err_upgrade_post} + fi + if exec_sql "$GAUSS_TMP_PATH"/temp_sql/temp_rollback-post_maindb.sql maindb && exec_sql "$GAUSS_TMP_PATH"/temp_sql/temp_rollback-post_otherdb.sql otherdb; then + debug "rollback post sql successfully" + else + die "rollback post sql failed" ${err_rollback_post} + fi +} + +function set_upgrade_config() { + if check_upgrade_config "$1" "$2"; then + return 0 + fi + local current_time=$(date +"%Y-%m-%d %H:%M:%S") + echo -n \[${current_time}\] " " >>"${GAUSS_LOG_FILE}" + for i in $(seq 1 3); do + if gs_guc set -D ${PGDATA} -c "$1=$2" >>"${GAUSS_LOG_FILE}" 2>&1; then + debug "guc set $1=$2 successfully" + return 0 + fi + sleep 2 + done + return 1 +} + +function set_upgrade_mode() { + if ! set_upgrade_config upgrade_mode 2; then + die "set upgrade_mode to 2 failed" ${err_rollback_bin} + fi +} + +function check_upgrade_mode_by_sql() { + # check upgrade_mode = 2 by sql + check_upgrade_mode_result="$GAUSS_TMP_PATH"/".temp_upgrade_mode" + if echo "" >${check_upgrade_mode_result} && chmod 600 ${check_upgrade_mode_result}; then + debug "Begin to generate check_upgrade_mode_result." + else + log "generate $check_upgrade_mode_result failed." + return 1 + fi + gsql -p ${GAUSS_LISTEN_PORT} -d postgres --pipeline -X -t -A \ + -c "show upgrade_mode;" >${check_upgrade_mode_result} 2>&1 & + sleep 0.1 + + for i in $(seq 1 60); do + check_mode_sql=$(cat ${check_upgrade_mode_result}) + if [[ "$check_mode_sql" == "2" ]]; then + rm -f ${check_upgrade_mode_result} + return 0 + elif [[ "$check_mode_sql" == "0" ]]; then + rm -f ${check_upgrade_mode_result} + gsql -p ${GAUSS_LISTEN_PORT} -d postgres --pipeline -X -t -A \ + -c "show upgrade_mode;" >${check_upgrade_mode_result} 2>&1 & + elif [[ "$check_mode_sql" == "" ]]; then + debug "Wait for check_upgrade_mode_result..." + else + log "$(cat ${check_upgrade_mode_result})" + return 1 + fi + sleep 0.5 + done + if [[ -f "${check_upgrade_mode_result}" ]]; then + debug "check_upgrade_mode_result is $(cat ${check_upgrade_mode_result})" + rm -f ${check_upgrade_mode_result} + else + debug "get upgrade_mode by gsql failed" + fi + return 1 +} + +function exec_sql() { + #$1: sqlfilename + #$2: maindb,otherdb + query_dn_role + if [[ X"$dn_role" == X"standby" || X"$dn_role" == X"cascade_standby" ]]; then + return 0 + fi + if [[ ! -f "$1" ]]; then + return 0 + fi + + if ! check_upgrade_mode_by_sql; then + return 1 + fi + + temp_result="$GAUSS_TMP_PATH"/"temp_sql_temp_result_$(date +%Y%m%d_%H%M%S)" + if echo "" >"$temp_result" && chmod 600 "$temp_result"; then + debug "begin exec sql ,file name is $1" + else + log "Generate $temp_result failed." + fi + sqlbegin="gsql -p $GAUSS_LISTEN_PORT -X -t -A " + if [[ "$2" == "maindb" ]]; then + if ${sqlbegin} -d postgres --echo-queries --set ON_ERROR_STOP=on -f $1 >>"$temp_result" 2>&1; then + debug "Exec $1 on database: postgres successfully" + else + log "Exec sql on postgres failed." + debug "$(cat ${temp_result})" + rm -f ${temp_result} + return 1 + fi + else + if databases=$(${sqlbegin} -d postgres -c "SELECT datname FROM pg_catalog.pg_database where datname != 'postgres';"); then + temp_num=$(echo ${databases} | awk '{print NF}') + debug "Num of other databases: $temp_num" + else + log "Exec sql to get databases failed." + return 1 + fi + for database in ${databases}; do + debug "Begin exec $1 on database: $database " + ${sqlbegin} -d ${database} --echo-queries --set ON_ERROR_STOP=on -f $1 >>"$temp_result" 2>&1 + done + fi + if grep -wE "ERROR:|FATAL:|could not connect to server" ${temp_result}; then + log "Exec sql failed." + debug "$(cat ${temp_result})" + rm -f ${temp_result} + return 1 + else + debug "Exec all sql successfully." + rm -f ${temp_result} + return 0 + fi +} + +function guc_delete() { + if [[ ! -f "$GAUSS_TMP_PATH"/temp_sql/upgrade_sql/set_guc/delete_guc ]]; then + log "No need to delete guc" + fi + for para in $(cat "$GAUSS_TMP_PATH"/temp_sql/upgrade_sql/set_guc/delete_guc); do + if echo ${para} | grep -w datanode >/dev/null; then + para=$(echo ${para} | awk '{print $1}') + if sed -i "/^${para}[ =]/d" ${PGDATA}/postgresql.conf; then + debug "$para was deleted successfully." + else + die "$para was deleted failed" ${err_upgrade_bin} + fi + fi + done + log "Delete guc successfully" +} + +function delete_tmp_files() { + rm -rf "$GAUSS_TMP_PATH" + rm -rf ${GAUSS_LOG_FILE} +} + +function add_pg_proc_index() { + version=$(gaussdb -V) + if [[ ! $version =~ "V500R002C00" && ! $version =~ "2.1.0" ]]; then + return 0 + fi + add_index_cmd="start transaction; set isinplaceupgrade=on; +ALTER INDEX pg_proc_proname_args_nsp_index unusable; +SET LOCAL inplace_upgrade_next_system_object_oids = IUO_CATALOG, false, true, 0, 0, 0, 9666; +CREATE INDEX pg_catalog.pg_proc_proname_all_args_nsp_index on pg_catalog.pg_proc USING BTREE(proname name_ops, pronamespace oid_ops, propackageid oid_ops); +SET LOCAL inplace_upgrade_next_system_object_oids = IUO_CATALOG, false, true, 0, 0, 0, 0; +commit;" + sqlbegin="gsql -p $GAUSS_LISTEN_PORT -X -t -A " + result=$(${sqlbegin} -d postgres -c "${add_index_cmd}") + if [ $? -ne 0 ]; then + log "Exec sql to get databases failed." + return 1 + fi +} + +function upgrade_pre() { + # 1.检查环境变量,版本,磁盘 + check_env + check_version + check_disk + # 2.准备sql + prepare_sql_all + # 3.设置升级模式 + if ! reload_upgrade_config upgrade_mode 2; then + die "set upgrade_mode to 0 failed" ${err_upgrade_pre} + fi + # 4.添加pg_proc_index + add_pg_proc_index + # 5.执行pre sql + pre_exec_sql + if [ $? -ne 0 ]; then + rollback_pre_sql + exit 1 + fi +} + +function remove_path() { + local remove_dir="$1" + export PATH=$(echo $PATH | tr ':' '\n' | grep -v "^${remove_dir}$" | tr '\n' ':' | sed 's/:$//') +} + +function remove_lib() { + local remove_dir="$1" + export LD_LIBRARY_PATH=$(echo $LD_LIBRARY_PATH | tr ':' '\n' | grep -v "^${remove_dir}$" | tr '\n' ':' | sed 's/:$//') +} + +function upgrade_bin() { + # 1.停止旧库 + if ! stop_dbnode; then + die "Stop gaussdb failed" ${err_upgrade_bin} + fi + # 2.删除guc + guc_delete + # 3.启动新库 + remove_path ${GAUSS_BASE_PATH}/bin + remove_lib ${GAUSS_BASE_PATH}/lib + export GAUSSHOME=${GAUSS_UPGRADE_BASE_PATH} + export LD_LIBRARY_PATH=${GAUSSHOME}/lib:$LD_LIBRARY_PATH + export PATH=${GAUSSHOME}/bin:$PATH + start_dbnode +} + +function upgrade_post() { + # 1.执行升级sql,升级元数据 + if ! check_db_process; then + die "Guassdb is not running" ${err_upgrade_post} + fi + if exec_sql "$GAUSS_TMP_PATH"/temp_sql/temp_upgrade-post_maindb.sql maindb && exec_sql "$GAUSS_TMP_PATH"/temp_sql/temp_upgrade-post_otherdb.sql otherdb; then + debug "upgrade post sql successfully" + else + log "upgrade post sql failed" + rollback_post + exit 1 + fi +} + +function upgrade_commit() { + # 1.设置升级模式为0 + if ! reload_upgrade_config upgrade_mode 0; then + die "set upgrade_mode to 0 failed" ${err_upgrade_commit} + fi + # 2.删除临时文件 + # delete_tmp_files +} + +function cp_bak() { + cp -rf ${GAUSS_BASE_PATH}/* ${GAUSS_BACKUP_BASE_PATH} + # rm -rf ${GAUSS_BASE_PATH}/* +} + +function cp_new() { + cp -rf ${GAUSS_UPGRADE_BASE_PATH}/* ${GAUSS_BASE_PATH} +} + +function main() { + upgrade_pre + upgrade_bin + upgrade_post + upgrade_commit + stop_dbnode + echo "success" > $GAUSS_UPGRADE_RESULT_FILE + # cp_bak + # cp_new + # remove_path ${GAUSS_UPGRADE_BASE_PATH}/bin + # remove_lib ${GAUSS_UPGRADE_BASE_PATH}/lib + # source /var/lib/opengauss/.bash_profile + # which gs_ctl + # start_dbnode + return 0 +} + +main diff --git a/version.cfg b/version.cfg index 77656eee1bbf0ae4f8a025b67e1c1ff41642cda5..9fc3cff381b8de64bddb8d38b807a9b3826ac611 100644 --- a/version.cfg +++ b/version.cfg @@ -1,3 +1,4 @@ -openGauss-Lite-5.0.1 -92.854 -33b035fd \ No newline at end of file +openGauss-Server-6.0.0 +92.954 +798b1578 +release \ No newline at end of file diff --git a/xgboost-v1.4.1.tar.gz b/xgboost-v1.4.1.tar.gz index 12a8bef753ff766112a6fe7aee96d87b2bf40fcb..10c7beb6cb4fccd5492adf1a6d973bb85a57d122 100644 Binary files a/xgboost-v1.4.1.tar.gz and b/xgboost-v1.4.1.tar.gz differ diff --git a/zlib-1.2.12.tar.gz b/zlib-1.2.12.tar.gz index 4df1cf58fc97c06667a26b81a94314710378e36b..f3a3c63c7e05ad46d2ad9eb05a9e4cc9119a6068 100644 Binary files a/zlib-1.2.12.tar.gz and b/zlib-1.2.12.tar.gz differ