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])
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])
16 # Make sure $ACLOCAL_FLAGS are used during a rebuild.
17 AC_SUBST([ACLOCAL_AMFLAGS], ["-I $ac_macro_dir \${ACLOCAL_FLAGS}"])
20 # Determine the build host; we notify automake of Windows
21 # builds, so it can pass proper parameters for building
33 # Initialize the automake subsystem.
34 AM_INIT_AUTOMAKE([1.11 -Wall -Wno-portability -Wno-extra-portability -Werror foreign])
37 # In case we have a Windows build, we pass a
38 # TARGET_WINDOWS conditional to automake.
40 AM_CONDITIONAL(TARGET_WINDOWS, test "$TARGET_OS" = windows)
48 # If this is a gnu compiler, pass -Wall
49 if test "$ac_cv_c_compiler_gnu" = "yes"; then
50 CFLAGS="$CFLAGS -Wall"
55 if test "x$PYTHON" = "x"; then
56 AC_MSG_ERROR( [Python not found. Use --with-python to specify path to python binary] )
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"])
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"])
69 AC_CHECK_HEADERS([assert.h stdio.h])