spek

Acoustic spectrum analyser https://github.com/alexkay/spek spek.cc
git clone http://git.hanabi.in/repos/spek.git
Log | Files | Refs | README

configure.ac (2453B)


      1 AC_INIT([spek],[0.8.2])
      2 AC_CONFIG_SRCDIR([src/spek.cc])
      3 AC_CONFIG_HEADERS([config.h])
      4 AM_INIT_AUTOMAKE([1.11.1 foreign no-dist-gzip dist-xz serial-tests])
      5 AM_SILENT_RULES([yes])
      6 
      7 AC_LANG([C++])
      8 AC_PROG_CXX
      9 CXXFLAGS="$CXXFLAGS -std=gnu++11 -Wall -Wextra"
     10 AC_PROG_CXXCPP
     11 AC_PROG_LIBTOOL
     12 AC_PROG_RANLIB
     13 AC_PROG_INSTALL
     14 IT_PROG_INTLTOOL([0.40.0])
     15 
     16 AC_CANONICAL_HOST
     17 AC_MSG_CHECKING([the OS])
     18 AS_CASE([$host],
     19 	[*-*-mingw*], [
     20 		os="WIN"
     21 		AC_DEFINE([OS_WIN], [1], [Windows])
     22 	],
     23 	[*-*-darwin*], [
     24 		os="OSX"
     25 		AC_DEFINE([OS_OSX], [1], [OS X])
     26 	],
     27 	[*], [
     28 		os="UNIX"
     29 		AC_DEFINE([OS_UNIX], [1], [Unix])
     30 	]
     31 )
     32 AC_MSG_RESULT([$os])
     33 
     34 AC_CHECK_PROG(HAVE_VALGRIND, valgrind, yes, no)
     35 AC_ARG_ENABLE(
     36     [valgrind],
     37     AS_HELP_STRING([--enable-valgrind], [Run tests under valgrind]),
     38     [use_valgrind=$enableval],
     39     [use_valgrind=auto]
     40 )
     41 AS_IF(
     42     [test "x$use_valgrind" = xyes -a "x$HAVE_VALGRIND" = xno], [AC_MSG_ERROR([Valgrind not found])],
     43     [AM_CONDITIONAL([USE_VALGRIND], [test "x$use_valgrind" != xno -a x$HAVE_VALGRIND = xyes])]
     44 )
     45 AM_COND_IF([USE_VALGRIND], [use_valgrind=yes], [use_valgrind=no])
     46 
     47 AC_CHECK_LIB(m, log10)
     48 
     49 PKG_CHECK_MODULES(AVFORMAT, [libavformat >= 57.33.100])
     50 PKG_CHECK_MODULES(AVCODEC, [libavcodec >= 57.33.100])
     51 PKG_CHECK_MODULES(AVUTIL, [libavutil >= 51.17])
     52 
     53 AM_OPTIONS_WXCONFIG
     54 reqwx=3.0.0
     55 AM_PATH_WXCONFIG($reqwx, wx=1)
     56 if test "$wx" != 1; then
     57 	AC_MSG_ERROR([
     58 		wxWidgets must be installed on your system.
     59 
     60 		Please check that wx-config is in path, the directory
     61 		where wxWidgets libraries are installed (returned by
     62 		'wx-config --libs' or 'wx-config --static --libs' command)
     63 		is in LD_LIBRARY_PATH or equivalent variable and
     64 		wxWidgets version is $reqwx or above.
     65 		])
     66 fi
     67 
     68 GETTEXT_PACKAGE=spek
     69 AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["$GETTEXT_PACKAGE"], [Gettext Package])
     70 AC_SUBST(GETTEXT_PACKAGE)
     71 AM_GNU_GETTEXT_VERSION([0.18.1])
     72 AM_PO_SUBDIRS
     73 
     74 AC_CONFIG_FILES([
     75 	Makefile
     76 	data/spek.desktop.in
     77 	data/Makefile
     78 	data/icons/Makefile
     79 	data/icons/16x16/Makefile
     80 	data/icons/22x22/Makefile
     81 	data/icons/24x24/Makefile
     82 	data/icons/32x32/Makefile
     83 	data/icons/48x48/Makefile
     84 	data/icons/scalable/Makefile
     85 	dist/osx/Info.plist
     86 	dist/win/spek.wxs
     87 	man/Makefile
     88 	po/Makefile.in
     89 	src/Makefile
     90 	tests/Makefile
     91 	web/version
     92 ])
     93 AC_OUTPUT
     94 
     95 cat <<EOF
     96 
     97 ${PACKAGE}-${VERSION}
     98 
     99     Install Prefix: ${prefix}
    100     C++ Compiler:   ${CXX}
    101     OS:             ${os}
    102     wxWidgets:      ${WX_VERSION}
    103     Use Valgrind:   ${use_valgrind}
    104 
    105 EOF