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.36, 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) |
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)]), |
61 |
[ac_stacktrace="$enableval"]) |
[ac_stacktrace="$enableval"]) |
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 |
|
|
|
# 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 |
|
|
fi |
|
|
|
|
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]), |
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" |
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 |
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.2], |
AC_CACHE_CHECK([for Qt library version >= 4.4], |
157 |
ac_cv_qtversion, [ |
ac_cv_qtversion, [ |
158 |
AC_TRY_LINK([#include "QtCore/qglobal.h"], [ |
AC_TRY_LINK([#include "QtCore/qglobal.h"], [ |
159 |
#if QT_VERSION < 0x040200 |
#if QT_VERSION < 0x040400 |
160 |
#error Qt library 4.2 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.2 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 |
|
|