/[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 2093 by capela, Tue May 18 09:36:00 2010 UTC revision 2511 by capela, Fri Jan 24 16:34:11 2014 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.23, rncbc@rncbc.org, qsampler)  AC_INIT(Qsampler, 0.2.3.1, 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    
52  # Enable libgig availability.  # Enable libgig availability.
53  AC_ARG_ENABLE(libgig,  AC_ARG_ENABLE(libgig,
54    AC_HELP_STRING([--enable-libgig], [enable libgig interface (default=yes)]),    AC_HELP_STRING([--enable-libgig], [enable libgig interface (default=yes)]),
# Line 44  AC_ARG_ENABLE(stacktrace, Line 64  AC_ARG_ENABLE(stacktrace,
64  # Standard installation base dirs.  # Standard installation base dirs.
65  ac_with_paths="/usr /usr/local"  ac_with_paths="/usr /usr/local"
66    
 # Some a-la-debian alternatives...  
 for X in /usr/lib /usr/lib64 /usr/share; do  
   for Y in qt qt4; do  
     if test -d $X/$Y/bin; then  
       ac_with_paths="$ac_with_paths $X/$Y"  
     fi  
   done  
 done  
   
67  # Set for alternate Qt installation dir.  # Set for alternate Qt installation dir.
68  AC_ARG_WITH(qt,  AC_ARG_WITH(qt,
69    AC_HELP_STRING([--with-qt=PATH], [use alternate Qt install path]),    AC_HELP_STRING([--with-qt=PATH], [use alternate Qt install path]),
# Line 79  AC_PROG_GCC_TRADITIONAL Line 90  AC_PROG_GCC_TRADITIONAL
90  AC_LANG_C  AC_LANG_C
91  AC_LANG_CPLUSPLUS  AC_LANG_CPLUSPLUS
92    
93    
94    # Check for proper flags.
95    ac_arch=`uname -m`
96    
97    # Check for some a-la-debian alternatives...
98    ac_qtdirs="qt"
99    
100    if test "x$ac_qt4" = "xyes"; then
101       ac_qtdirs="qt4 $ac_qtdirs"
102    fi
103    if test "x$ac_qt5" = "xyes"; then
104       ac_qtdirs="qt5 $ac_qtdirs"
105    fi
106    
107    ac_topdirs="/usr/share /usr/lib"
108    
109    if test "x$ac_arch" = "xx86_64"; then
110       CFLAGS="-fPIC $CFLAGS"
111       CPPFLAGS="-fPIC $CPPFLAGS"
112       ac_topdirs="$ac_topdirs /usr/lib64"
113    fi
114    
115    for X in $ac_topdirs; do
116      for Y in $ac_qtdirs; do
117        if test -d $X/$Y/bin; then
118          ac_with_paths="$X/$Y $ac_with_paths"
119        fi
120      done
121    done
122    
123  # Prepend alternate dependencies paths.  # Prepend alternate dependencies paths.
124  ac_path=$PATH  ac_path=$PATH
125  for X in $ac_with_paths; do  for X in $ac_with_paths; do
126    if test -d $X/bin; then    if test -d $X/bin; then
127      ac_path="$X/bin:$ac_path"      ac_path="$X/bin:$ac_path"
128    fi    fi
129    if test -x $X/qmake; then  # if test -x $X/qmake; then
130      ac_path="$X:$ac_path"  #   ac_path="$X:$ac_path"
131    fi  # fi
132    if test -d $X/include; then    if test -d $X/include; then
133      for Y in qt qt4; do      for Y in $ac_qtdirs; do
134        if test -d $X/include/$Y; then        if test -d $X/include/$Y; then
135          CFLAGS="-I$X/include/$Y $CFLAGS"          CFLAGS="-I$X/include/$Y $CFLAGS"
136          CPPFLAGS="-I$X/include/$Y $CPPFLAGS"          CPPFLAGS="-I$X/include/$Y $CPPFLAGS"
# Line 100  for X in $ac_with_paths; do Line 141  for X in $ac_with_paths; do
141      CPPFLAGS="-I$X/include $CPPFLAGS"      CPPFLAGS="-I$X/include $CPPFLAGS"
142      ac_incpath="$X/include $ac_incpath"      ac_incpath="$X/include $ac_incpath"
143    fi    fi
144    if test -d $X/lib64; then    if test "x$ac_arch" = "xx86_64" -a -d $X/lib64; then
145      LIBS="-L$X/lib64 $LIBS"      LIBS="-L$X/lib64 $LIBS"
146      ac_libs="-L$X/lib64 $ac_libs"      ac_libs="-L$X/lib64 $ac_libs"
147    fi    fi
# Line 110  for X in $ac_with_paths; do Line 151  for X in $ac_with_paths; do
151    fi    fi
152  done  done
153    
154    
155  # Check for proper Qt version.  # Check for proper Qt version.
156  AC_CACHE_CHECK([for Qt library version >= 4.1],  AC_CACHE_CHECK([for Qt library version >= 4.4],
157    ac_cv_qtversion, [    ac_cv_qtversion, [
158    AC_TRY_LINK([#include "Qt/qglobal.h"], [    AC_TRY_LINK([#include "QtCore/qglobal.h"], [
159  #if QT_VERSION < 0x040100  #if QT_VERSION < 0x040400
160  #error Qt library 4.1 or greater required.  #error Qt library 4.4 or greater required.
161  #endif  #endif
162      ], ac_cv_qtversion="yes", [      ], ac_cv_qtversion="yes", [
163        echo "no; Qt 4.1 or greater is required"        echo "no; Qt 4.4 or greater is required"
164        exit        exit
165      ])      ])
166  ])  ])
167    
168    
169  # A common error message:  # A common error message:
170  ac_errmsg="not found in current PATH. Maybe QT development environment isn't available (qt-devel)."  ac_errmsg="not found in current PATH. Maybe QT development environment isn't available (qt-devel)."
171    
# Line 178  if test "x$ac_liblscp" = "xno"; then Line 221  if test "x$ac_liblscp" = "xno"; then
221     AC_MSG_ERROR([LSCP library not found.])     AC_MSG_ERROR([LSCP library not found.])
222  fi  fi
223  ac_libs="$ac_libs -llscp"  ac_libs="$ac_libs -llscp"
224    case "{$host}" in
225         *mingw*)
226         ac_libs="$ac_libs -lws2_32"
227         LIBS="$LIBS -lws2_32"
228         ;;
229    esac
230    
231  AC_CACHE_CHECK([for instrument_name in lscp_channel_info_t],  AC_CACHE_CHECK([for instrument_name in lscp_channel_info_t],
232    ac_cv_instrument_name, [    ac_cv_instrument_name, [
# Line 302  if test "x$ac_libgig" = "xyes"; then Line 351  if test "x$ac_libgig" = "xyes"; then
351        AC_LANG_SAVE        AC_LANG_SAVE
352        AC_LANG_CPLUSPLUS        AC_LANG_CPLUSPLUS
353        CXXFLAGS="$ac_libs"        CXXFLAGS="$ac_libs"
354        AC_TRY_RUN([        AC_TRY_COMPILE([
355  #include <stdlib.h>  #include <stdlib.h>
356  #include <gig.h>  #include <gig.h>
357  int main() {        ],[
358      gig::File file;      gig::File file;
359      file.SetAutoLoad(false);      file.SetAutoLoad(false);
     exit(0);  
 }  
360        ],        ],
361        have_libgig_setautoload="yes",        have_libgig_setautoload="yes",
       have_libgig_setautoload="no",  
362        have_libgig_setautoload="no"        have_libgig_setautoload="no"
363        )        )
364        AC_LANG_RESTORE        AC_LANG_RESTORE
# Line 334  if test "x$ac_stacktrace" = "xyes"; then Line 380  if test "x$ac_stacktrace" = "xyes"; then
380     AC_DEFINE(CONFIG_STACKTRACE, 1, [Define if debugger stack-trace is enabled.])     AC_DEFINE(CONFIG_STACKTRACE, 1, [Define if debugger stack-trace is enabled.])
381  fi  fi
382    
383    # Some recent distros (eg. fedora, debian) require this.
384    if test "x$ac_cv_lib_X11_main" = "xyes"; then
385       ac_libs="$ac_libs -lX11"
386    fi
387    
388  AC_SUBST(ac_libs)  AC_SUBST(ac_libs)
389  AC_SUBST(ac_incpath)  AC_SUBST(ac_incpath)
390    
391  # Checks for header files.  # Checks for header files.
392  AC_HEADER_STDC  AC_HEADER_STDC
393  AC_HEADER_SYS_WAIT  AC_HEADER_SYS_WAIT
394  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)
395    
396  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"])
397  if test "x$ac_lscp_h" = "xno"; then  if test "x$ac_lscp_h" = "xno"; then

Legend:
Removed from v.2093  
changed lines
  Added in v.2511

  ViewVC Help
Powered by ViewVC