1 AC_INIT(binio,1.4,[dn.tlp@gmx.net],libbinio)
2 AC_CONFIG_SRCDIR(src/binio.cpp)
3 AC_CONFIG_FILES([Makefile src/Makefile doc/Makefile src/binio.h libbinio.pc])
9 # Check for a sane C/C++ build environment.
14 # Check if 'long long' or 'long double' are available and use them instead.
15 AC_CHECK_TYPE(long long, AC_SUBST(TYPE_INT,"long long"),
16 AC_SUBST(TYPE_INT,long))
17 AC_CHECK_TYPE(long double, AC_SUBST(TYPE_FLOAT,"long double"),
18 AC_SUBST(TYPE_FLOAT,double))
20 # Conditionally build iostream wrappers
21 AC_ARG_ENABLE([iostream], AC_HELP_STRING([--disable-iostream],
22 [Do not build iostream wrapper streams]))
24 if test ${enable_iostream:=yes} = yes; then
25 AC_CHECK_LIB(stdc++,main, AC_SUBST(ENABLE_IOSTREAM,1),
26 AC_SUBST(ENABLE_IOSTREAM,0))
28 AC_SUBST(ENABLE_IOSTREAM,0)
31 # Conditionally build std::string methods
32 AC_ARG_ENABLE([string], AC_HELP_STRING([--disable-string],
33 [Do not build std::string methods]))
35 if test ${enable_string:=yes} = yes; then
36 AC_CHECK_LIB(stdc++, main, AC_SUBST(ENABLE_STRING,1),
37 AC_SUBST(ENABLE_STRING,0))
39 AC_SUBST(ENABLE_STRING,0)
42 # Check if we are using the ISO standard C++ library
43 AC_ARG_WITH([iso],AC_HELP_STRING([--with-iso],
44 [Force ISO C++ standard library compliance]))
46 if test x${with_iso} = xyes; then
47 AC_SUBST(ISO_STDLIB,1)
48 elif test x${with_iso} = xno; then
49 AC_SUBST(ISO_STDLIB,0)
51 AC_CHECK_TYPE([std::basic_istream<char>],
52 AC_SUBST(ISO_STDLIB,1),
53 AC_SUBST(ISO_STDLIB,0),
54 [#include <iostream>])
57 # Conditionally build with 'math.h' (and maybe library) dependencies
58 AC_ARG_WITH([math],AC_HELP_STRING([--without-math],
59 [Do not build routines depending on 'math.h']))
61 if test ${with_math:=yes} = yes; then
62 AC_CHECK_FUNC(ldexp, AC_SUBST(WITH_MATH,1), AC_SUBST(WITH_MATH,0))