Richard Marian Thomaiyar | 216f213 | 2018-06-12 19:20:48 +0530 | [diff] [blame] | 1 | # Initialization |
| 2 | AC_PREREQ([2.69]) |
| 3 | AC_INIT([pam_ipmi], [0.1], [https://github.com/openbmc/pam-ipmi/issues]) |
| 4 | AC_CONFIG_HEADERS([config.h]) |
Patrick Venture | 78ba6e9 | 2018-11-25 10:06:51 -0800 | [diff] [blame] | 5 | AC_CONFIG_MACRO_DIRS([m4]) |
| 6 | AC_CONFIG_AUX_DIR([build-aux]) |
Richard Marian Thomaiyar | 216f213 | 2018-06-12 19:20:48 +0530 | [diff] [blame] | 7 | AM_INIT_AUTOMAKE([subdir-objects -Wall foreign dist-xz]) |
| 8 | AM_SILENT_RULES([yes]) |
| 9 | |
| 10 | AC_SUBST(PACKAGE) |
| 11 | AC_SUBST(VERSION) |
Tim Lee | 8e5d061 | 2022-11-09 11:21:32 +0800 | [diff] [blame] | 12 | AC_SUBST([TARGET_OS_ARCH]) |
Richard Marian Thomaiyar | 216f213 | 2018-06-12 19:20:48 +0530 | [diff] [blame] | 13 | |
| 14 | # Checks for programs |
Patrick Venture | 6987da9 | 2018-11-23 08:47:25 -0800 | [diff] [blame] | 15 | AM_PROG_AR |
Richard Marian Thomaiyar | 216f213 | 2018-06-12 19:20:48 +0530 | [diff] [blame] | 16 | AC_PROG_CC |
| 17 | AC_PROG_INSTALL |
| 18 | AC_PROG_MAKE_SET |
| 19 | |
Tim Lee | 8e5d061 | 2022-11-09 11:21:32 +0800 | [diff] [blame] | 20 | # Checks for arch |
| 21 | AC_CANONICAL_TARGET |
| 22 | TARGET_OS_ARCH="" |
| 23 | AS_CASE([$target_cpu], |
| 24 | [x86_64|aarch64*|mips64*|ppc64*|sparc64], |
| 25 | [ |
| 26 | TARGET_OS_ARCH="64" |
| 27 | ], |
| 28 | [i?86|arm*|mips*|ppc*|sparc], |
| 29 | [ |
| 30 | TARGET_OS_ARCH="32" |
| 31 | ]) |
| 32 | |
Patrick Venture | 58a6879 | 2018-11-23 08:53:32 -0800 | [diff] [blame] | 33 | AX_CHECK_OPENSSL([], [AC_MSG_ERROR(["openssl required and not found"])]) |
Patrick Venture | bca65ee | 2018-11-23 15:32:18 -0800 | [diff] [blame] | 34 | AC_CHECK_LIB([pam], [pam_start], [], [AC_MSG_ERROR([libpam not found])]) |
Patrick Venture | 58a6879 | 2018-11-23 08:53:32 -0800 | [diff] [blame] | 35 | |
Richard Marian Thomaiyar | 216f213 | 2018-06-12 19:20:48 +0530 | [diff] [blame] | 36 | # Checks for library functions. |
| 37 | LT_INIT # Removes 'unrecognized options: --with-libtool-sysroot |
| 38 | |
| 39 | # Create configured output |
| 40 | AC_CONFIG_FILES([Makefile]) |
| 41 | AC_OUTPUT |