blob: d74c18596a88401a26393d9bda28ead384e1e9ec [file] [log] [blame]
Deepak Kodihalli77bc0092017-03-14 07:17:01 -05001# Initialization
2AC_PREREQ([2.69])
3AC_INIT([openpower-dbus-interfaces], [1.0], [https://github.com/openbmc/openpower-dbus-interfaces])
4AC_CONFIG_HEADERS([config.h])
5AM_INIT_AUTOMAKE([subdir-objects -Wall -Werror foreign dist-xz])
6AM_SILENT_RULES([yes])
7AC_LANG([C++])
8
9# Checks for programs.
10AC_PROG_CXX
11AM_PROG_AR
12AC_PROG_INSTALL
13AC_PROG_MAKE_SET
14AC_PROG_SED
15AC_CHECK_PROG([FIND], find, find)
16AC_CHECK_PROG([BASENAME], basename, basename)
17AC_CHECK_PROG([DIRNAME], dirname, dirname)
18
Deepak Kodihalli07ad0642017-03-14 08:31:59 -050019AC_ARG_ENABLE([libopenpower_dbus],
20 AS_HELP_STRING([--disable-libopenpower_dbus], [Disable libopenpower_dbus]))
Deepak Kodihalli77bc0092017-03-14 07:17:01 -050021
Deepak Kodihalli07ad0642017-03-14 08:31:59 -050022AM_CONDITIONAL([WANT_LIBOPENPOWER_DBUS], [test "x$enable_libopenpower_dbus" != "xno"])
Deepak Kodihalli77bc0092017-03-14 07:17:01 -050023
Deepak Kodihalli07ad0642017-03-14 08:31:59 -050024AS_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 Kodihalli77bc0092017-03-14 07:17:01 -050028
Deepak Kodihalli07ad0642017-03-14 08:31:59 -050029 # Check for baseline language coverage in the compiler for the C++14 standard
30 AX_CXX_COMPILE_STDCXX_14([noext])
31 AX_APPEND_COMPILE_FLAGS([-Wall -Werror], [CFLAGS])
32 AX_APPEND_COMPILE_FLAGS([-Wall -Werror], [CXXFLAGS])
33
34 # Checks for library functions.
35 LT_INIT([dlopen disable-static shared])
36 LT_LIB_DLLOAD
37
38 # Create configured output
39 AC_CONFIG_FILES([Makefile.interfaces],
40 [${srcdir}/generate_makefile.sh ${srcdir} > Makefile.interfaces])
41 AC_CONFIG_FILES([openpower-dbus-interfaces.pc])
42])
43AC_CONFIG_FILES([Makefile.yaml],
44 [${srcdir}/generate_yaml_makefile.sh ${srcdir} > Makefile.yaml])
Deepak Kodihalli77bc0092017-03-14 07:17:01 -050045
46AC_CONFIG_FILES([Makefile])
Deepak Kodihalli77bc0092017-03-14 07:17:01 -050047AC_OUTPUT