Apply automation fix patch from torbenh.
[ardour.git] / libs / sigc++2 / configure.ac
1 dnl Configure.in
2 dnl
3 dnl  Source for generating compiler independent libraries.
4 dnl
5
6 #We use pushdef here because we can't use shell variables before AC_INIT, but we want to use a variable with AC_INIT:
7 dnl   thus make format_package-0.0.1.tar.gz 
8 pushdef([FP_MAJOR_VERSION],     [2])
9 pushdef([FP_MINOR_VERSION],     [2])
10 pushdef([FP_MICRO_VERSION],     [2])
11 pushdef([FP_EXTRA_VERSION],     [])
12 pushdef([FP_VERSION], FP_MAJOR_VERSION.FP_MINOR_VERSION.FP_MICRO_VERSION[]FP_EXTRA_VERSION)
13 # package name, version, support contact, tarball name.
14 AC_INIT([libsigc++], FP_VERSION, [libsigc-list@gnome.org], [libsigc++])
15
16 dnl AC_CONFIG_SRCDIR is required name a file which is unique to the package
17 dnl just to prevent someone from copying the configure to the wrong package.
18 AC_CONFIG_SRCDIR([sigc++])
19
20 AC_PREREQ(2.59)
21
22 #########################################################################
23 #  Version and initialization
24 #########################################################################
25 [FP_MAJOR_VERSION]=FP_MAJOR_VERSION
26 [FP_MINOR_VERSION]=FP_MINOR_VERSION
27 [FP_MICRO_VERSION]=FP_MICRO_VERSION
28 [FP_EXTRA_VERSION]=FP_EXTRA_VERSION
29 [FP_VERSION]=FP_VERSION
30 popdef([FP_MAJOR_VERSION])
31 popdef([FP_MINOR_VERSION])
32 popdef([FP_MICRO_VERSION])
33 popdef([FP_EXTRA_VERSION])
34 popdef([FP_VERSION])
35 FP_RELEASE=$FP_MAJOR_VERSION.$FP_MINOR_VERSION
36 AC_DEFINE_UNQUOTED(FP_MAJOR_VERSION, $FP_MAJOR_VERSION, [Major version of libsigc++])
37 AC_DEFINE_UNQUOTED(FP_MINOR_VERSION, $FP_MINOR_VERSION, [Minor version of libsigc++])
38 AC_DEFINE_UNQUOTED(FP_MICRO_VERSION, $FP_MICRO_VERSION, [Micro version of libsigc++])
39 AC_SUBST(FP_VERSION)
40 AC_SUBST(FP_RELEASE)
41 AC_SUBST(FP_MAJOR_VERSION)
42 AC_SUBST(FP_MINOR_VERSION)
43 AC_SUBST(FP_MICRO_VERSION)
44
45 dnl For automake.
46 VERSION=$FP_VERSION
47 PACKAGE=libsigc++
48
49 # Initialize automake stuff
50 # tar-ustar asks it to use a sensible tar format that can handle long filenames.
51 AM_INIT_AUTOMAKE([1.9 tar-ustar])
52
53 dnl Specify a configuration file:
54 AC_CONFIG_HEADER(sigc++config.h)
55
56 dnl Macros to support windows platforms
57 AC_CYGWIN
58 #AC_MINGW32
59 AC_EXEEXT
60
61 dnl this package needs m4
62 AC_CHECK_PROGS(M4, gm4 m4, m4)
63
64 dnl perl is needed for building the reference documentation
65 AC_PATH_PROGS([PERL_PATH], [perl perl5], [perl])
66 AC_SUBST([PERL_PATH])
67
68 dnl disable autoheader
69 AUTOHEADER=':'
70
71 dnl Maintainer support (autodependencies and packaging)
72 AM_MAINTAINER_MODE
73
74 dnl Using C compiler
75 AC_PROG_CC
76 AC_PROG_CPP
77
78 dnl Used for enabling the "-no-undefined" flag while generating DLLs
79 dnl Borrowed from the official gtk+-2 configure.in
80 AC_MSG_CHECKING([for some Win32 platform])
81 case "$host" in
82   *-*-mingw*|*-*-cygwin*)
83     platform_win32=yes
84     ;;
85   *)
86     platform_win32=no
87     ;;
88 esac
89 AC_MSG_RESULT([$platform_win32])
90 AM_CONDITIONAL(PLATFORM_WIN32, test "$platform_win32" = "yes")
91
92 dnl Using libtool
93 AC_CONFIG_MACRO_DIR(scripts)
94 AC_LIBTOOL_WIN32_DLL
95 dnl: Use with libtool 1.5a instead of AM_PROG_LIBTOOL: LT_INIT
96 AM_PROG_LIBTOOL
97
98 dnl Using C++ compiler
99 AC_PROG_CXX
100 AC_LANG_CPLUSPLUS
101
102 SIGC_CXX_GCC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD()
103 SIGC_CXX_MSVC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD()
104 SIGC_CXX_SELF_REFERENCE_IN_MEMBER_INITIALIZATION()
105 SIGC_CXX_HAS_NAMESPACE_STD()
106 SIGC_CXX_HAS_SUN_REVERSE_ITERATOR()
107
108 if test "X$config_error" = "Xyes" ; then
109   AC_ERROR(
110 [One or more of the required compiler features is missing.
111 If you believe this is in error, please consult the config.log file
112 for further details.
113 ])
114 fi
115  
116
117 # Generate output
118 AC_OUTPUT([
119   Makefile
120   sigc++-2.0.pc
121
122   sigc++/Makefile
123   scripts/Makefile
124   libsigc++-2.0.spec
125
126 ])