cwtest/configure.ac

93 lines
2.5 KiB
Plaintext
Raw Normal View History

2012-10-29 21:07:53 +00:00
#
# Use "autoreconf --force --install" to update depedent files after changing
# this configure.ac or any of the Makefile.am files.
#
AC_INIT([proj],[1.0],[proj@larke.org])
AC_CONFIG_AUX_DIR([build-aux]) # put aux files in build-aux
AM_INIT_AUTOMAKE([1.9 -Wall foreign subdir-objects]) # subdir-objects needed for non-recursive make
AC_CONFIG_SRCDIR([src/proj/main.c])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])
LT_INIT
# Check for programs
AC_PROG_CC
AC_PROG_CXX
# AC_PROG_RANLIB # required for static librarires
# Checks for libraries.
AC_CHECK_LIB([cairo],[cairo_debug_reset_static_data],[AC_MSG_RESULT([The 'cairo' library was found.])],[AC_MSG_ERROR([The 'cairo' library was not found.])])
#TODO: add more library checks
# Checks for header files.
AC_CHECK_HEADERS([arpa/inet.h fcntl.h float.h limits.h mach/mach.h netinet/in.h stdlib.h string.h sys/ioctl.h sys/socket.h sys/time.h termios.h unistd.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_C_INLINE
AC_TYPE_OFF_T
AC_TYPE_SSIZE_T
AC_TYPE_UINT64_T
# Checks for library functions.
AC_FUNC_ERROR_AT_LINE
AC_FUNC_FORK
AC_FUNC_FSEEKO
AC_FUNC_MALLOC
AC_FUNC_REALLOC
AC_FUNC_STRTOD
AC_CHECK_FUNCS([clock_gettime floor memmove memset mkdir pow rint select socket sqrt strcasecmp strchr strcspn strerror strspn strstr strtol])
# The following is a custom macro in ./m4/os_type.m4
# be sure to also set "ACLOCAL_AMFLAGS = -I m4" in ./Makefile.am
# Defines the config.h variable OS_LINUX or OS_OSX
AX_FUNC_OS_TYPE
AX_FUNC_OS_64
# ac_cv_os_type is set by AX_FUNC_OS_TYPE
AM_CONDITIONAL([OS_LINUX],[test x"${ax_cv_os_type}" = xLinux])
AM_CONDITIONAL([OS_OSX],[test x"${ax_cv_os_type}" = xDarwin])
echo "OS='${ax_cv_os_type}'"
AM_CONDITIONAL([OS_64],[test x"${ax_cv_os_64}" == xx86_64])
echo "ptr width='${ax_cv_os_64}'"
AC_ARG_ENABLE([debug],
[ --enable-debug Turn on debugging],
[case "${enableval}" in
yes) debug=true ;;
no) debug=false ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-debug]) ;;
esac],[debug=false])
echo "debug=${debug}"
AM_CONDITIONAL([DEBUG], [test x$debug = xtrue])
if test x$debug = xfalse; then
AC_DEFINE([NDEBUG], 1,[Debugging off.])
fi
# AC_ARG_ENABLE([add_lib],
# [ --enable-add_lib Append some additional libs to the end of the library link list.],
# [add_lib="${enableval}"],
# [add_lib=""])
#
# echo "add_lib=${add_lib}"
#
# AC_SUBST([ADD_LIB], [$add_lib])
proj_dir=src/libproj
AC_SUBST([proj_dir])
AC_CONFIG_FILES([ Makefile ])
AC_OUTPUT