2 # Process this file with autoconf to produce a configure script.
3 ACLOCAL_AMFLAGS = -I m4 --install
6 AC_INIT([MakeAppImage], [0.1.0])
8 # Put autogenerated stuff in subdir cfg, that must be created
9 # externally. This macro must be set before calling AC_INIT_AUTOMAKE
10 AC_CONFIG_AUX_DIR(cfg)
12 AM_INIT_AUTOMAKE([foreign])
13 AC_CONFIG_SRCDIR([./main.cpp])
14 AC_CONFIG_HEADERS([config.h])
15 AC_CONFIG_FILES([Makefile])
17 # Checks for programs.
23 # Checks for needed executables, libraries and headers which are
24 # not optional. If missing, treat as fatal error.
26 # Test function copied from Cinelerra-GG.
27 # But for some reason I get a syntax error. TODO MatN
28 AC_DEFUN([REQUIRE_PROG], [
30 if test "x$PROG_$1" = "xno"; then
31 AC_MSG_ERROR([$2 is missing and required.])
36 #REQUIRE_PROG(OBJCOPY, [objcopy])
37 #REQUIRE_PROG(PATCHELF, [patchelf])
39 # Note: objcopy is only required because configure creates a
40 # Makefile with -g in the compile options, which generates debug info.
41 # It also creates a compile option -I. which is not needed. With
42 # this option, you get boost compile errors, unless the include files
43 # are in a different directory. Sources have been adjusted accordingly. TODO MatN
46 # If a development header is present, then almost certainly
47 # the library itself is present too, enforced by the package
51 AC_CHECK_HEADER([boost/filesystem.hpp], ,[ AC_MSG_ERROR([header is missing and required.]) ])
52 AC_CHECK_HEADER([boost/filesystem/path.hpp], ,[ AC_MSG_ERROR([header is missing and required.]) ])
53 AC_CHECK_HEADER([boost/regex.hpp], ,[ AC_MSG_ERROR([header is missing and required.]) ])
56 AC_CHECK_HEADER([libpng16/png.h], ,[ AC_MSG_ERROR([header is missing and required.]) ])
57 AC_CHECK_HEADER([zlib.h], ,[ AC_MSG_ERROR([header is missing and required.]) ])
58 AC_CHECK_HEADER([jpeglib.h], ,[ AC_MSG_ERROR([header is missing and required.]) ])
61 # Don't use += construct, that is from bash and will not work
64 CXXFLAGS="$CXXFLAGS -DBOOST_NO_CXX11_SCOPED_ENUMS"
65 CXXFLAGS="$CXXFLAGS -Dcimg_display=0 -Dcimg_use_jpeg=1 -Dcimg_use_png=1"
66 LIBS=" -lpng16 -lz -ljpeg -lboost_filesystem -lboost_regex -lstdc++"
68 # Checks for libraries.
70 # Checks for header files.
72 AC_CHECK_HEADERS([fcntl.h memory.h sys/time.h unistd.h])
74 # Checks for typedefs, structures, and compiler characteristics.
75 AC_CHECK_HEADER_STDBOOL
85 AC_CHECK_TYPES([ptrdiff_t])
87 # Checks for library functions.
91 AC_CHECK_FUNCS([dup2 floor gettimeofday memmove memset munmap pow realpath select sqrt strcasecmp strchr strdup strerror strncasecmp strrchr strstr])
93 # Must be last macro in the file.