Merge lp:~laurynas-biveinis/percona-pam-for-mysql/autotools-fixes into lp:percona-pam-for-mysql

Proposed by Laurynas Biveinis
Status: Merged
Approved by: Sergei Golubchik
Approved revision: no longer in the source branch.
Merged at revision: 11
Proposed branch: lp:~laurynas-biveinis/percona-pam-for-mysql/autotools-fixes
Merge into: lp:percona-pam-for-mysql
Diff against target: 0 lines
To merge this branch: bzr merge lp:~laurynas-biveinis/percona-pam-for-mysql/autotools-fixes
Reviewer Review Type Date Requested Status
Sergei Golubchik Pending
Review via email: mp+80753@code.launchpad.net

Description of the change

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.

To post a comment you must log in.
Revision history for this message
Sergei Golubchik (sergii) wrote :
Download full text (4.3 KiB)

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="$(...

Read more...

Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

2011/11/2 Sergei <email address hidden>:
>> -# 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.

It is actually the other way when --with-mysql_config has no effect.
If MYSQL_CONFIG is set by the time AC_PATH_PROG is executed, (i.e.
specified on the command line, then AC_PATH_PROG will just use that
value. I have tested the current behaviour.

>> +# 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 :(

We would like to have -Wall -Wextra clean build. But some of the MySQL
headers give warnings and we have no choice but to silence them by
treating as system not user headers, by using -isystem instead of -I.

> 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])

Ack. (will probably just remove getpass with dialog plugin)

--
Laurynas

10. By Laurynas Biveinis

Autotools build system fixes and improvements, partially based on
https://code.launchpad.net/~maria-captains/percona-pam-for-mysql/use_dialog:
- Require autoconf 2.59 (CentOS-5-shipped version) instead of 2.61.
- Enable compilation warnings.
- Add ignores for additional autotools spam and built binary
  distributions.
- Make bootstrap executable.
- 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.
- Error if getpass not found.
- Get the bzr revision number in a simpler way.

11. By Laurynas Biveinis

Merge from trunk

Preview Diff

Empty

Subscribers

People subscribed via source and target branches