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.29, 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) |
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)]), |
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 |
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" |
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.2], |
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 < 0x040200 |
#if QT_VERSION < 0x040400 |
155 |
#error Qt library 4.2 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.2 or greater is required" |
echo "no; Qt 4.4 or greater is required" |
159 |
exit |
exit |
160 |
]) |
]) |
161 |
]) |
]) |