libsxmp/configure.ac

80 lines
1.8 KiB
Plaintext
Raw Normal View History

2014-11-24 13:46:57 +02:00
dnl Process this file with autoconf to produce a configure script.
AC_INIT(libsxmp, m4_esyscmd([tr -d '\n' < VERSION]))
2014-11-24 13:46:57 +02:00
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE([1.11])
AM_SILENT_RULES([yes])
AC_PROG_CC
LT_INIT
dnl *****************
dnl ***** options *****
dnl *****************
dnl Build basic examples option
AC_ARG_ENABLE([build_examples],
AS_HELP_STRING([--enable-build-examples], [Enable examples build]))
2014-11-24 13:46:57 +02:00
AS_IF([test "x$enable_build_examples" = "xyes"], [
AC_DEFINE([BUILD_EXAMPLES], 1, [build of examples enabled])
2015-08-01 02:03:43 +03:00
])
AM_CONDITIONAL(BUILD_EXAMPLES, test "x$enable_build_examples" = "xyes")
2015-08-01 02:03:43 +03:00
dnl Build smpf example daemon and client option
AC_ARG_ENABLE([build_smpf_example],
AS_HELP_STRING([--enable-build-smpf-example], [Enable to build smpf advanced example, requires readline]))
AS_IF([test "x$enable_build_smpf_example" = "xyes"], [
AC_DEFINE([BUILD_SMPF_EXAMPLE], 1, [build of smpf example enabled])
])
AM_CONDITIONAL(BUILD_SMPF_EXAMPLE, test "x$enable_build_smpf_example" = "xyes")
dnl checking fpr dependencies
2015-03-05 23:58:55 +04:00
PKG_CHECK_MODULES(OPENSSL, [openssl])
PKG_CHECK_MODULES(LIBTDATA, [libtdata >= 0.2.2])
PKG_CHECK_MODULES(LIBSEXPR, [libsexpr >= 1.3.1])
2015-03-05 23:58:55 +04:00
2015-11-15 02:33:29 +03:00
case $host_os in
linux*) WIN32=no
LINUX=yes
PKG_CHECK_MODULES(LIBUUID, [uuid]);;
mingw*) WIN32=yes
LINUX=no;;
msys*) WIN32=yes
LINUX=no;;
esac
case $enable_build_smpf_example in
yes)
sic_save_LIBS=$LIBS
AC_CHECK_LIB(readline, readline)
if test x"${ac_cv_lib_readline_readline}" = xno; then
AC_MSG_ERROR(libreadline not found)
fi
LIBS=$sic_save_LIBS
;;
esac
2015-11-15 02:33:29 +03:00
AM_CONDITIONAL(COND_WIN32, test "x$WIN32" = "xyes")
2015-11-15 02:33:29 +03:00
dnl AM_CONDITIONAL(BUILD_WIN32, test "x$enable_win32_build" = "xyes")
2015-03-05 23:58:55 +04:00
2014-11-24 13:46:57 +02:00
AC_OUTPUT([
Makefile
lib/libsxmp.pc
2014-11-24 13:46:57 +02:00
lib/Makefile
include/Makefile
man/Makefile
examples/Makefile])