Re: [ecasound] re: qtecasound not compiling

New Message Reply Date view Thread view Subject view Author view Other groups

Subject: Re: [ecasound] re: qtecasound not compiling
From: Vadim Tkachenko (vt@freehold.crocodile.org)
Date: Sun Jan 02 2000 - 22:04:35 EET


Kai Vehmanen wrote:
>
> On Sat, 1 Jan 2000, Vadim Tkachenko wrote:
>
> > Well, first of all, are you sure that you want main() in libqt for
> > ecasound to compile? I haven't actually *run* the resulting qtecasound
>
> AC_CHECK_LIB(qt,main,qt_support=yes,qt_support=no)
>
> ...this just checks whether libqt exists (normal library paths). But
> I admit that this is not the best way to check for qt...

Since I know now that there *is* main() in libqt, the simpler thing will
be just AC_HAVE_LIB ;)

> > binary successfully ("Unable to open envelope
> > file/etc/ecasound/generic_oscillators"), but I'll get to that,
>
> Check your ~/.ecasoundrc ... nowadays defaults to /usr/local/share/ecasound ...

I've built the latest stable one, and nevertheless it hasn't installed
it, but tried to use it. Although, I might have goofed with RPM/tarball
mix, and skewed something.

Another question (I'm checking that right now), it seems to me that it's
not possible to configure and make ecasound not as root, why?

> > there in the library), but something else is wrong with the libraries
> > setup, and configure doesn't properly register the location of libqt
> > (even though I specify --with-qt-libraries), so if I override the
> > $qt_support to yes, and then 'make LIBS="-L/where/qt/is"', that does
>
> I've now made a few changes to configure.in. QTDIR, with-qt-libraries,
> etc now work as expected.

/snip/

Actually, the reason AC_CHECK_LIB... for qt was failing was twofold:
first of all, the check was invoked *BEFORE* AC_PATH_QT_2, and second,
AC_PATH_QT_2 wasn't setting the LDFLAGS, but QT_LDFLAGS instead. Do you
really need two sets of INCLUDES and LDFLAGS?

> > while ago) I ask you to reconsider and put the code into the CVS
> > repository, which could boost the development speed in order of
> > magnitude.
>
> Well, I really want to do this, but unfortunately I just haven't had
> the time. Currently most of my free time goes to developing ecawave
> (= simple wave editor based on libecasound). But I'll try to work on
> this....

Takes 15 minutes, including making coffee ;)

Now, here's a patch, feel free to do whatever you want with it (it's
against 1.6.9r9):

--- configure.in.orig Mon Dec 13 09:23:23 1999
+++ configure.in Sun Jan 2 13:52:34 2000
@@ -136,19 +136,66 @@
 AC_DEFINE(DISABLE_OSS_TRIGGER)
 fi
 
-dnl ---
-dnl Check for qt
-dnl ---
-dnl AC_PATH_QT_MOC
-AC_CHECK_LIB(qt,main,qt_support=yes,qt_support=no)
-AC_PATH_QT_2
+AC_MSG_CHECKING(whether to build qtecasound)
+
 AC_ARG_ENABLE(qt,
-[ --disable-qt Don't build qtecasound
(normally compiled)],
-qt_support=no)
-AM_CONDITIONAL(COMPILE_QTECASOUND, test x$qt_support = xyes)
-if test x$qt_support = xyes; then
- AC_DEFINE(COMPILE_QTECASOUND)
+[ --enable-qt Build qtecasound (default yes)],
+[
+ # This happens if the parameter WAS specified, either --enable-qt
or --disable-qt
+
+ case "$enableval" in
+
+ y | yes)
+
+ AC_MSG_RESULT(yes)
+ qt_support="yes"
+ ;;
+
+ n | no)
+
+ AC_MSG_RESULT(no)
+ qt_support="no"
+ ;;
+
+ *)
+
+ AC_MSG_ERROR([Invalid parameter value for --enable-qt:
$enableval])
+ ;;
+ esac
+],
+[
+ # This happens if the parameter was NOT specified, i.e. this is a
default behavior
+ qt_support=yes
+ AC_MSG_RESULT(yes)
+])
+
+# Now, it's a good time to check the conditions for building qtecasound
+
+AC_MSG_RESULT(checking qtecasound preconditions...)
+
+if test "$qt_support" = "yes" ; then
+
+ dnl ---
+ dnl Check for libqt
+ dnl ---
+ dnl AC_PATH_QT_MOC
+ AC_PATH_QT_2
+
+ LDFLAGS="${LDFLAGS} ${QT_LDFLAGS}"
+ AC_CHECK_LIB(qt,main,libqt_present=yes,libqt_present=no)
+
+ if test "$libqt_present" != "yes" ; then
+
+ AC_MSG_ERROR([qtecasound build requested, but libqt wasn't
found. Fix this or try --disable-qt])
+ fi
+
+ AC_DEFINE(COMPILE_QTECASOUND)
+
 fi
+
+AM_CONDITIONAL(COMPILE_QTECASOUND, test "$qt_support" = "yes")
+
+AC_MSG_RESULT(qtecasound preconditions: passed)
 
 dnl ---
 dnl Checks for header files.

> Kai Vehmanen

--vt


New Message Reply Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2a24 : Tue Jan 04 2000 - 09:45:23 EET