2012-03-16 18:30:44 +00:00
|
|
|
AC_INIT([rufus], [1.1.6], [https://github.com/pbatard/rufus/issues], [rufus], [http://rufus.akeo.ie])
|
2011-12-05 01:11:15 +00:00
|
|
|
AM_INIT_AUTOMAKE([-Wno-portability foreign no-dist no-dependencies])
|
2011-12-05 11:19:05 +00:00
|
|
|
AC_CONFIG_SRCDIR([src/rufus.c])
|
2011-12-01 19:43:45 +00:00
|
|
|
AC_CONFIG_MACRO_DIR([m4])
|
|
|
|
# Enable silent build rules by default (Automake v1.11 or later).
|
|
|
|
# Disable by either passing --disable-silent-rules to configure or passing V=1 to make
|
|
|
|
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
|
|
|
|
[AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
|
|
|
|
|
|
|
|
AC_PREREQ([2.50])
|
|
|
|
AC_PROG_CC
|
2012-01-11 00:05:16 +00:00
|
|
|
AC_PROG_RANLIB
|
2011-12-05 00:04:01 +00:00
|
|
|
AC_PATH_PROG(RM, rm, rm)
|
|
|
|
AC_CHECK_TOOL(STRIP, strip, strip)
|
|
|
|
AC_CHECK_TOOL(WINDRES, windres, windres)
|
2011-12-01 19:43:45 +00:00
|
|
|
AC_C_INLINE
|
|
|
|
AC_DEFINE([_GNU_SOURCE], [], [Use GNU extensions])
|
|
|
|
|
2011-12-06 23:35:55 +00:00
|
|
|
# Clang needs an explicit WIN32_WINNT defined else it produces warnings
|
|
|
|
# in msapi_utf8.h - including winver.h only doesn't work
|
2011-12-12 21:14:33 +00:00
|
|
|
AM_CFLAGS="${AM_CFLAGS} -DWINVER=0x501 -D_WIN32_IE=0x501 -D_WIN32_WINNT=0x501"
|
2011-12-05 00:04:01 +00:00
|
|
|
AM_LDFLAGS="${AM_LDFLAGS} -Wl,-no-undefined"
|
2011-12-01 19:43:45 +00:00
|
|
|
|
2012-02-16 23:56:31 +00:00
|
|
|
# FreeDOS support
|
2012-01-06 16:46:27 +00:00
|
|
|
AC_ARG_WITH([freedos],
|
|
|
|
[AS_HELP_STRING([--with-freedos],
|
|
|
|
[embed FreeDOS support (default=yes)])],
|
|
|
|
[],
|
|
|
|
[with_freedos=yes])
|
|
|
|
if test "x$with_freedos" != "xno" ; then
|
2012-01-12 02:52:40 +00:00
|
|
|
AM_RCFLAGS="${AM_RCFLAGS} -DWITH_FREEDOS"
|
2012-01-06 16:46:27 +00:00
|
|
|
EXESUFFIX="f"
|
|
|
|
fi
|
2011-12-01 19:43:45 +00:00
|
|
|
|
|
|
|
# Debug symbols
|
2012-02-07 23:16:15 +00:00
|
|
|
AC_ARG_ENABLE([debug],
|
|
|
|
[AS_HELP_STRING([--enable-debug],
|
|
|
|
[keep debug symbols for gdb (default=yes)])],
|
2011-12-01 19:43:45 +00:00
|
|
|
[debug_enabled=$enableval],
|
|
|
|
[debug_enabled='yes'])
|
2012-02-07 23:16:15 +00:00
|
|
|
if test "x$debug_enabled" != "xno" ; then
|
2011-12-01 19:43:45 +00:00
|
|
|
CFLAGS="-g -O2"
|
|
|
|
else
|
|
|
|
CFLAGS="-O2"
|
|
|
|
LDFLAGS="-s"
|
|
|
|
fi
|
|
|
|
|
2012-02-07 23:16:15 +00:00
|
|
|
AC_MSG_RESULT([enabling Large File Support (ISO support)])
|
|
|
|
AM_CFLAGS="$AM_CFLAGS -D_FILE_OFFSET_BITS=64 -D_OFF_T_DEFINED -D_OFF_T_ -D_off_t=off64_t -Doff_t=off64_t"
|
|
|
|
|
2011-12-01 19:43:45 +00:00
|
|
|
# check for -Wno-pointer-sign compiler support (GCC >= 4)
|
|
|
|
saved_CFLAGS="${CFLAGS}"
|
|
|
|
CFLAGS="$CFLAGS -Wno-pointer-sign"
|
|
|
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
|
|
|
|
[nopointersign_cflags="-Wno-pointer-sign"], [nopointersign_cflags=""])
|
|
|
|
CFLAGS="${saved_CFLAGS}"
|
|
|
|
|
2011-12-05 01:11:15 +00:00
|
|
|
AM_CFLAGS="$AM_CFLAGS -std=gnu99 -Wshadow -Wall -Wundef -Wunused -Wstrict-prototypes -Werror-implicit-function-declaration $nopointersign_cflags"
|
2011-12-01 19:43:45 +00:00
|
|
|
|
|
|
|
AC_SUBST([VISIBILITY_CFLAGS])
|
|
|
|
AC_SUBST([AM_CFLAGS])
|
|
|
|
AC_SUBST([AM_LDFLAGS])
|
2012-01-06 16:46:27 +00:00
|
|
|
AC_SUBST([AM_RCFLAGS])
|
|
|
|
AC_SUBST([EXESUFFIX])
|
2011-12-01 19:43:45 +00:00
|
|
|
|
|
|
|
AC_CONFIG_FILES([Makefile])
|
2011-12-05 11:19:05 +00:00
|
|
|
AC_CONFIG_FILES([src/Makefile])
|
2012-01-11 00:05:16 +00:00
|
|
|
AC_CONFIG_FILES([src/ms-sys/Makefile])
|
2012-01-12 11:04:03 +00:00
|
|
|
AC_CONFIG_FILES([src/syslinux/libfat/Makefile])
|
|
|
|
AC_CONFIG_FILES([src/syslinux/libinstaller/Makefile])
|
2012-01-31 01:40:22 +00:00
|
|
|
AC_CONFIG_FILES([src/libcdio/iso9660/Makefile])
|
|
|
|
AC_CONFIG_FILES([src/libcdio/udf/Makefile])
|
|
|
|
AC_CONFIG_FILES([src/libcdio/driver/Makefile])
|
2011-12-01 19:43:45 +00:00
|
|
|
AC_OUTPUT
|
2012-02-07 23:16:15 +00:00
|
|
|
|
2012-02-16 23:56:31 +00:00
|
|
|
AC_MSG_RESULT([FreeDOS support: $(test "x$with_freedos" != "xno" && echo enabled || echo disabled)])
|