mirror of
https://dev.iopsys.eu/bbf/icwmp.git
synced 2025-12-10 07:44:41 +01:00
126 lines
3.4 KiB
Text
126 lines
3.4 KiB
Text
AC_INIT([icwmp], [1.0], [dev@iopsys.eu])
|
|
AM_INIT_AUTOMAKE
|
|
AC_CONFIG_SRCDIR([cwmp.c])
|
|
|
|
AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects])
|
|
|
|
# additional options
|
|
|
|
AC_ARG_ENABLE(acs, [AS_HELP_STRING([--enable-acs],
|
|
[specify which ACS is going to be used; there are some optimizations available for HDM and Fusion ACS (default --enable-acs=multi]))],,
|
|
[AC_DEFINE(ACS_MULTI)])
|
|
|
|
AS_IF([test "x$enable_acs" = "xhdm"], [AC_DEFINE(ACS_HDM)])
|
|
AS_IF([test "x$enable_acs" = "xfusion"], [AC_DEFINE(ACS_FUSION)])
|
|
AS_IF([test "x$enable_acs" = "xmulti"], [AC_DEFINE(ACS_MULTI)])
|
|
AS_IF([test "x$enable_acs" = "xyes"], [AC_DEFINE(ACS_MULTI)])
|
|
AS_IF([test "x$enable_acs" = "xno"], [AC_DEFINE(ACS_MULTI)])
|
|
|
|
AC_ARG_ENABLE(libopenssl, [AS_HELP_STRING([--enable-libopenssl], [enable libopenssl feature])], AC_DEFINE(LOPENSSL))
|
|
AM_CONDITIONAL([LOPENSSL],[test "x$enable_libopenssl" = "xyes"])
|
|
|
|
AC_ARG_ENABLE(libwolfssl, [AS_HELP_STRING([--enable-libwolfssl], [enable libwolfssl feature])], AC_DEFINE(LWOLFSSL))
|
|
AM_CONDITIONAL([LWOLFSSL],[test "x$enable_libwolfssl" = "xyes"])
|
|
|
|
AC_ARG_ENABLE(libmbedtls, [AS_HELP_STRING([--enable-libmbedtls], [enable libmbedtls feature])], AC_DEFINE(LMBEDTLS))
|
|
AM_CONDITIONAL([LMBEDTLS],[test "x$enable_libmbedtls" = "xyes"])
|
|
|
|
# checks for programs
|
|
AC_PROG_CC
|
|
AM_PROG_CC_C_O
|
|
LT_INIT
|
|
AC_ENABLE_SHARED
|
|
|
|
# checks for libraries
|
|
LIBPTHREAD_LIBS='-lpthread'
|
|
AC_SUBST([LIBPTHREAD_LIBS])
|
|
|
|
# checks for libraries
|
|
LIBZ_LIBS='-lz'
|
|
AC_SUBST([LIBZ_LIBS])
|
|
|
|
LIBM_LIBS='-lm'
|
|
AC_SUBST([LIBM_LIBS])
|
|
LIBJSON_LIBS='-ljson-c'
|
|
AC_SUBST([LIBJSON_LIBS])
|
|
|
|
AC_ARG_WITH([uci-include-path],
|
|
[AS_HELP_STRING([--with-uci-include-path],
|
|
[location of the uci library headers])],
|
|
[LIBUCI_CFLAGS="-I$withval"])
|
|
AC_SUBST([LIBUCI_CFLAGS])
|
|
|
|
AC_ARG_WITH([uci-lib-path],
|
|
[AS_HELP_STRING([--with-uci-lib-path], [location of the uci library])], [LIBUCI_LDFLAGS="-L$withval"])
|
|
AC_SUBST([LIBUCI_LDFLAGS])
|
|
|
|
LIBUCI_LIBS='-luci'
|
|
AC_SUBST([LIBUCI_LIBS])
|
|
|
|
AC_ARG_WITH([libubox-include-path],
|
|
[AS_HELP_STRING([--with-libubox-include-path],
|
|
[location of the libubox library headers])],
|
|
[LIBUBOX_CFLAGS="-I$withval"])
|
|
AC_SUBST([LIBUBOX_CFLAGS])
|
|
|
|
AC_ARG_WITH([libubox-lib-path],
|
|
[AS_HELP_STRING([--with-libubox-lib-path], [location of the libubox library])], [LIBUBOX_LDFLAGS="-L$withval"])
|
|
AC_SUBST([LIBUBOX_LDFLAGS])
|
|
|
|
LIBUBOX_LIBS='-lubox'
|
|
AC_SUBST([LIBUBOX_LIBS])
|
|
|
|
AC_ARG_WITH([libubus-include-path],
|
|
[AS_HELP_STRING([--with-libubus-include-path],
|
|
[location of the libubus library headers])],
|
|
[LIBUBUS_CFLAGS="-I$withval"])
|
|
AC_SUBST([LIBUBUS_CFLAGS])
|
|
|
|
AC_ARG_WITH([libubus-lib-path],
|
|
[AS_HELP_STRING([--with-libubus-lib-path], [location of the libubus library])], [LIBUBOX_LDFLAGS="-L$withval"])
|
|
AC_SUBST([LIBUBUS_LDFLAGS])
|
|
|
|
LIBUBUS_LIBS='-lubus'
|
|
AC_SUBST([LIBUBUS_LIBS])
|
|
|
|
LBLOBMSG_LIBS='-lblobmsg_json'
|
|
AC_SUBST([LBLOBMSG_LIBS])
|
|
|
|
AM_COND_IF([LWOLFSSL], [
|
|
LSSL_LIBS='-lwolfssl'
|
|
LCRYPTO_LIBS='-lcrypto'
|
|
AC_SUBST([LSSL_LIBS])
|
|
AC_SUBST([LCRYPTO_LIBS])
|
|
])
|
|
|
|
AM_COND_IF([LOPENSSL], [
|
|
LSSL_LIBS='-lssl'
|
|
LCRYPTO_LIBS='-lcrypto'
|
|
AC_SUBST([LSSL_LIBS])
|
|
AC_SUBST([LCRYPTO_LIBS])
|
|
])
|
|
|
|
AM_COND_IF([LMBEDTLS], [
|
|
LSSL_LIBS='-lmbedtls'
|
|
LCRYPTO_LIBS='-lmbedcrypto'
|
|
AC_SUBST([LSSL_LIBS])
|
|
AC_SUBST([LCRYPTO_LIBS])
|
|
])
|
|
|
|
PKG_CHECK_MODULES(LIBCURL, [libcurl])
|
|
AC_SUBST(LIBCURL_CFLAGS)
|
|
AC_SUBST(LIBCURL_LDFLAGS)
|
|
AC_SUBST(LIBCURL_LIBS)
|
|
|
|
# checks for header files
|
|
AC_CHECK_HEADERS([stdlib.h string.h])
|
|
|
|
# checks for typedefs, structures, and compiler characteristics
|
|
AC_TYPE_UINT8_T
|
|
|
|
# Makefiles
|
|
AC_CONFIG_FILES([
|
|
Makefile
|
|
])
|
|
|
|
AC_OUTPUT
|