i'm on hp-ux 11.00 and have autoconf 2.50 and automake 1.5.

i have following Makefile.am:

Makefile.am:

bin_PROGRAMS = test

test_SOURCES = test.c
test_LDADD       = $(LIBTEST)

lib_LIBRARIES = libtest1.a libtest2.a

libtest1_a_SOURCES = test1.c
libtest2_a_SOURCES = test2.c

depending on the operating system i want to to use different libraries:

configure.in:
...
case $target_os in
linux*)
        LIBTEST=libtest1.a
        ;;
*)
        LIBTEST=libtest2.a
        ;;
esac
AC_SUBST(LIBTEST)
...

but $(LIBTEST) doesn't appear in the generated Makefile in
test_DEPENDENCIES:

Makefile:
...
am_test_OBJECTS = test.$(OBJEXT)
test_OBJECTS = $(am_test_OBJECTS)
test_DEPENDENCIES =
test_LDFLAGS =
...

when i run make test i get following message:
...
/usr/ccs/bin/ld: Can't open libtest2.a
/usr/ccs/bin/ld: No such file or directory
make: *** [test] Error 1

is there a way to make this executable?
thanks for help
johannes

Reply via email to