octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #44976] configure test for sndfile not good en


From: Rik
Subject: [Octave-bug-tracker] [bug #44976] configure test for sndfile not good enough
Date: Fri, 01 May 2015 16:32:44 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:37.0) Gecko/20100101 Firefox/37.0

Follow-up Comment #2, bug #44976 (project octave):

The second approach, just testing for some features we need, will probably be
easier.  After libsnd is detected you could write a small test program for
configure.ac that includes the appropriate library headers and then tries to
use one of the constants.

Look in m4/acinclude.m4 for inspiration.  Here is something for checking
Qscintialla which I think could be used.


AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
    #include <Qsci/qsciglobal.h>
    ]], [[
    #if QSCINTILLA_VERSION < 0x020600
    #error Old FindFirst function found.
    #endif
    ]])],
  octave_cv_version_2_6_0=yes,
  octave_cv_version_2_6_0=no)


SW_FORMAT_OGG is an enum in sndfile.h so I don't know if you could get by with
AC_PREPROC_IFELSE, or whether you actually need to use AC_COMPILE_IFELSE to
compile the program too.


AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[
    #include <sndfile.h>
    ]], [[
    #if SF_FORMAT_OGG
    #endif
    ]])],
  octave_cv_sndfile_good=yes,
  octave_cv_sndfile_good=no)




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?44976>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]