summaryrefslogtreecommitdiff
path: root/configure.ac
blob: 3e847053d4a9393cea8e13c379cc529168692d33 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
dnl Configure.in
dnl
dnl  Source for generating compiler independent libraries.
dnl

dnl INIT is required name a file which is unique to the package
dnl just to prevent someone from copying the configure to the wrong package.
AC_INIT(sigc++)

dnl This version stuff is just for the packaging section of the tool.
dnl   thus make format_package-0.0.1.tar.gz  
FP_MAJOR_VERSION=1
FP_MINOR_VERSION=9
FP_MICRO_VERSION=7
FP_VERSION=$FP_MAJOR_VERSION.$FP_MINOR_VERSION.$FP_MICRO_VERSION

dnl For automake.
VERSION=$FP_VERSION
PACKAGE=libsigc++


dnl I don't like to look at the automake cruft.
#This just complicates things. murrayc
#AC_CONFIG_AUX_DIR(scripts)

dnl C++ libraries should generally be static if the interface is subject
dnl to a lot of change.
AM_DISABLE_SHARED

dnl Initialize automake stuff
AM_INIT_AUTOMAKE($PACKAGE, $VERSION)

dnl Macros to support windows platforms
AC_CYGWIN
#AC_MINGW32
AC_EXEEXT

dnl this package needs m4
AC_CHECK_PROGS(M4, gm4 m4, m4)

dnl perl is needed for building the reference documentation
AC_PATH_PROGS([PERL_PATH], [perl perl5], [perl])
AC_SUBST([PERL_PATH])

dnl disable autoheader
AUTOHEADER=':'

dnl Maintainer support (autodependencies and packaging)
AM_MAINTAINER_MODE

dnl Using C compiler
AC_PROG_CC
AC_PROG_CPP

dnl Using libtool
AC_LIBTOOL_WIN32_DLL
AM_PROG_LIBTOOL

dnl Using C++ compiler
AC_PROG_CXX
AC_LANG_CPLUSPLUS

AC_MSG_CHECKING(if C++ compiler supports typeof (required))
AC_TRY_COMPILE(
[
  float func(int);
],[
  typedef typeof(func(1)) type;
  type a=1.0;
],[
  ac_typeof=yes
],[
  ac_typeof=no
  config_error=yes
])
AC_MSG_RESULT([$ac_typeof])

AC_MSG_CHECKING(if C++ compiler supports template typeof (required))
AC_TRY_COMPILE(
[
  template <class T>
  struct foo
  {
    typedef typeof( T::operator()(0) ) T2;
  };
],[
],[
   ac_template_typeof=yes
],[
   ac_template_typeof=no
   config_error=yes
])
AC_MSG_RESULT([$ac_template_typeof])

if test "X$config_error" = "Xyes" ; then
  AC_ERROR(
[One or more of the required compiler features is missing.
If you believe this is in error, please consult the config.log file
for further details.
])
fi
 


# Generate output
AC_OUTPUT([
  Makefile
  sigc++-2.0.pc

  sigc++/Makefile
  tests/Makefile
  examples/Makefile

  docs/Makefile
    docs/images/Makefile
    docs/reference/Makefile
    docs/reference/Doxyfile
])