[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Conditional sources
From: |
NightStrike |
Subject: |
Conditional sources |
Date: |
Sun, 4 Nov 2007 13:47:06 -0500 |
I am trying to figure out how to do conditional sources. Basically,
here is the setup:
lib/uuid.c
lib32/uuid.c
If I pass --with-m32 to configure, I want to use the second source.
If I don't, then I want to use the first. I put this in configure.ac:
AC_ARG_WITH(m32,
[ --with-m32 Compile lib32 stuff.. testing only],
[ WITH_32=yes ],
[ WITH_32= ])
AM_CONDITIONAL(WITH32, test x$WITH_32 != x)
And I put this in Makefile.am:
if WITH32
crtdir=$(prefix)/lib32
uuidsrc = lib32/uuid.c
else
crtdir=$(prefix)/$(target)/lib
uuidsrc = lib/uuid.c
endif
crtlibs_LIBRARIES += libuuid.a
libuuid_a_SOURCES = $(uuidsrc)
When I run autoreconf, I get this:
Makefile.am: object `uuid.$(OBJEXT)' created by `lib32/uuid.c' and `lib/uuid.c'
make: *** [../crttest/Makefile.in] Error 1
Any ideas?
- Conditional sources,
NightStrike <=
- Re: Conditional sources, Benoit SIGOURE, 2007/11/04
- Re: Conditional sources, NightStrike, 2007/11/04
- Re: Conditional sources, Ralf Wildenhues, 2007/11/04
- Re: Conditional sources, NightStrike, 2007/11/04
- Re: Conditional sources, Ralf Wildenhues, 2007/11/04
- Re: Conditional sources, NightStrike, 2007/11/05
- Re: Conditional sources, Ralf Wildenhues, 2007/11/05
- Re: Conditional sources, NightStrike, 2007/11/05