]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/udis86/lib/contrib/configure.ac
Update
[l4.git] / l4 / pkg / udis86 / lib / contrib / configure.ac
1 #
2 # udis86 autoconf
3 #
4 AC_PREREQ(2.59)
5 AC_INIT([udis86], [1.7.2], [vivek.mt@gmail.com])
6 AC_CONFIG_HEADERS(config.h)
7 AC_CONFIG_AUX_DIR(build)
8 AC_CONFIG_MACRO_DIR([build/m4])
9
10 m4_include([m4/ax_compare_version.m4])
11 m4_include([m4/ax_prog_sphinx_version.m4])
12 m4_include([m4/ax_prog_yasm_version.m4])
13 m4_include([m4/ax_with_prog.m4])
14 m4_include([m4/ax_with_python.m4])
15
16 # Make sure $ACLOCAL_FLAGS are used during a rebuild.
17 AC_SUBST([ACLOCAL_AMFLAGS], ["-I $ac_macro_dir \${ACLOCAL_FLAGS}"])
18
19 #
20 # Determine the build host; we notify automake of Windows 
21 # builds, so it can pass proper parameters for building 
22 # DLLs to the linker.
23 #
24 AC_CANONICAL_HOST
25
26 case "$host_os" in
27         mingw32* )
28                 TARGET_OS=windows
29                 AC_LIBTOOL_WIN32_DLL
30                 ;;
31 esac
32
33 # Initialize the automake subsystem.
34 AM_INIT_AUTOMAKE([1.11 -Wall -Wno-portability -Wno-extra-portability -Werror foreign])
35
36 #
37 # In case we have a Windows build, we pass a 
38 # TARGET_WINDOWS conditional to automake.
39 #
40 AM_CONDITIONAL(TARGET_WINDOWS, test "$TARGET_OS" = windows)
41
42 AC_PROG_CC
43 AC_DISABLE_SHARED
44 AC_PROG_LIBTOOL
45 AC_ENABLE_SHARED
46 AM_PROG_CC_C_O
47
48 # If this is a gnu compiler, pass -Wall
49 if test "$ac_cv_c_compiler_gnu" = "yes"; then
50         CFLAGS="$CFLAGS -Wall"
51 fi
52
53 # Look for python
54 AX_WITH_PYTHON
55 if test "x$PYTHON" = "x"; then
56     AC_MSG_ERROR( [Python not found. Use --with-python to specify path to python binary] )
57 fi
58
59 # Yasm (>= 1.2.0)  for testing
60 AX_WITH_PROG(YASM,yasm)
61 AX_PROG_YASM_VERSION([1.2.0],[ac_have_yasm_version=1],[])
62 AM_CONDITIONAL(HAVE_YASM, [test -n "$ac_have_yasm_version"])
63
64 # Sphinx (>= 1.1.3) for documentation
65 AX_WITH_PROG(SPHINX_BUILD,sphinx-build)
66 AX_PROG_SPHINX([1.1.3],[ac_have_sphinx_version=1],[])
67 AM_CONDITIONAL(HAVE_SPHINX_DOC, [test -n "$ac_have_sphinx_version"])
68
69 AC_CHECK_HEADERS([assert.h stdio.h])
70
71 AC_CONFIG_FILES([
72     Makefile
73     scripts/Makefile
74     libudis86/Makefile
75     udcli/Makefile
76     tests/Makefile
77     docs/Makefile
78     docs/manual/Makefile
79     docs/x86/Makefile
80     tests/difftest.sh
81 ])
82
83 AC_OUTPUT