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])
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= "$(mysql_ config --include)" "${CFLAGS} " "${CPPFLAGS} " INCLUDES= `"${MYSQL_ CONFIG} " --include | "${SED}" 's@^-I@-isystem @'`
> -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_
> -
> -save_CFLAGS=
> -save_CPPFLAGS=
> -
> -CFLAGS="${CFLAGS} ${MYSQL_INCLUDES}"
> +# Replace -I with -isystem MySQL header include GCC options to silence warnings
> +# originating from them
> +MYSQL_
Don't understand that :(
> CPPFLAGS= "${CPPFLAGS} ${MYSQL_INCLUDES}" HEADERS( [string. h unistd.h]) HEADER( [mysql/ plugin. h], [], HEADERS( [mysql/ plugin. h mysql/plugin_ auth.h] , [], "${save_ CFLAGS} " "${save_ CPPFLAGS} " [MYSQL_ INCLUDES] ) FUNCS([ getpass strchr strdup]) FUNCS([ getpass] )
>
> -AC_CHECK_
> -AC_CHECK_
> +AC_CHECK_
> AC_MSG_ERROR(
> - [Unable to find mysql/plugin.h. Please install the mysql
> - development headers]))
> -
> -CFLAGS=
> -CPPFLAGS=
> -
> -AC_SUBST(
> -
> -# 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_
> +AC_CHECK_
I don't remember seeing
#ifdef HAVE_GETPASS
in the sources. And if you don't use HAVE_GETPASS, there's no reason to FUNCS([ getpass] )
use AC_CHECK_
Regards,
Sergei