configure.ac | configure.ac | |||
---|---|---|---|---|
AC_INIT(libdvbpsi, 0.2.2) | AC_INIT(libdvbpsi, 1.0.0) | |||
AC_PREREQ(2.50) | AC_PREREQ(2.50) | |||
AC_CONFIG_AUX_DIR(.auto) | AC_CONFIG_AUX_DIR(.auto) | |||
AC_CANONICAL_SYSTEM | AC_CANONICAL_SYSTEM | |||
AM_INIT_AUTOMAKE | AM_INIT_AUTOMAKE | |||
AM_CONFIG_HEADER(config.h) | AM_CONFIG_HEADER(config.h) | |||
AC_CONFIG_MACRO_DIR([m4]) | ||||
#AC_CANONICAL_HOST | dnl AC_CANONICAL_HOST | |||
AC_PROG_CC | AC_PROG_CC | |||
AC_STDC_HEADERS | AC_STDC_HEADERS | |||
AC_C_INLINE | AC_C_INLINE | |||
AM_PROG_CC_C_O | ||||
AC_LIBTOOL_WIN32_DLL | AC_LIBTOOL_WIN32_DLL | |||
AM_PROG_LIBTOOL | AM_PROG_LIBTOOL | |||
dnl default CFLAGS | dnl store CFLAGS from user | |||
CFLAGS="${CFLAGS} -Wall -DDVBPSI_DIST --std=gnu99" | CFLAGS_save="${CFLAGS}" | |||
CFLAGS="${CFLAGS} -Wpointer-arith -Wcast-align -Wcast-qual -Wstrict-prototy | ||||
pes -Wshadow -Waggregate-return -Wmissing-prototypes -Wnested-externs -Wsig | dnl add features to CFLAGS | |||
n-compare" | CFLAGS_dist="-Wall -Werror --std=gnu99 -D_GNU_SOURCE" | |||
CFLAGS_dist="${CFLAGS_dist} -Wpointer-arith -Wcast-align -Wcast-qual -Wstri | ||||
ct-prototypes -Wshadow -Waggregate-return -Wmissing-prototypes -Wnested-ext | ||||
erns -Wsign-compare" | ||||
dnl check the operating system | dnl check the operating system | |||
case "${target_os}" in | case "${target_os}" in | |||
darwin*) | darwin*) | |||
CFLAGS="${CFLAGS} -no-cpp-precomp" | CFLAGS_dist="${CFLAGS_dist} -no-cpp-precomp" | |||
have_darwin="yes" | ||||
;; | ||||
*mingw32* | *cygwin* | *wince* | *mingwce*) | ||||
have_win32="yes" | ||||
;; | ||||
*bsd*) | ||||
have_bsd="yes" | ||||
;; | ;; | |||
esac | esac | |||
AM_CONDITIONAL(HAVE_DARWIN, test "${have_darwin}" = "yes") | ||||
AM_CONDITIONAL(HAVE_WIN32, test "${have_win32}" = "yes") | ||||
AM_CONDITIONAL(HAVE_BSD, test "${have_bsd}" = "yes") | ||||
dnl --enable-debug | dnl --enable-debug | |||
AC_ARG_ENABLE(debug, | AC_ARG_ENABLE(debug, | |||
[ --enable-debug Enable debug mode (default disabled)], | [ --enable-debug Enable debug mode (default disabled)], | |||
[case "${enableval}" in | [case "${enableval}" in | |||
yes) debug=true ;; | yes) debug=true ;; | |||
no) debug=false ;; | no) debug=false ;; | |||
*) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;; | *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;; | |||
esac],[debug=false]) | esac],[debug=false]) | |||
if test "$debug" = "true" | if test "$debug" = "true" | |||
then | then | |||
CFLAGS="${CFLAGS} -DDEBUG -g" | CFLAGS_dist="${CFLAGS_dist} -ggdb3" | |||
fi | fi | |||
dnl --enable-release | dnl --enable-release | |||
AC_ARG_ENABLE(release, | AC_ARG_ENABLE(release, | |||
[ --enable-release Enable release mode (default disabled)], | [ --enable-release Enable release mode (default disabled)], | |||
[case "${enableval}" in | [case "${enableval}" in | |||
yes) release=true ;; | yes) release=true ;; | |||
no) release=false ;; | no) release=false ;; | |||
*) AC_MSG_ERROR(bad value ${enableval} for --enable-release) ;; | *) AC_MSG_ERROR(bad value ${enableval} for --enable-release) ;; | |||
esac],[release=false]) | esac],[release=false]) | |||
if test "$release" = "true" | if test "$release" != "true"; then | |||
then | CFLAGS_dist="${CFLAGS_dist} -DDVBPSI_DIST" | |||
CFLAGS="${CFLAGS} -O6" | ||||
else | ||||
CFLAGS="${CFLAGS} -O2" | ||||
fi | fi | |||
dnl compile feature tests | ||||
CFLAGS="${CFLAGS_save} ${CFLAGS_dist}" | ||||
dnl Check for headers | dnl Check for headers | |||
AC_CHECK_HEADERS(stdint.h inttypes.h) | AC_CHECK_HEADERS(stdbool.h stdint.h inttypes.h getopt.h strings.h sys/time. | |||
AC_CHECK_FUNCS(gettimeofday) | h) | |||
dnl AC_CHECK_FUNCS([gettimeofday]) | ||||
AC_CHECK_HEADERS(sys/socket.h, [ac_have_sys_socket_h=yes]) | AC_CHECK_HEADERS(sys/socket.h, [ac_have_sys_socket_h=yes]) | |||
AM_CONDITIONAL(HAVE_SYS_SOCKET_H, test "${ac_have_sys_socket_h}" = "yes") | AM_CONDITIONAL(HAVE_SYS_SOCKET_H, test "${ac_have_sys_socket_h}" = "yes") | |||
AC_CHECK_HEADERS([net/if.h], [], [], | ||||
[ | ||||
#include <sys/types.h> | ||||
#include <sys/socket.h> | ||||
]) | ||||
dnl Check for variadic macros | dnl Check for variadic macros | |||
AC_CACHE_CHECK([for variadic cpp macros], | AC_CACHE_CHECK([for variadic cpp macros], | |||
[ac_cv_cpp_variadic_macros], | [ac_cv_cpp_variadic_macros], | |||
[AC_TRY_COMPILE( | [AC_TRY_COMPILE( | |||
[#include <stdio.h> | [#include <stdio.h> | |||
#define a(b,c...) printf(b,##c)], | #define a(b,c...) printf(b,##c)], | |||
[a("foo");a("%s","bar");a("%s%s","baz","quux");], | [a("foo");a("%s","bar");a("%s%s","baz","quux");], | |||
ac_cv_cpp_variadic_macros=yes, | ac_cv_cpp_variadic_macros=yes, | |||
ac_cv_cpp_variadic_macros=no)]) | ac_cv_cpp_variadic_macros=no)]) | |||
if test "${ac_cv_cpp_variadic_macros}" != "no"; then | if test "${ac_cv_cpp_variadic_macros}" != "no"; then | |||
AC_DEFINE(HAVE_VARIADIC_MACROS, 1, Support for variadic macros) | AC_DEFINE(HAVE_VARIADIC_MACROS, 1, Support for variadic macros) | |||
fi | fi | |||
dnl | ||||
dnl Generate Makefiles and other output files | ||||
dnl | ||||
AC_OUTPUT([Makefile | AC_OUTPUT([Makefile | |||
src/Makefile | src/Makefile | |||
examples/Makefile | examples/Makefile | |||
examples/dvbinfo/Makefile | ||||
misc/Makefile | misc/Makefile | |||
doc/Makefile | doc/Makefile | |||
wince/Makefile | wince/Makefile | |||
libdvbpsi.pc | libdvbpsi.pc | |||
libdvbpsi.spec]) | libdvbpsi.spec]) | |||
echo " | echo " | |||
libdvbpsi configuration | libdvbpsi configuration | |||
----------------------- | ----------------------- | |||
libdvbpsi version : ${VERSION} | libdvbpsi version : ${VERSION} | |||
debug : ${debug} | debug : ${debug} | |||
release : ${release} | release : ${release} | |||
compile flags : ${CFLAGS} | ||||
" | " | |||
End of changes. 15 change blocks. | ||||
26 lines changed or deleted | 34 lines changed or added | |||
This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ |