annotate acinclude.m4 @ 881:6a590241d8ad alignment_view

Grey lines in alignment view; chords for salient features
author Chris Cannam
date Fri, 21 Nov 2014 12:49:20 +0000
parents e4793ca93ca0
children 899c4d7e7e63
rev   line source
Chris@564 1
Chris@564 2 AC_DEFUN([SV_MODULE_REQUIRED],
Chris@564 3 [
Chris@564 4 SV_MODULE_MODULE=$1
Chris@564 5 SV_MODULE_VERSION_TEST="$2"
Chris@564 6 SV_MODULE_HEADER=$3
Chris@564 7 SV_MODULE_LIB=$4
Chris@564 8 SV_MODULE_FUNC=$5
Chris@564 9 SV_MODULE_HAVE=HAVE_$(echo $1 | tr '[a-z]' '[A-Z]')
Chris@564 10 SV_MODULE_FAILED=1
Chris@579 11 if test -n "$$1_LIBS" ; then
Chris@579 12 AC_MSG_NOTICE([User set ${SV_MODULE_MODULE}_LIBS explicitly, skipping test for $SV_MODULE_MODULE])
Chris@579 13 CXXFLAGS="$CXXFLAGS $$1_CFLAGS"
Chris@579 14 LIBS="$LIBS $$1_LIBS"
Chris@579 15 SV_MODULE_FAILED=""
Chris@579 16 fi
Chris@564 17 if test -z "$SV_MODULE_VERSION_TEST" ; then
Chris@564 18 SV_MODULE_VERSION_TEST=$SV_MODULE_MODULE
Chris@564 19 fi
Chris@579 20 if test -n "$SV_MODULE_FAILED" && test -n "$PKG_CONFIG"; then
Chris@564 21 PKG_CHECK_MODULES($1,[$SV_MODULE_VERSION_TEST],[HAVES="$HAVES $SV_MODULE_HAVE";CXXFLAGS="$CXXFLAGS $$1_CFLAGS";LIBS="$LIBS $$1_LIBS";SV_MODULE_FAILED=""],[AC_MSG_NOTICE([Failed to find required module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means])])
Chris@564 22 fi
Chris@564 23 if test -n "$SV_MODULE_FAILED"; then
Chris@564 24 AC_CHECK_HEADER([$SV_MODULE_HEADER],[HAVES="$HAVES $SV_MODULE_HAVE"],[AC_MSG_ERROR([Failed to find header $SV_MODULE_HEADER for required module $SV_MODULE_MODULE])])
Chris@564 25 if test -n "$SV_MODULE_LIB"; then
Chris@564 26 AC_CHECK_LIB([$SV_MODULE_LIB],[$SV_MODULE_FUNC],[LIBS="$LIBS -l$SV_MODULE_LIB"],[AC_MSG_ERROR([Failed to find library $SV_MODULE_LIB for required module $SV_MODULE_MODULE])])
Chris@564 27 fi
Chris@564 28 fi
Chris@564 29 ])
Chris@564 30
Chris@564 31 AC_DEFUN([SV_MODULE_OPTIONAL],
Chris@564 32 [
Chris@564 33 SV_MODULE_MODULE=$1
Chris@564 34 SV_MODULE_VERSION_TEST="$2"
Chris@564 35 SV_MODULE_HEADER=$3
Chris@564 36 SV_MODULE_LIB=$4
Chris@564 37 SV_MODULE_FUNC=$5
Chris@564 38 SV_MODULE_HAVE=HAVE_$(echo $1 | tr '[a-z]' '[A-Z]')
Chris@564 39 SV_MODULE_FAILED=1
Chris@579 40 if test -n "$$1_LIBS" ; then
Chris@579 41 AC_MSG_NOTICE([User set ${SV_MODULE_MODULE}_LIBS explicitly, skipping test for $SV_MODULE_MODULE])
Chris@579 42 CXXFLAGS="$CXXFLAGS $$1_CFLAGS"
Chris@579 43 LIBS="$LIBS $$1_LIBS"
Chris@579 44 SV_MODULE_FAILED=""
Chris@579 45 fi
Chris@564 46 if test -z "$SV_MODULE_VERSION_TEST" ; then
Chris@564 47 SV_MODULE_VERSION_TEST=$SV_MODULE_MODULE
Chris@564 48 fi
Chris@579 49 if test -n "$SV_MODULE_FAILED" && test -n "$PKG_CONFIG"; then
Chris@566 50 PKG_CHECK_MODULES($1,[$SV_MODULE_VERSION_TEST],[HAVES="$HAVES $SV_MODULE_HAVE";CXXFLAGS="$CXXFLAGS $$1_CFLAGS";LIBS="$LIBS $$1_LIBS";SV_MODULE_FAILED=""],[AC_MSG_NOTICE([Failed to find optional module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means])])
Chris@564 51 fi
Chris@564 52 if test -n "$SV_MODULE_FAILED"; then
Chris@564 53 AC_CHECK_HEADER([$SV_MODULE_HEADER],[HAVES="$HAVES $SV_MODULE_HAVE";SV_MODULE_FAILED=""],[AC_MSG_NOTICE([Failed to find header $SV_MODULE_HEADER for optional module $SV_MODULE_MODULE])])
Chris@564 54 if test -z "$SV_MODULE_FAILED"; then
Chris@564 55 if test -n "$SV_MODULE_LIB"; then
Chris@564 56 AC_CHECK_LIB([$SV_MODULE_LIB],[$SV_MODULE_FUNC],[LIBS="$LIBS -l$SV_MODULE_LIB"],[AC_MSG_NOTICE([Failed to find library $SV_MODULE_LIB for optional module $SV_MODULE_MODULE])])
Chris@564 57 fi
Chris@564 58 fi
Chris@564 59 fi
Chris@564 60 ])
Chris@564 61
Chris@568 62 # Check for Qt. The only part of Qt we use directly is qmake.
Chris@568 63
Chris@564 64 AC_DEFUN([SV_CHECK_QT],
Chris@564 65 [
Chris@564 66 AC_REQUIRE([AC_PROG_CXX])
Chris@564 67
Chris@568 68 if test x$QMAKE = x ; then
Chris@636 69 AC_CHECK_PROG(QMAKE, qmake-qt5, $QTDIR/bin/qmake-qt5,,$QTDIR/bin/)
Chris@568 70 fi
Chris@568 71 if test x$QMAKE = x ; then
Chris@568 72 AC_CHECK_PROG(QMAKE, qmake, $QTDIR/bin/qmake,,$QTDIR/bin/)
Chris@568 73 fi
Chris@568 74 if test x$QMAKE = x ; then
Chris@568 75 AC_CHECK_PROG(QMAKE, qmake.exe, $QTDIR/bin/qmake.exe,,$QTDIR/bin/)
Chris@568 76 fi
Chris@568 77 if test x$QMAKE = x ; then
Chris@636 78 AC_CHECK_PROG(QMAKE, qmake-qt5, qmake-qt5,,$PATH)
Chris@568 79 fi
Chris@568 80 if test x$QMAKE = x ; then
Chris@568 81 AC_CHECK_PROG(QMAKE, qmake, qmake,,$PATH)
Chris@568 82 fi
Chris@568 83 if test x$QMAKE = x ; then
Chris@568 84 AC_MSG_ERROR([
Chris@636 85 Failed to find the required qmake-qt5 or qmake program. Please
Chris@636 86 ensure you have the necessary Qt5 development files installed, and
Chris@636 87 if necessary set QTDIR to the location of your Qt5 installation.
Chris@564 88 ])
Chris@564 89 fi
Chris@564 90
Chris@564 91 # Suitable versions of qmake should print out something like:
Chris@564 92 #
Chris@564 93 # QMake version 2.01a
Chris@564 94 # Using Qt version 4.6.3 in /usr/lib
Chris@564 95 #
Chris@564 96 # This may be translated, so we check only for the numbers (2.x and 4.x
Chris@564 97 # in that order).
Chris@564 98 #
Chris@564 99 QMAKE_VERSION_OUTPUT=`$QMAKE -v`
Chris@564 100 case "$QMAKE_VERSION_OUTPUT" in
Chris@636 101 *5.*) ;;
Chris@564 102 *) AC_MSG_WARN([
Chris@564 103 *** The version of qmake found in "$QMAKE" looks like it might be
Chris@636 104 from the wrong version of Qt (Qt5 is required). Please check
Chris@636 105 that this is the correct version of qmake for Qt5 builds.
Chris@564 106 ])
Chris@564 107 esac
Chris@564 108
Chris@571 109 case "`uname`" in
Chris@571 110 *Darwin*) QMAKE="$QMAKE -spec macx-g++";;
Chris@571 111 esac
Chris@571 112
Chris@564 113 ])
Chris@564 114