/[svn]/qsampler/trunk/configure.ac
ViewVC logotype

Diff of /qsampler/trunk/configure.ac

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2083 by capela, Tue Apr 13 07:16:54 2010 UTC revision 2481 by capela, Thu Nov 7 18:22:48 2013 UTC
# Line 1  Line 1 
1  # Process this file with autoconf to produce a configure script.  # Process this file with autoconf to produce a configure script.
2  AC_INIT(Qsampler, 0.2.2.21, rncbc@rncbc.org, qsampler)  AC_INIT(Qsampler, 0.2.2.42, rncbc@rncbc.org, qsampler)
3    
4  AC_CONFIG_SRCDIR(src/qsampler.cpp)  AC_CONFIG_SRCDIR(src/qsampler.cpp)
5  AC_CONFIG_HEADERS(src/config.h)  AC_CONFIG_HEADERS(src/config.h)
# Line 29  else Line 29  else
29  fi  fi
30  AC_SUBST(ac_debug)  AC_SUBST(ac_debug)
31    
32    
33    # Enable Qt4/5 availability.
34    AC_ARG_ENABLE(qt4,
35      AC_HELP_STRING([--enable-qt4], [enable Qt4 build (default=yes)]),
36      [ac_qt4="$enableval"],
37      [ac_qt4="yes"])
38    
39    AC_ARG_ENABLE(qt5,
40      AC_HELP_STRING([--enable-qt5], [enable Qt5 build (default=no)]),
41      [ac_qt5="$enableval"],
42      [ac_qt5="no"])
43    
44    if test "x$ac_qt4" = "xno"; then
45       ac_qt5="yes"
46    fi
47    if test "x$ac_qt5" = "xyes"; then
48       ac_qt4="no"
49    fi
50    
51  # Enable libgig availability.  # Enable libgig availability.
52  AC_ARG_ENABLE(libgig,  AC_ARG_ENABLE(libgig,
53    AC_HELP_STRING([--enable-libgig], [enable libgig interface (default=yes)]),    AC_HELP_STRING([--enable-libgig], [enable libgig interface (default=yes)]),
# Line 41  AC_ARG_ENABLE(stacktrace, Line 60  AC_ARG_ENABLE(stacktrace,
60    [ac_stacktrace="$enableval"])    [ac_stacktrace="$enableval"])
61    
62    
63    if test "$cross_compiling" != yes; then
64  # Standard installation base dirs.  # Standard installation base dirs.
65  ac_with_paths="/usr /usr/local"  ac_with_paths="/usr /usr/local"
66    
67    ac_qtdirs="qt"
68    
69    if test "x$ac_qt4" = "xyes"; then
70       ac_qtdirs="qt4 $ac_qtdirs"
71    fi
72    if test "x$ac_qt5" = "xyes"; then
73       ac_qtdirs="qt5 $ac_qtdirs"
74    fi
75    
76  # Some a-la-debian alternatives...  # Some a-la-debian alternatives...
77  for X in /usr/lib /usr/lib64 /usr/share; do  for X in /usr/lib /usr/lib64 /usr/share; do
78    for Y in qt qt4; do    for Y in $ac_qtdirs; do
79      if test -d $X/$Y/bin; then      if test -d $X/$Y/bin; then
80        ac_with_paths="$ac_with_paths $X/$Y"        ac_with_paths="$ac_with_paths $X/$Y"
81      fi      fi
82    done    done
83  done  done
84    fi
85    
86  # Set for alternate Qt installation dir.  # Set for alternate Qt installation dir.
87  AC_ARG_WITH(qt,  AC_ARG_WITH(qt,
# Line 85  for X in $ac_with_paths; do Line 115  for X in $ac_with_paths; do
115    if test -d $X/bin; then    if test -d $X/bin; then
116      ac_path="$X/bin:$ac_path"      ac_path="$X/bin:$ac_path"
117    fi    fi
118    if test -x $X/qmake; then  # if test -x $X/qmake; then
119      ac_path="$X:$ac_path"  #   ac_path="$X:$ac_path"
120    fi  # fi
121    if test -d $X/include; then    if test -d $X/include; then
122      for Y in qt qt4; do      for Y in $ac_qtdirs; do
123        if test -d $X/include/$Y; then        if test -d $X/include/$Y; then
124          CFLAGS="-I$X/include/$Y $CFLAGS"          CFLAGS="-I$X/include/$Y $CFLAGS"
125          CPPFLAGS="-I$X/include/$Y $CPPFLAGS"          CPPFLAGS="-I$X/include/$Y $CPPFLAGS"
# Line 110  for X in $ac_with_paths; do Line 140  for X in $ac_with_paths; do
140    fi    fi
141  done  done
142    
143    # Check for proper flags.
144    ac_arch=`uname -m`
145    if test "x$ac_arch" = "xx86_64"; then
146       CFLAGS="-fPIC $CFLAGS"
147       CPPFLAGS="-fPIC $CPPFLAGS"
148    fi
149    
150  # Check for proper Qt version.  # Check for proper Qt version.
151  AC_CACHE_CHECK([for Qt library version >= 4.1],  AC_CACHE_CHECK([for Qt library version >= 4.4],
152    ac_cv_qtversion, [    ac_cv_qtversion, [
153    AC_TRY_LINK([#include "Qt/qglobal.h"], [    AC_TRY_LINK([#include "QtCore/qglobal.h"], [
154  #if QT_VERSION < 0x040100  #if QT_VERSION < 0x040400
155  #error Qt library 4.1 or greater required.  #error Qt library 4.4 or greater required.
156  #endif  #endif
157      ], ac_cv_qtversion="yes", [      ], ac_cv_qtversion="yes", [
158        echo "no; Qt 4.1 or greater is required"        echo "no; Qt 4.4 or greater is required"
159        exit        exit
160      ])      ])
161  ])  ])
# Line 178  if test "x$ac_liblscp" = "xno"; then Line 215  if test "x$ac_liblscp" = "xno"; then
215     AC_MSG_ERROR([LSCP library not found.])     AC_MSG_ERROR([LSCP library not found.])
216  fi  fi
217  ac_libs="$ac_libs -llscp"  ac_libs="$ac_libs -llscp"
218    case "{$host}" in
219         *mingw*)
220         ac_libs="$ac_libs -lws2_32"
221         LIBS="$LIBS -lws2_32"
222         ;;
223    esac
224    
225  AC_CACHE_CHECK([for instrument_name in lscp_channel_info_t],  AC_CACHE_CHECK([for instrument_name in lscp_channel_info_t],
226    ac_cv_instrument_name, [    ac_cv_instrument_name, [
# Line 302  if test "x$ac_libgig" = "xyes"; then Line 345  if test "x$ac_libgig" = "xyes"; then
345        AC_LANG_SAVE        AC_LANG_SAVE
346        AC_LANG_CPLUSPLUS        AC_LANG_CPLUSPLUS
347        CXXFLAGS="$ac_libs"        CXXFLAGS="$ac_libs"
348        AC_TRY_RUN([        AC_TRY_COMPILE([
349  #include <stdlib.h>  #include <stdlib.h>
350  #include <gig.h>  #include <gig.h>
351  int main() {        ],[
352      gig::File file;      gig::File file;
353      file.SetAutoLoad(false);      file.SetAutoLoad(false);
     exit(0);  
 }  
354        ],        ],
355        have_libgig_setautoload="yes",        have_libgig_setautoload="yes",
       have_libgig_setautoload="no",  
356        have_libgig_setautoload="no"        have_libgig_setautoload="no"
357        )        )
358        AC_LANG_RESTORE        AC_LANG_RESTORE
# Line 334  if test "x$ac_stacktrace" = "xyes"; then Line 374  if test "x$ac_stacktrace" = "xyes"; then
374     AC_DEFINE(CONFIG_STACKTRACE, 1, [Define if debugger stack-trace is enabled.])     AC_DEFINE(CONFIG_STACKTRACE, 1, [Define if debugger stack-trace is enabled.])
375  fi  fi
376    
377    # Some recent distros (eg. fedora, debian) require this.
378    if test "x$ac_cv_lib_X11_main" = "xyes"; then
379       ac_libs="$ac_libs -lX11"
380    fi
381    
382  AC_SUBST(ac_libs)  AC_SUBST(ac_libs)
383  AC_SUBST(ac_incpath)  AC_SUBST(ac_incpath)
384    
385  # Checks for header files.  # Checks for header files.
386  AC_HEADER_STDC  AC_HEADER_STDC
387  AC_HEADER_SYS_WAIT  AC_HEADER_SYS_WAIT
388  AC_CHECK_HEADERS(fcntl.h sys/ioctl.h unistd.h signal.h)  AC_CHECK_HEADERS(fcntl.h sys/ioctl.h unistd.h signal.h sys/socket.h)
389    
390  AC_CHECK_HEADER(lscp/client.h, [ac_lscp_h="yes"], [ac_lscp_h="no"])  AC_CHECK_HEADER(lscp/client.h, [ac_lscp_h="yes"], [ac_lscp_h="no"])
391  if test "x$ac_lscp_h" = "xno"; then  if test "x$ac_lscp_h" = "xno"; then

Legend:
Removed from v.2083  
changed lines
  Added in v.2481

  ViewVC Help
Powered by ViewVC