Switch to newer autotools

This commit is contained in:
Sergey Poznyakoff 2023-06-02 20:27:38 +03:00
parent a52fff3061
commit 48dff4f38c
2 changed files with 20 additions and 21 deletions

View file

@ -15,7 +15,7 @@
AC_DEFUN([PM_ENABLE],[
AC_ARG_ENABLE($1,
AC_HELP_STRING([--disable-$1], [Disable pam_$1]),
AS_HELP_STRING([--disable-$1], [Disable pam_$1]),
[build_$1=$enableval],
[build_$1=m4_if([$2],[],yes,probe)])
m4_pushdef([upmodname],translit($1, [a-z.-], [A-Z__]))

View file

@ -14,14 +14,14 @@
# You should have received a copy of the GNU General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
AC_PREREQ(2.63)
AC_PREREQ([2.71])
AC_INIT(pam-modules, 2.5.90, bug-pam-modules@gnu.org.ua)
AC_INIT([pam-modules],[2.5.90],[bug-pam-modules@gnu.org.ua])
AC_CONFIG_SRCDIR(pam_fshadow/pam_fshadow.c)
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([1.11 no-exeext tar-ustar dist-xz silent-rules subdir-objects])
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE([1.16.5 no-exeext tar-ustar dist-xz silent-rules subdir-objects])
AC_CONFIG_HEADERS([config.h])
# Enable silent rules by default:
AM_SILENT_RULES([yes])
@ -35,7 +35,7 @@ dnl Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL
AM_DISABLE_STATIC
AC_DISABLE_STATIC([])
LT_PREREQ(2.2.5a)
LT_INIT
@ -44,7 +44,7 @@ AC_CHECK_LIB(pam, pam_get_item,:,
[AC_MSG_ERROR([Required library libpam is not found])])
AC_ARG_WITH(crypt-lib,
AC_HELP_STRING([--with-crypt-lib=LIB],
AS_HELP_STRING([--with-crypt-lib=LIB],
[use -lLIB instead of -lcrypt]),
[cryptlib=$withval],
[cryptlib=crypt])
@ -59,7 +59,6 @@ AC_CHECK_LIB(pam_misc, pam_misc_setenv,
AC_DEFINE([HAVE_PAM_MISC_SETENV],1)],:,[-lpam])
dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(security/pam_appl.h security/pam_modules.h,
:,
AC_MSG_ERROR([Required PAM header files not found]))
@ -89,20 +88,20 @@ PM_ENABLE(groupmember)
# Check for SQL support
AC_ARG_WITH(mysql,
AC_HELP_STRING([--without-mysql],
AS_HELP_STRING([--without-mysql],
[Configure to work without MySQL]),
[want_mysql=$withval])
AC_ARG_WITH(pgsql,
AC_HELP_STRING([--without-pgsql],
AS_HELP_STRING([--without-pgsql],
[Configure to work without Postgres]),
[want_pgsql=$withval])
AC_ARG_WITH(postgres,
AC_HELP_STRING([--without-postgres],
AS_HELP_STRING([--without-postgres],
[Same as --without-pgsql]),
[want_pgsql=$withval])
AC_ARG_WITH(sql,
AC_HELP_STRING([--without-sql],
[Do not build SQL dependent modules]),
AS_HELP_STRING([--without-sql],
[Do not build SQL dependent modules]),
[want_mysql=$withval
want_pgsql=$withval])
@ -188,15 +187,15 @@ esac])
## debugging support
## *****************
AC_ARG_ENABLE(debug,
AC_HELP_STRING([--enable-debug], [enable debugging mode]),
AS_HELP_STRING([--enable-debug],[enable debugging mode]),
[if test "$enableval" = yes; then
if test "$GCC" = yes; then
AC_MSG_CHECKING(whether gcc accepts -ggdb)
save_CFLAGS=$CFLAGS
CFLAGS="-ggdb -Wall"
AC_TRY_COMPILE([],void f(){},
AC_MSG_RESULT(yes),
[if test x"$ac_cv_prog_cc_g" = xyes; then
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[void f(){}]])],
[AC_MSG_RESULT(yes)],
[if test x"$ac_cv_prog_cc_g" = xyes; then
CFLAGS="-g -Wall"
else
CFLAGS=
@ -212,8 +211,7 @@ AC_ARG_ENABLE(debug,
## **************
PAMDIR='$(prefix)/lib/security'
AC_ARG_WITH(pamdir,
AC_HELP_STRING([--with-pamdir=DIR],
[install PAM modiles in DIR (PREFIX/lib/security)]),
AS_HELP_STRING([--with-pamdir=DIR],[install PAM modiles in DIR (PREFIX/lib/security)]),
[PAMDIR=$withval])
AC_SUBST(PAMDIR)
@ -258,7 +256,7 @@ build_umotd=$build_umotd
build_groupmember=$build_groupmember
build_innetgr=$build_innetgr])
AC_OUTPUT(Makefile
AC_CONFIG_FILES([Makefile
doc/Makefile
examples/Makefile
lib/Makefile
@ -270,4 +268,5 @@ AC_OUTPUT(Makefile
pam_umotd/Makefile
pam_groupmember/Makefile
pam_innetgr/Makefile
pamck/Makefile)
pamck/Makefile])
AC_OUTPUT