From a3b919d59961f380950263518d895213e6bfc8cd Mon Sep 17 00:00:00 2001 From: Mario Gonzalez Date: Fri, 20 Jan 2023 18:48:51 -0300 Subject: [PATCH 1/2] Checking if flex is installed before compiling. We are checking for sed amd other external tools inside configure script, now is turn of flex. In systems without flex you will have this error: gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement [...] postgresql/internal -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2 -c -o configfile.o configfile.c flex -o'configfile-scan.c' configfile-scan.l make: flex: No such file or directory make: *** [Makefile.global:40: configfile-scan.c] Error 127 --- configure.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configure.in b/configure.in index 737c41e4..bf92e683 100644 --- a/configure.in +++ b/configure.in @@ -60,6 +60,7 @@ AC_SUBST(vpath_build) AC_CHECK_PROG(HAVE_GNUSED,gnused,yes,no) AC_CHECK_PROG(HAVE_GSED,gsed,yes,no) AC_CHECK_PROG(HAVE_SED,sed,yes,no) +AC_CHECK_PROG(HAVE_FLEX,flex,yes,no) if test "$HAVE_GNUSED" = yes; then SED=gnused @@ -72,6 +73,7 @@ else fi AC_SUBST(SED) +AS_IF([test x"$HAVE_FLEX" != x"yes"], AC_MSG_ERROR([flex should be installed first])) AC_CONFIG_FILES([Makefile]) AC_CONFIG_FILES([Makefile.global]) From ed2c0aaf0b1d36140b77b3c8812e56e0abfe3fa4 Mon Sep 17 00:00:00 2001 From: Mario Gonzalez Date: Fri, 20 Jan 2023 20:09:39 -0300 Subject: [PATCH 2/2] Checking for required libraries before compiling. This commit ensures all the different libraries are installed before starting to compile. --- configure.in | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/configure.in b/configure.in index bf92e683..860d5698 100644 --- a/configure.in +++ b/configure.in @@ -75,6 +75,24 @@ AC_SUBST(SED) AS_IF([test x"$HAVE_FLEX" != x"yes"], AC_MSG_ERROR([flex should be installed first])) +#Checking libraries +GENERIC_LIB_FAILED_MSG="library should be installed" + +AC_CHECK_LIB(selinux, is_selinux_enabled, [], + [AC_MSG_ERROR(['selinux' $GENERIC_LIB_FAILED_MSG])]) + +AC_CHECK_LIB(lz4, LZ4_compress_default, [], + [AC_MSG_ERROR(['Z4' $GENERIC_LIB_FAILED_MSG])]) + +AC_CHECK_LIB(xslt, xsltCleanupGlobals, [], + [AC_MSG_ERROR(['xslt' $GENERIC_LIB_FAILED_MSG])]) + +AC_CHECK_LIB(pam, pam_start, [], + [AC_MSG_ERROR(['pam' $GENERIC_LIB_FAILED_MSG])]) + +AC_CHECK_LIB(gssapi_krb5, gss_init_sec_context, [], + [AC_MSG_ERROR([gssapi_krb5 $GENERIC_LIB_FAILED_MSG])]) + AC_CONFIG_FILES([Makefile]) AC_CONFIG_FILES([Makefile.global]) AC_OUTPUT