]> 4ch.mooo.com Git - 16.git/blob - 16/adplug/libbinio-1.4/configure.in
Please enter the commit message for your changes. Lines starting
[16.git] / 16 / adplug / libbinio-1.4 / configure.in
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])
4 AM_INIT_AUTOMAKE
5 AM_MAINTAINER_MODE
6 AM_PROG_LIBTOOL
7 AC_LANG(C++)
8
9 # Check for a sane C/C++ build environment.
10 AC_PROG_MAKE_SET
11 AC_PROG_INSTALL
12 AC_PROG_CXX
13
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))
19
20 # Conditionally build iostream wrappers
21 AC_ARG_ENABLE([iostream], AC_HELP_STRING([--disable-iostream],
22         [Do not build iostream wrapper streams]))
23
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))
27 else
28         AC_SUBST(ENABLE_IOSTREAM,0)
29 fi
30
31 # Conditionally build std::string methods
32 AC_ARG_ENABLE([string], AC_HELP_STRING([--disable-string],
33         [Do not build std::string methods]))
34
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))
38 else
39         AC_SUBST(ENABLE_STRING,0)
40 fi
41
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]))
45
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)
50 else
51         AC_CHECK_TYPE([std::basic_istream<char>],
52                 AC_SUBST(ISO_STDLIB,1),
53                 AC_SUBST(ISO_STDLIB,0),
54                 [#include <iostream>])
55 fi
56
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']))
60
61 if test ${with_math:=yes} = yes; then
62    AC_CHECK_FUNC(ldexp, AC_SUBST(WITH_MATH,1), AC_SUBST(WITH_MATH,0))
63 else
64         AC_SUBST(WITH_MATH,0)
65 fi
66
67 AC_OUTPUT