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.3.1, rncbc@rncbc.org, qsampler) |
AC_INIT(Qsampler, 0.2.3.7, 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) |
79 |
AC_HELP_STRING([--with-libgig=PATH], [use alternate libgig install path]), |
AC_HELP_STRING([--with-libgig=PATH], [use alternate libgig install path]), |
80 |
[ac_with_paths="$ac_with_paths $withval"]) |
[ac_with_paths="$ac_with_paths $withval"]) |
81 |
|
|
82 |
|
|
83 |
|
# Honor user specified flags. |
84 |
|
ac_cflags=$CFLAGS |
85 |
|
ac_ldflags=$LDFLAGS |
86 |
|
|
87 |
|
|
88 |
# Checks for programs. |
# Checks for programs. |
89 |
AC_PROG_CC |
AC_PROG_CC |
90 |
AC_PROG_CPP |
AC_PROG_CPP |
96 |
AC_LANG_C |
AC_LANG_C |
97 |
AC_LANG_CPLUSPLUS |
AC_LANG_CPLUSPLUS |
98 |
|
|
99 |
|
PKG_PROG_PKG_CONFIG |
100 |
|
|
101 |
# Check for proper flags. |
# Check for proper flags. |
102 |
ac_arch=`uname -m` |
ac_arch=`uname -m` |
350 |
|
|
351 |
# Check for optional libraries. |
# Check for optional libraries. |
352 |
if test "x$ac_libgig" = "xyes"; then |
if test "x$ac_libgig" = "xyes"; then |
353 |
AC_CHECK_LIB(gig, main, [ac_libgig="yes"], [ac_libgig="no"]) |
PKG_CHECK_MODULES(LIBGIG, gig >= 3.3.0, [ac_libgig="yes"], [ac_libgig="no"]) |
354 |
|
AC_SUBST(LIBGIG_CFLAGS) |
355 |
|
AC_SUBST(LIBGIG_LIBS) |
356 |
|
ac_cflags="$ac_libs $LIBGIG_CFLAGS" |
357 |
|
ac_libs="$ac_libs $LIBGIG_LIBS" |
358 |
if test "x$ac_libgig" = "xyes"; then |
if test "x$ac_libgig" = "xyes"; then |
359 |
AC_DEFINE(CONFIG_LIBGIG, 1, [Define if libgig is available.]) |
AC_DEFINE(CONFIG_LIBGIG, 1, [Define if libgig is available.]) |
360 |
ac_libs="$ac_libs -lgig" |
AC_DEFINE(HAVE_LIBGIG_SETAUTOLOAD, 1, [Define if libgig provides gig::File::SetAutoLoad() method.]) |
361 |
AC_MSG_CHECKING([for gig::File::SetAutoLoad() method in libgig]) |
have_libgig_setautoload="yes" |
|
AC_LANG_SAVE |
|
|
AC_LANG_CPLUSPLUS |
|
|
CXXFLAGS="$ac_libs" |
|
|
AC_TRY_COMPILE([ |
|
|
#include <stdlib.h> |
|
|
#include <gig.h> |
|
|
],[ |
|
|
gig::File file; |
|
|
file.SetAutoLoad(false); |
|
|
], |
|
|
have_libgig_setautoload="yes", |
|
|
have_libgig_setautoload="no" |
|
|
) |
|
|
AC_LANG_RESTORE |
|
|
AC_MSG_RESULT([$have_libgig_setautoload]) |
|
|
if test "x$have_libgig_setautoload" = "xyes"; then |
|
|
AC_DEFINE(HAVE_LIBGIG_SETAUTOLOAD, 1, [Define if libgig provides gig::File::SetAutoLoad() method.]) |
|
|
fi |
|
362 |
fi |
fi |
363 |
fi |
fi |
364 |
|
|
380 |
|
|
381 |
AC_SUBST(ac_libs) |
AC_SUBST(ac_libs) |
382 |
AC_SUBST(ac_incpath) |
AC_SUBST(ac_incpath) |
383 |
|
AC_SUBST(ac_cflags) |
384 |
|
AC_SUBST(ac_ldflags) |
385 |
|
|
386 |
# Checks for header files. |
# Checks for header files. |
387 |
AC_HEADER_STDC |
AC_HEADER_STDC |