Hi, Laurynas! On Oct 30, Laurynas Biveinis wrote: > Laurynas Biveinis has proposed merging lp:~laurynas-biveinis/percona-pam-for-mysql/autotools-fixes into lp:percona-pam-for-mysql. > > Requested reviews: > pam-for-mysql-developers (pam-for-mysql-developers) > > For more details, see: > https://code.launchpad.net/~laurynas-biveinis/percona-pam-for-mysql/autotools-fixes/+merge/80753 > > Autotools build system fixes and improvements, partially based on > https://code.launchpad.net/~maria-captains/percona-pam-for-mysql/use_dialog: > - Add ignores for additional autotools spam and built binary > distributions. > - Make executable bootstrap. > - Use config header config.h instead of enumerating configure check > results in compilation command line. > - Do not check for tools that are not directly used in configure.ac. > - Fix --with-mysql_config configure option and mysql_config check if > that option was not specified. > - Use AS_IF instead of if in configure.ac. > - Do not treat MYSQL_INCLUDES as a separate configure output variable, > just fold it to CPPFLAGS instead. > - Replace "-I" with "-isystem " in mysql_config --include output to > silence compilation warnings coming from MySQL headers. > - Test for mysql/plugin_auth.h header too. > - Do not test for strchr and strdup. > - Get bzr revision number in a simpler way. > > -- > https://code.launchpad.net/~laurynas-biveinis/percona-pam-for-mysql/autotools-fixes/+merge/80753 > Your team pam-for-mysql-developers is requested to review the proposed merge of lp:~laurynas-biveinis/percona-pam-for-mysql/autotools-fixes into lp:percona-pam-for-mysql. > === modified file 'configure.ac' > --- configure.ac 2011-10-21 21:37:36 +0000 > +++ configure.ac 2011-10-30 12:19:26 +0000 > @@ -21,31 +20,22 @@ > AC_CONFIG_SRCDIR([src/lib_auth_pam_client.h]) > AM_INIT_AUTOMAKE > > -# Checks for programs. > -AC_PROG_CXX > -AC_PROG_AWK > +AC_CONFIG_HEADERS([config.h]) > + > AC_PROG_CC > -AC_PROG_CPP > -AC_PROG_INSTALL > -AC_PROG_LN_S > -AC_PROG_MAKE_SET > -AC_PROG_RANLIB > AC_PROG_LIBTOOL > - > +AC_PROG_SED > AC_CHECK_PROGS([BZR], [bzr]) > > -# mysql_config > AC_ARG_WITH([mysql_config], > AC_HELP_STRING( > - [--with-mysql_config=PROGRAM], > + [--with-mysql_config=PATH], > [location of the mysql_config program]), > - [mysql_config_prog="$withval"]) > -AC_PATH_PROG([MYSQL_CONFIG], [mysql_config], [$mysql_config_prog]) > + [MYSQL_CONFIG="$with_mysql_config"]) > +AC_PATH_PROG([MYSQL_CONFIG], [mysql_config]) It looks like you first get MYSQL_CONFIG from the command line, and then overwrite it with AC_PATH_PROG(). So, whatever user has specified in --with-mysql_config will have no effect. > -if test "x$MYSQL_CONFIG" = "x" > -then > - AC_MSG_ERROR([Unable to find mysql_config. Please install or specify.]) > -fi > +AS_IF([test "x${MYSQL_CONFIG}" = x], > + [AC_MSG_ERROR([Unable to find mysql_config. Please install or specify.])]) > > # Checks for libraries. > AC_CHECK_LIB([pam], [pam_start], , > @@ -53,48 +43,28 @@ > [Unable to find PAM. Please install the PAM development libraries]) > ) > > -# Checks for header files. > -MYSQL_INCLUDES="$(mysql_config --include)" > - > -save_CFLAGS="${CFLAGS}" > -save_CPPFLAGS="${CPPFLAGS}" > - > -CFLAGS="${CFLAGS} ${MYSQL_INCLUDES}" > +# Replace -I with -isystem MySQL header include GCC options to silence warnings > +# originating from them > +MYSQL_INCLUDES=`"${MYSQL_CONFIG}" --include | "${SED}" 's@^-I@-isystem @'` Don't understand that :( > CPPFLAGS="${CPPFLAGS} ${MYSQL_INCLUDES}" > > -AC_CHECK_HEADERS([string.h unistd.h]) > -AC_CHECK_HEADER([mysql/plugin.h], [], > +AC_CHECK_HEADERS([mysql/plugin.h mysql/plugin_auth.h], [], > AC_MSG_ERROR( > - [Unable to find mysql/plugin.h. Please install the mysql > - development headers])) > - > -CFLAGS="${save_CFLAGS}" > -CPPFLAGS="${save_CPPFLAGS}" > - > -AC_SUBST([MYSQL_INCLUDES]) > - > -# Checks for typedefs, structures, and compiler characteristics. > + [Unable to find MySQL development headers. Please install them])) > > # Checks for library functions. > AC_FUNC_MALLOC > -AC_CHECK_FUNCS([getpass strchr strdup]) > +AC_CHECK_FUNCS([getpass]) I don't remember seeing #ifdef HAVE_GETPASS in the sources. And if you don't use HAVE_GETPASS, there's no reason to use AC_CHECK_FUNCS([getpass]) Regards, Sergei