]> Creatis software - gdcm.git/blob - configure.in
df3c7c794c28c1d5c452b5217cd939b32ea26efa
[gdcm.git] / configure.in
1 dnl Process this file with autoconf to produce a configure script.
2 AC_INIT(src/gdcmDict.cxx)
3
4 AM_INIT_AUTOMAKE(gdcm, 0.1.0)
5 AM_MAINTAINER_MODE
6 AM_CONFIG_HEADER(src/config.h)
7
8 dnl Checks for programs.
9 AM_PROG_LIBTOOL
10 AC_PROG_CXX
11 AC_PROG_CC
12 AC_PROG_CPP
13 AC_PROG_INSTALL
14 AC_PROG_LN_S
15 AC_PROG_MAKE_SET
16
17 dnl Checks for header files.
18 AC_HEADER_STDC
19
20 dnl Checks for typedefs, structures, and compiler characteristics.
21 AC_C_CONST
22 AC_TYPE_SIZE_T
23 AC_STRUCT_TM
24
25 dnl Checks for endianness
26 AC_C_BIGENDIAN
27
28 dnl Checks for int and long size
29 AC_CHECK_SIZEOF(char, 1)
30 AC_CHECK_SIZEOF(short, 2)
31 AC_CHECK_SIZEOF(int, 4)
32 AC_CHECK_SIZEOF(long, 4)
33 AC_CHECK_SIZEOF(long long, 8)
34
35 AC_CHECK_PROG(DOXYGEN, doxygen, true, false)
36 AM_CONDITIONAL(HAVE_DOXYGEN, $DOXYGEN)
37 AC_SUBST(HAVE_DOXYGEN)
38
39 dnl Let people disable the doxygen stuff.
40 AC_ARG_ENABLE(docygen, [  --enable-doxygen         Use doxygen to build documentation (default=auto)], enable_doxygen="$enableval",
41 enable_doxygen=auto)
42
43 if test x$enable_doxygen = xauto ; then
44   if test x$DOXYGEN = xtrue ; then
45     enable_doxygen=yes
46   else
47     enable_doxygen=no
48   fi
49 fi
50
51 dnl NOTE: We need to use a separate automake conditional for this
52 dnl       to make this work with the tarballs.
53 AM_CONDITIONAL(ENABLE_DOXYGEN, test x$enable_doxygen = xyes)
54
55 dnl Checks for Python
56 AC_ARG_ENABLE(python,
57         [  --enable-python          Enable Python language support (default=no).],,
58         [enable_python="no"])
59 dnl AC_MSG_RESULT($enable_python)
60 build_python=no
61 if test "yes" = "$enable_python"; then
62     AM_PATH_PYTHON(2.0)
63     if test -n "$PYTHON"; then
64         AM_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR(could not find Python headers)])
65         build_python=yes;
66     fi
67     AC_CHECK_PROGS(SWIG, swig13)
68 fi
69 AM_CONDITIONAL(BUILD_PYTHON, test x$build_python = xyes)
70
71 dnl produce Makefile.in files
72 AC_OUTPUT([
73 Makefile 
74 gdcm.spec
75 src/Makefile
76 gdcmPython/Makefile
77 Test/Makefile
78 Dicts/Makefile
79 Doc/Makefile])