I seem to remember from the mailing list that automake does not support
autoconf variables in its its source list.  Here is what I do to change
the source list during configure:

Sources= \
        globus_args.c \
        globus_callback.c \
        globus_cfifo.c \
        globus_common.c \
        globus_common_paths.c \
        globus_debug.c \
        globus_error.c \
        globus_error_hierarchy.c \
        globus_fifo.c \
        globus_handle_table.c \
        globus_hashtable.c \
        globus_libc.c \
        globus_libc_setenv.c \
        globus_list.c \
        globus_module.c \
        globus_memory.c \
        globus_object.c \
        globus_object_cache.c \
        globus_object_hierarchy.c \
        globus_print.c \
        globus_priority_q.c \
        globus_strptime.c \
        globus_symboltable.c \
        globus_thread_common.c \
        globus_thread_pool.c \
        globus_tilde_expand.c \
        globus_time.c \
        globus_timeq.c \
        globus_url.c


if BUILD_PTHREADED_LIB
pthreadlib_LTLIBRARIES = libglobus_commonpthreaded.la

libglobus_commonpthreaded_la_SOURCES = \
        ${Sources} \
        globus_thread_pthreads.c

endif


if BUILD_SOLARIS_THREADED_LIB
solthreadlib_LTLIBRARIES = libglobus_commonsolaristhreaded.la

libglobus_commonsolaristhreaded_la_SOURCES = \
        ${Sources} \
        globus_thread_solaristhreads.c

endif


lib_LTLIBRARIES = libglobus_common.la

libglobus_common_la_SOURCES = \
        ${Sources} \
        globus_thread_none.c

EXTRA_libglobus_common_la_SOURCES = \
        globus_thread_pthreads.c \
        globus_thread_solaristhreads.c


Mo DeJong wrote:
> 
> On Mon, 5 Jun 2000, H. Nanosecond wrote:
> 
> > Hello,
> >
> > conditionals in Automake work differently than in Make and are weird.
> > I suggest that you not use conditionals in that way, try this:
> >
> > Makefile.am: ================================================
> >
> > AUTOMAKE_OPTIONS = foreign
> >
> > lib_LTLIBRARIES = libtkgs.la
> >
> > #libtkgs_la_SOURCES = \
> > #lib.c
> > #This causes an error for some reason
> >
> > libtkgs_la_SOURCES = lib.c
> >
> > noinst_HEADERS = lib.h
> >
> > libtkgs_la_SOURCES += @EXTRASRC@
> 
> I tried that.
> 
> libtkgs_la_SOURCES = \
> tkgs.c \
> tkgs.h \
> tkgsColor.c \
> tkgsColor.h \
> tkgsDrawable.c \
> tkgsDrawable.h \
> tkgsDriver.h \
> tkgsFont.c \
> tkgsFont.h \
> tkgsInit.c \
> tkgsInt.h \
> tkgsObj.c \
> tkgsObj.h
> 
> libtkgs_la_SOURCES += @SYSINIT@
> 
> When I run automake, it prints out the following.
> 
> src/Makefile.am:7: libtkgs_la_SOURCES includes configure substitution
> `@SYSINIT@'
> 
> Same thing if I do it like so:
> 
> libtkgs_la_SOURCES = \
> tkgs.c \
> tkgs.h \
> tkgsColor.c \
> tkgsColor.h \
> tkgsDrawable.c \
> tkgsDrawable.h \
> tkgsDriver.h \
> tkgsFont.c \
> tkgsFont.h \
> tkgsInit.c \
> tkgsInt.h \
> tkgsObj.c \
> tkgsObj.h \
> @SYSINIT@
> 
> Whats the deal? How the heck do I compile
> something conditionally?
> 
> Mo DeJong
> Red Hat Inc

-- 
------------------------------------------------------------------
Michael Bletzinger      Software Developer, Alliance Computational
[EMAIL PROTECTED]  Environment & Security
217 265 5137            NCSA

Reply via email to