/[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 2028 by capela, Wed Nov 4 18:59:57 2009 UTC revision 2483 by capela, Thu Dec 12 17:39:52 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.2, rncbc@rncbc.org, qsampler)  AC_INIT(Qsampler, 0.2.2.43, rncbc@rncbc.org, qsampler)
3    
4  AC_CONFIG_SRCDIR(src/qsamplerMainForm.ui)  AC_CONFIG_SRCDIR(src/qsampler.cpp)
5  AC_CONFIG_HEADERS(config.h)  AC_CONFIG_HEADERS(src/config.h)
6  AC_CONFIG_FILES(Makefile qsampler.pro qsampler.spec qsampler.desktop)  AC_CONFIG_FILES(Makefile qsampler.spec src/src.pri src/qsampler.desktop)
7    
8  # Set default installation prefix.  # Set default installation prefix.
9  AC_PREFIX_DEFAULT(/usr/local)  AC_PREFIX_DEFAULT(/usr/local)
# Line 21  AC_ARG_ENABLE(debug, Line 21  AC_ARG_ENABLE(debug,
21    
22  if test "x$ac_debug" = "xyes"; then  if test "x$ac_debug" = "xyes"; then
23     AC_DEFINE(CONFIG_DEBUG, 1, [Define if debugging is enabled.])     AC_DEFINE(CONFIG_DEBUG, 1, [Define if debugging is enabled.])
24       ac_stacktrace="yes"
25     ac_debug="debug"     ac_debug="debug"
26  else  else
27       ac_stacktrace="no"
28     ac_debug="release"     ac_debug="release"
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)]),
54    [ac_libgig="$enableval"],    [ac_libgig="$enableval"],
55    [ac_libgig="yes"])    [ac_libgig="yes"])
56    
57    # Enable debugger stack-trace option (assumes --enable-debug).
58    AC_ARG_ENABLE(stacktrace,
59      AC_HELP_STRING([--enable-stacktrace], [enable debugger stack-trace (default=no)]),
60      [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 77  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 102  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 170  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 294  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 321  if test "x$ac_round" = "xyes"; then Line 369  if test "x$ac_round" = "xyes"; then
369     AC_DEFINE(CONFIG_ROUND, 1, [Define if round is available.])     AC_DEFINE(CONFIG_ROUND, 1, [Define if round is available.])
370  fi  fi
371    
372    # Check for debugging stack-trace.
373    if test "x$ac_stacktrace" = "xyes"; then
374       AC_DEFINE(CONFIG_STACKTRACE, 1, [Define if debugger stack-trace is enabled.])
375    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
# Line 369  echo "  LSCP channel MIDI event support Line 427  echo "  LSCP channel MIDI event support
427  echo "  LSCP device MIDI event support . . . . . . . . . .: $ac_device_midi_event"  echo "  LSCP device MIDI event support . . . . . . . . . .: $ac_device_midi_event"
428  echo "  LSCP runtime max. voices / disk streams support  .: $ac_max_voices"  echo "  LSCP runtime max. voices / disk streams support  .: $ac_max_voices"
429  echo  echo
430    echo "  Debugger stack-trace (gdb) . . . . . . . . . . . .: $ac_stacktrace"
431    echo
432  echo "  Install prefix . . . . . . . . . . . . . . . . . .: $ac_prefix"  echo "  Install prefix . . . . . . . . . . . . . . . . . .: $ac_prefix"
433  echo  echo
434  echo "Now type 'make', followed by 'make install' as root."  echo "Now type 'make', followed by 'make install' as root."

Legend:
Removed from v.2028  
changed lines
  Added in v.2483

  ViewVC Help
Powered by ViewVC