From e6a1477dc0b8de4164cfbf470d0848bb97d41795 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Tue, 24 Jun 2014 08:23:00 +0200 Subject: Modernise configure script --- configure.ac | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ configure.in | 48 ------------------------------------------------ 2 files changed, 48 insertions(+), 48 deletions(-) create mode 100644 configure.ac delete mode 100644 configure.in diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..865e48c --- /dev/null +++ b/configure.ac @@ -0,0 +1,48 @@ +AC_INIT([libaudioin], 0.12 ) + +AC_CONFIG_SRCDIR([src/audioin.cc]) + +AM_INIT_AUTOMAKE + +dnl ====================== +dnl Init pkg-config +dnl ====================== +PKG_PROG_PKG_CONFIG(0.23) + +dnl ====================== +dnl Compile with debug options +dnl ====================== +AC_ARG_WITH(debug, + [ --with-debug build with debug support (default=no)], + [], + [with_debug=no]) +if test x$with_debug == xyes; then + AC_MSG_WARN([*** Building with debug support!]) + AC_DEFINE_UNQUOTED(WITH_DEBUG, , [The project is configured to use debug output]) + CXXFLAGS="$CXXFLAGS -D_FORTIFY_SOURCE=2 -fstack-protector -Wall -Werror -g -O0" +fi + +dnl ====================== +dnl Check for alsa library +dnl ====================== +PKG_CHECK_MODULES(ALSA, alsa >= 1.0.23) + +AC_PROG_CXX + +AC_PROG_LIBTOOL +AM_PROG_LIBTOOL + +AM_CONFIG_HEADER(config.h) +AC_STDC_HEADERS + +AC_SUBST(CFLAGS) +AC_SUBST(CPPFLAGS) +AC_SUBST(CXXFLAGS) +AC_SUBST(LDFLAGS) + +AC_OUTPUT( + Makefile + src/Makefile + tools/Makefile + audioin.pc) + diff --git a/configure.in b/configure.in deleted file mode 100644 index a70f61d..0000000 --- a/configure.in +++ /dev/null @@ -1,48 +0,0 @@ -# Filename: configure.in - -AC_INIT(src/audioin.cc) - -AM_INIT_AUTOMAKE( libaudioin, 0.12 ) - -dnl ====================== -dnl Init pkg-config -dnl ====================== -PKG_PROG_PKG_CONFIG(0.23) - -dnl ====================== -dnl Compile with debug options -dnl ====================== -AC_ARG_WITH(debug, - [ --with-debug build with debug support (default=no)], - [], - [with_debug=no]) -if test x$with_debug == xyes; then - AC_MSG_WARN([*** Building with debug support!]) - AC_DEFINE_UNQUOTED(WITH_DEBUG, , [The project is configured to use debug output]) - CXXFLAGS="$CXXFLAGS -D_FORTIFY_SOURCE=2 -fstack-protector -Wall -Werror -g -O0" -fi - -dnl ====================== -dnl Check for alsa library -dnl ====================== -PKG_CHECK_MODULES(ALSA, alsa >= 1.0.23) - -AC_PROG_CXX - -AC_PROG_LIBTOOL -AM_PROG_LIBTOOL - -AM_CONFIG_HEADER(config.h) -AC_STDC_HEADERS - -AC_SUBST(CFLAGS) -AC_SUBST(CPPFLAGS) -AC_SUBST(CXXFLAGS) -AC_SUBST(LDFLAGS) - -AC_OUTPUT( - Makefile - src/Makefile - tools/Makefile - audioin.pc) - -- cgit v1.2.3