2015-05-23 13:35:12 +02:00
|
|
|
#----------------------------------------------------------------------
|
|
|
|
# configure.ac - the Final Cut library
|
|
|
|
#----------------------------------------------------------------------
|
|
|
|
|
|
|
|
# Process this file with autoconf to produce a configure script.
|
|
|
|
|
2018-12-09 18:24:31 +01:00
|
|
|
AC_INIT([finalcut], [0.5.1])
|
2015-08-22 18:53:52 +02:00
|
|
|
AC_CONFIG_HEADER([config.h])
|
2018-09-21 07:06:18 +02:00
|
|
|
AX_PREFIX_CONFIG_H([src/include/final/fconfig.h], [F])
|
2015-05-23 13:35:12 +02:00
|
|
|
AC_CONFIG_SRCDIR([src/fobject.cpp])
|
2018-09-22 01:11:05 +02:00
|
|
|
AC_USE_SYSTEM_EXTENSIONS
|
2015-05-23 13:35:12 +02:00
|
|
|
AM_INIT_AUTOMAKE
|
|
|
|
AC_PROG_CC
|
|
|
|
AC_PROG_CXX
|
|
|
|
|
|
|
|
# Checks for header files.
|
|
|
|
AC_HEADER_STDC
|
|
|
|
AC_CHECK_HEADERS( \
|
|
|
|
linux/fb.h \
|
|
|
|
sys/io.h \
|
|
|
|
sys/kd.h \
|
|
|
|
sys/stat.h \
|
|
|
|
sys/time.h \
|
|
|
|
fcntl.h \
|
|
|
|
langinfo.h \
|
|
|
|
term.h \
|
|
|
|
termios.h \
|
2017-12-14 00:35:10 +01:00
|
|
|
ttyent.h \
|
2015-05-23 13:35:12 +02:00
|
|
|
unistd.h \
|
|
|
|
cmath \
|
|
|
|
csignal \
|
|
|
|
cstdlib \
|
|
|
|
list \
|
|
|
|
map \
|
|
|
|
queue \
|
|
|
|
vector)
|
|
|
|
|
2017-12-14 00:35:10 +01:00
|
|
|
# Checks for library functions.
|
|
|
|
AC_CHECK_FUNCS( \
|
|
|
|
getuid \
|
|
|
|
geteuid \
|
|
|
|
getttynam \
|
|
|
|
select \
|
|
|
|
strdup \
|
|
|
|
strstr \
|
|
|
|
vsnprintf )
|
|
|
|
|
2015-05-23 13:35:12 +02:00
|
|
|
# Checks for 'tgetent'
|
|
|
|
AC_SEARCH_LIBS([tgetent], [termcap tinfo curses ncurses])
|
2015-07-09 02:15:12 +02:00
|
|
|
# Checks for 'tparm'
|
|
|
|
AC_SEARCH_LIBS([tparm], [termcap tinfo curses ncurses])
|
2015-05-23 13:35:12 +02:00
|
|
|
|
|
|
|
# Checks for libtool
|
2015-09-18 21:38:26 +02:00
|
|
|
AC_ENABLE_SHARED
|
|
|
|
AC_ENABLE_STATIC
|
2018-12-06 22:31:33 +01:00
|
|
|
AC_LANG([C++])
|
2015-05-23 13:35:12 +02:00
|
|
|
LT_INIT([dlopen])
|
|
|
|
LT_LANG([C++])
|
|
|
|
LT_OUTPUT
|
|
|
|
|
|
|
|
### This defines the version number of the installed .so files
|
2015-12-19 22:01:48 +01:00
|
|
|
### Update this value for every release! (A:B:C will map to foo.so.(A-C).C.B)
|
2015-05-23 13:35:12 +02:00
|
|
|
### using libtool's versioning system.
|
2018-12-09 18:24:31 +01:00
|
|
|
AC_SUBST(SO_VERSION, ["5:1:5"])
|
2015-05-23 13:35:12 +02:00
|
|
|
|
|
|
|
AC_SUBST([LIBTOOL_DEPS])
|
|
|
|
|
|
|
|
AC_CONFIG_MACRO_DIR([m4])
|
|
|
|
|
2018-09-20 04:47:51 +02:00
|
|
|
AC_CONFIG_FILES([Makefile
|
|
|
|
src/Makefile
|
|
|
|
fonts/Makefile
|
|
|
|
doc/Makefile
|
|
|
|
examples/Makefile
|
2018-09-21 07:06:18 +02:00
|
|
|
test/Makefile
|
2018-09-20 04:59:04 +02:00
|
|
|
finalcut.spec
|
2018-09-20 04:47:51 +02:00
|
|
|
finalcut.pc])
|
2015-05-23 13:35:12 +02:00
|
|
|
|
2018-12-06 02:28:24 +01:00
|
|
|
# Check for C++11 support
|
|
|
|
AX_CHECK_COMPILE_FLAG([[-std=c++11]],,
|
|
|
|
[AC_MSG_ERROR([compiler did not accept -std=c++11])])
|
|
|
|
|
2015-05-23 13:35:12 +02:00
|
|
|
# use GPM (General Purpose Mouse)
|
|
|
|
AC_ARG_WITH([gpm],
|
|
|
|
[AS_HELP_STRING([--without-gpm], [Disable GPM mouse support])],
|
2016-12-22 12:27:11 +01:00
|
|
|
[with_gpm=no],
|
2015-05-23 13:35:12 +02:00
|
|
|
[with_gpm=yes])
|
2016-12-22 12:27:11 +01:00
|
|
|
if test "x$with_gpm" = "xyes"
|
2015-05-23 13:35:12 +02:00
|
|
|
then
|
|
|
|
AC_CHECK_LIB([gpm],
|
|
|
|
[main],
|
2016-12-22 12:27:11 +01:00
|
|
|
[AC_DEFINE([HAVE_LIBGPM], 1, [Define to 1 if GPM mouse is enabled])
|
|
|
|
LIBS="$LIBS -lgpm"])
|
2015-05-23 13:35:12 +02:00
|
|
|
fi
|
|
|
|
|
2015-10-15 02:37:02 +02:00
|
|
|
# profiling
|
|
|
|
AC_ARG_WITH([profiler],
|
|
|
|
[AS_HELP_STRING([--with-profiler], [build extra google profiler binaries])],
|
|
|
|
[with_profiler=yes],
|
|
|
|
[with_profiler=no])
|
|
|
|
if test "x$with_profiler" = "xyes"
|
|
|
|
then
|
|
|
|
AC_CHECK_LIB([profiler],
|
|
|
|
[ProfilerFlush],
|
|
|
|
[LIBS="$LIBS -lprofiler"])
|
|
|
|
fi
|
|
|
|
|
2018-02-25 21:42:18 +01:00
|
|
|
# unit test
|
|
|
|
AC_ARG_WITH([unit-test],
|
|
|
|
[AS_HELP_STRING([--with-unit-test], [build unit tests])],
|
|
|
|
[with_unit_test=yes],
|
|
|
|
[with_unit_test=no])
|
|
|
|
if test "x$with_unit_test" = "xyes"
|
|
|
|
then
|
|
|
|
AC_MSG_NOTICE(enabled cppunit test)
|
|
|
|
AM_PATH_CPPUNIT([1.12.0],
|
|
|
|
[],
|
|
|
|
[AC_MSG_ERROR([*** CppUnit not found! ***])])
|
|
|
|
AM_CONDITIONAL(CPPUNIT_TEST, [test "1" = "1"])
|
|
|
|
else
|
|
|
|
AM_CONDITIONAL(CPPUNIT_TEST, [test "1" = "0"])
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
2017-11-11 14:52:33 +01:00
|
|
|
# code coverage
|
|
|
|
AC_ARG_WITH([gcov],
|
|
|
|
[AS_HELP_STRING([--with-gcov], [build for code coverage testing])],
|
|
|
|
[with_gcov=yes],
|
|
|
|
[with_gcov=no])
|
|
|
|
if test "x$with_gcov" = "xyes"
|
|
|
|
then
|
|
|
|
AC_CHECK_LIB([gcov],
|
|
|
|
[main],
|
|
|
|
[LIBS="$LIBS -lgcov"])
|
|
|
|
AM_CXXFLAGS="-fprofile-arcs -ftest-coverage $AM_CXXFLAGS"
|
|
|
|
AC_SUBST([AM_CXXFLAGS])
|
|
|
|
fi
|
|
|
|
|
2015-05-23 13:35:12 +02:00
|
|
|
AC_OUTPUT
|