automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Troubles with conditional adding files to library


From: Gerald I. Evenden
Subject: Troubles with conditional adding files to library
Date: Thu, 26 Mar 2009 22:18:28 -0400
User-agent: KMail/1.9.10

I am quite new to using this system but managed to get it to make a 
distribution of a shared library.  The first try was, however, simple and 
straight forward.

However, I want selectively add two files to the library based upon the 
condition that they are *not* present on the target computer.  In 
configure.ac I added the lines:

AC_CHECK_FUNCS([strcasecmp strncasecmp],[CASECMP=1],[CASECMP=0])
AM_CONDITIONAL([NOCASECMP],[test CASECMP = 0])

Admittedly, I am completely guessing what is appropriate for the 2nd and 3rd 
arguments of AC_CHECK_FUNCS because I cannot find any examples in the manual.  
But I think I am a little closer on the AM_CON.. line---philosophically.

In Makefile.am I added the lines:

if NOCASECMP
    libproject_la_sources += strcasecmp.c strncasecmp.c

The Makefile.am (and libtool) previously ran successfully without the new 
lines.  Note that I am only considering one condition even though there are 
two files---if one is missing the other is also *very* likely to be missing.

I then ran autoreconf and ended up with:

 autoreconf
src/Makefile.am:16: unterminated conditionals: NOCASECMP_TRUE
/usr/share/automake-1.9/am/ltlib.am: automake does not support am__installdirs 
being defined conditionally
src/Makefile.am:3:   while processing `lib_LTLIBRARIES'
automake: ####################
automake: ## Internal Error ##
automake: ####################
automake: undefined condition `TRUE' for `am__installdirs'
automake: am__installdirs:
automake:   {
automake:     NOCASECMP => {
automake:       type: +=
automake:       where: /usr/share/automake-1.9/am/ltlib.am:
automake: src/Makefile.am:3: while processing `lib_LTLIBRARIES'
automake:       comment:
automake:       value: "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)"
automake:       owner: Automake
automake:     }
automake:   }
 ... plus some more.

I have RTFM'ed to exhaustion and would *greatly* appreciate a little guidance.

Thank-you in advance.

This system is the most arcane and obscure collection of sortware I have 
encountered since I started programming in 1959.

Also:
autoconf (GNU Autoconf) 2.61
automake (GNU automake) 1.9.6

-- 
The whole religious complexion of the modern world is due
to the absence from Jerusalem of a lunatic asylum.
-- Havelock Ellis (1859-1939) British psychologist




reply via email to

[Prev in Thread] Current Thread [Next in Thread]