configure.ac 1.69 KB
Newer Older
1 2 3 4
#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ(2.61)
5
AC_INIT([Functy], [0.33], [david@flypig.co.uk])
6 7 8 9 10 11 12
AC_CONFIG_AUX_DIR([config])
AM_INIT_AUTOMAKE([-Wall -Werror])
AC_CONFIG_SRCDIR([src/functy.c])
AC_CONFIG_HEADERS([config.h])

# Checks for programs.
AC_PROG_CC
13
AC_PROG_CXX
14
AM_PROG_CC_C_O
15 16

# Checks for libraries.
17
PKG_CHECK_MODULES([FUNCTY], [gtk+-2.0 gdk-2.0 gtkglext-1.0 glee libzip, libpng])
18
PKG_CHECK_MODULES([OpenEXR], [OpenEXR, tbb])
19 20
AC_CHECK_LIB([glut], [glutInit], [], [AC_MSG_ERROR([The glut library is missing.])])
AC_CHECK_LIB([symbolic], [CreateInteger], [], [AC_MSG_ERROR([The symbolic library is missing.])])
21

22 23 24 25 26 27 28 29 30 31 32
# See http://nerdland.net/2009/07/detecting-c-libraries-with-autotools/
AC_MSG_CHECKING([for OpenVDB])
AC_LANG(C++)
SAVED_LIBS=$LIBS
LIBS="$LIBS -lopenvdb"
AC_LINK_IFELSE(
	[AC_LANG_PROGRAM([[#include <openvdb/openvdb.h>]], [openvdb::initialize();])],
	[AC_MSG_RESULT([yes]); SVX2VDB_LIBS="$SVX2VDB_LIBS -lopenvdb"] [HAVE_OPENVDB=1],
	[AC_MSG_ERROR([The openvdb library is missing.])])
LIBS=$LIBS

33 34 35
# Checks for header files.
AC_HEADER_DIRENT
AC_HEADER_STDC
36
AC_CHECK_HEADERS([stdlib.h string.h sys/timeb.h GLee.h openvdb/openvdb.h])
37 38 39

# Checks for compiler characteristics
AC_C_BIGENDIAN
40 41 42 43 44 45 46

# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_C_CONST
AC_C_INLINE

# Checks for library functions.
47
AC_SEARCH_LIBS([GLeeEnabled], [glee GLee], [], [])
48 49 50 51 52
AC_FUNC_STRTOD
AC_CHECK_FUNCS([floor ftime pow sqrt])

AC_CONFIG_FILES([Makefile
                 src/Makefile
53 54 55
                 assets/Makefile
                 assets/icons/Makefile
                 assets/shaders/Makefile])
56
AC_OUTPUT