[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Autoconf/Autoheader - how to check for aRts library
From: |
Richard Wild |
Subject: |
Autoconf/Autoheader - how to check for aRts library |
Date: |
Mon, 27 Sep 2004 19:46:36 GMT |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040618 |
Hi all,
I have been trying to use Autoconf to generate a configure script for my
little project. I have been mostly successful, but there remains one
thing that I haven't worked out yet. The problem will be best
illustrated if I post the Makefile.in file:
<quote>
CC=@CC@
INSTALL=@INSTALL@
CFLAGS=@CFLAGS@ `artsc-config --cflags`
LDFLAGS=@LDFLAGS@
CLIBS=@LIBS@ `artsc-config --libs`
INSTALLDIR=@prefix@
arctracker: arctracker.o initialise.o read_mod.o play_mod.o
$(CC) $(CFLAGS) $(LDFLAGS) $(CLIBS) -o arctracker arctracker.o
initialise.o read_mod.o play_mod.o
arctracker.o: arctracker.h arctracker.c
$(CC) $(CFLAGS) -c arctracker.c
initialise.o: arctracker.h initialise.c
$(CC) $(CFLAGS) -c initialise.c
read_mod.o: arctracker.h read_mod.c
$(CC) $(CFLAGS) -c read_mod.c
play_mod.o: arctracker.h log_lin_tab.h play_mod.c
$(CC) $(CFLAGS) -c play_mod.c
clean:
rm -f ./arctracker ./*.o 2>/dev/null
install: arctracker
$(INSTALL) ./arctracker $(INSTALLDIR)/bin/arctracker
uninstall:
rm -f /usr/local/bin/arctracker 2>/dev/null
</quote>
Please notice that I use "artsc-config --cflags" and "artsc-config
--libs" to get the compiler switches for the aRts library. I think that
this is necessary since the aRts library and header file are installed
in unusual places.
There are two problems. Firstly, I only want to include those calls to
artsc-config IF the aRts library is installed, otherwise the
artsc-config program won't exist and the compile will fail, defeating
the point of the configure script in the first place. I want to build
the application so that if aRts is not installed, the application will
still compile but with the aRts output features left out.
Secondly, the configure script currently always thinks that aRts is not
present, so it always builds the application with the aRts features
disabled. This is again because the library is installed in a strange
place. How do I get the configure script to look in the paths given by
artsc-config?
Thanks.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Autoconf/Autoheader - how to check for aRts library,
Richard Wild <=