Deepak Kodihalli | 77bc009 | 2017-03-14 07:17:01 -0500 | [diff] [blame] | 1 | # Initialization |
| 2 | AC_PREREQ([2.69]) |
| 3 | AC_INIT([openpower-dbus-interfaces], [1.0], [https://github.com/openbmc/openpower-dbus-interfaces]) |
| 4 | AC_CONFIG_HEADERS([config.h]) |
| 5 | AM_INIT_AUTOMAKE([subdir-objects -Wall -Werror foreign dist-xz]) |
| 6 | AM_SILENT_RULES([yes]) |
| 7 | AC_LANG([C++]) |
| 8 | |
| 9 | # Checks for programs. |
| 10 | AC_PROG_CXX |
| 11 | AM_PROG_AR |
| 12 | AC_PROG_INSTALL |
| 13 | AC_PROG_MAKE_SET |
| 14 | AC_PROG_SED |
| 15 | AC_CHECK_PROG([FIND], find, find) |
| 16 | AC_CHECK_PROG([BASENAME], basename, basename) |
| 17 | AC_CHECK_PROG([DIRNAME], dirname, dirname) |
| 18 | |
Deepak Kodihalli | 07ad064 | 2017-03-14 08:31:59 -0500 | [diff] [blame] | 19 | AC_ARG_ENABLE([libopenpower_dbus], |
| 20 | AS_HELP_STRING([--disable-libopenpower_dbus], [Disable libopenpower_dbus])) |
Deepak Kodihalli | 77bc009 | 2017-03-14 07:17:01 -0500 | [diff] [blame] | 21 | |
Deepak Kodihalli | 07ad064 | 2017-03-14 08:31:59 -0500 | [diff] [blame] | 22 | AM_CONDITIONAL([WANT_LIBOPENPOWER_DBUS], [test "x$enable_libopenpower_dbus" != "xno"]) |
Deepak Kodihalli | 77bc009 | 2017-03-14 07:17:01 -0500 | [diff] [blame] | 23 | |
Deepak Kodihalli | 07ad064 | 2017-03-14 08:31:59 -0500 | [diff] [blame] | 24 | AS_IF([test "x$enable_libopenpower_dbus" != "xno"], [ |
| 25 | AC_PATH_PROG([SDBUSPLUSPLUS], [sdbus++]) |
| 26 | AS_IF([test "x$SDBUSPLUSPLUS" == "x"], |
| 27 | AC_MSG_ERROR([Cannot find sdbus++])) |
Deepak Kodihalli | 77bc009 | 2017-03-14 07:17:01 -0500 | [diff] [blame] | 28 | |
Brad Bishop | 2f7e675 | 2019-02-14 13:22:56 -0500 | [diff] [blame] | 29 | # Checks for libraries. |
| 30 | AX_PKG_CHECK_MODULES([SYSTEMD], [], [libsystemd >= 221], [],) |
| 31 | AX_PKG_CHECK_MODULES([SDBUSPLUS], [], [sdbusplus], [],) |
| 32 | |
Deepak Kodihalli | 07ad064 | 2017-03-14 08:31:59 -0500 | [diff] [blame] | 33 | # Check for baseline language coverage in the compiler for the C++14 standard |
Vernon Mauery | 998a82e | 2018-10-04 10:00:59 -0700 | [diff] [blame] | 34 | AX_CXX_COMPILE_STDCXX_17([noext]) |
Deepak Kodihalli | 07ad064 | 2017-03-14 08:31:59 -0500 | [diff] [blame] | 35 | AX_APPEND_COMPILE_FLAGS([-Wall -Werror], [CFLAGS]) |
| 36 | AX_APPEND_COMPILE_FLAGS([-Wall -Werror], [CXXFLAGS]) |
| 37 | |
| 38 | # Checks for library functions. |
| 39 | LT_INIT([dlopen disable-static shared]) |
| 40 | LT_LIB_DLLOAD |
| 41 | |
| 42 | # Create configured output |
| 43 | AC_CONFIG_FILES([Makefile.interfaces], |
| 44 | [${srcdir}/generate_makefile.sh ${srcdir} > Makefile.interfaces]) |
| 45 | AC_CONFIG_FILES([openpower-dbus-interfaces.pc]) |
| 46 | ]) |
| 47 | AC_CONFIG_FILES([Makefile.yaml], |
| 48 | [${srcdir}/generate_yaml_makefile.sh ${srcdir} > Makefile.yaml]) |
Deepak Kodihalli | 77bc009 | 2017-03-14 07:17:01 -0500 | [diff] [blame] | 49 | |
| 50 | AC_CONFIG_FILES([Makefile]) |
Deepak Kodihalli | 77bc009 | 2017-03-14 07:17:01 -0500 | [diff] [blame] | 51 | AC_OUTPUT |