]> Creatis software - gdcm.git/blob - configure.in
492bbad633915ada5e121e63589de8df90496084
[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,
41   [  --enable-doxygen        Use doxygen to build documentation (default=auto)],
42   [enable_doxygen="$enableval"],
43   [enable_doxygen=auto])
44
45 if test x$enable_doxygen = xauto ; then
46   if test x$DOXYGEN = xtrue ; then
47     enable_doxygen=yes
48   else
49     enable_doxygen=no
50   fi
51 fi
52
53 dnl NOTE: We need to use a separate automake conditional for this
54 dnl       to make this work with the tarballs.
55 AM_CONDITIONAL(ENABLE_DOXYGEN, test x$enable_doxygen = xyes)
56
57 dnl Checks for Python
58 AC_ARG_ENABLE(python,
59      [  --enable-python         Enable Python language support (default=no).],
60      ,
61      [enable_python="no"])
62 dnl AC_MSG_RESULT($enable_python)
63 build_python=no
64 if test "yes" = "$enable_python"; then
65     AM_PATH_PYTHON(2.0)
66     if test -n "$PYTHON"; then
67         AM_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR(could not find Python headers)])
68         build_python=yes;
69     fi
70     AC_CHECK_PROGS(SWIG, swig13)
71 fi
72 AM_CONDITIONAL(BUILD_PYTHON, test x$build_python = xyes)
73
74 dnl Checks for vtk
75 AC_ARG_ENABLE(vtk,
76     [  --enable-vtk            Enable vtk extensions support (default=no).],
77     ,
78     [enable_vtk="no"])
79 AM_CONDITIONAL(BUILD_VTK, test x$enable_vtk = xyes)
80
81 dnl produce Makefile.in files
82 AC_OUTPUT([
83 Makefile 
84 gdcm.spec
85 src/Makefile
86 src/jpeg/Makefile
87 src/jpeg/libijg8/Makefile
88 gdcmPython/Makefile
89 Test/Makefile
90 Dicts/Makefile
91 vtk/Makefile
92 Doc/Makefile])