Patrick Williams | 0be05ee | 2016-12-09 14:30:45 -0600 | [diff] [blame^] | 1 | # Initialization |
| 2 | AC_PREREQ([2.69]) |
| 3 | AC_INIT([phosphor-dbus-interfaces], [1.0], [https://github.com/openbmc/phosphor-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 | |
| 8 | # Checks for programs. |
| 9 | AC_PROG_CXX |
| 10 | AC_PROG_CC |
| 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 | |
| 19 | # Checks for libraries. |
| 20 | PKG_CHECK_MODULES([SYSTEMD], [libsystemd >= 221],, |
| 21 | [AC_MSG_ERROR(["systemd required and not found."])]) |
| 22 | # TODO: Add sdbusplus. |
| 23 | |
| 24 | # Checks for header files. |
| 25 | |
| 26 | # Checks for typedefs, structures, and compiler characteristics. |
| 27 | AX_CXX_COMPILE_STDCXX_14([noext]) |
| 28 | AX_APPEND_COMPILE_FLAGS([-Wall -Werror], [CFLAGS]) |
| 29 | AX_APPEND_COMPILE_FLAGS([-Wall -Werror], [CXXFLAGS]) |
| 30 | |
| 31 | # Checks for library functions. |
| 32 | LT_INIT([dlopen disable-static shared]) |
| 33 | LT_LIB_DLLOAD |
| 34 | |
| 35 | # Create configured output |
| 36 | AC_CONFIG_FILES([Makefile.interfaces], |
| 37 | [./generate_makefile.sh > Makefile.interfaces]) |
| 38 | AC_CONFIG_FILES([Makefile]) |
| 39 | AC_OUTPUT |