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.
Hi, Laurynas!
On Oct 30, Laurynas Biveinis wrote: mysql-developer s (pam-for- mysql-developer s) /code.launchpad .net/~laurynas- biveinis/ percona- pam-for- mysql/autotools -fixes/ +merge/ 80753 /code.launchpad .net/~maria- captains/ percona- pam-for- mysql/use_ dialog: /code.launchpad .net/~laurynas- biveinis/ percona- pam-for- mysql/autotools -fixes/ +merge/ 80753 mysql-developer s is requested to review the proposed merge of lp:~laurynas-biveinis/percona-pam-for-mysql/autotools-fixes into lp:percona-pam-for-mysql.
> Laurynas Biveinis has proposed merging lp:~laurynas-biveinis/percona-pam-for-mysql/autotools-fixes into lp:percona-pam-for-mysql.
>
> Requested reviews:
> pam-for-
>
> For more details, see:
> https:/
>
> Autotools build system fixes and improvements, partially based on
> https:/
> - 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:/
> Your team pam-for-
> === modified file 'configure.ac' SRCDIR( [src/lib_ auth_pam_ client. h]) HEADERS( [config. h]) PROGS([ BZR], [bzr]) WITH([mysql_ config] , mysql_config= PROGRAM] , mysql_config= PATH], config_ prog="$ withval" ]) PROG([MYSQL_ CONFIG] , [mysql_config], [$mysql_ config_ prog]) CONFIG= "$with_ mysql_config" ]) PROG([MYSQL_ CONFIG] , [mysql_config])
> --- configure.ac 2011-10-21 21:37:36 +0000
> +++ configure.ac 2011-10-30 12:19:26 +0000
> @@ -21,31 +20,22 @@
> AC_CONFIG_
> AM_INIT_AUTOMAKE
>
> -# Checks for programs.
> -AC_PROG_CXX
> -AC_PROG_AWK
> +AC_CONFIG_
> +
> 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_
>
> -# mysql_config
> AC_ARG_
> AC_HELP_STRING(
> - [--with-
> + [--with-
> [location of the mysql_config program]),
> - [mysql_
> -AC_PATH_
> + [MYSQL_
> +AC_PATH_
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" ERROR([ Unable to find mysql_config. Please install or specify.]) ERROR([ Unable to find mysql_config. Please install or specify.])]) INCLUDES= "$(...
> -then
> - AC_MSG_
> -fi
> +AS_IF([test "x${MYSQL_CONFIG}" = x],
> + [AC_MSG_
>
> # 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_