[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to revise automake.am
From: |
Ralf Wildenhues |
Subject: |
Re: How to revise automake.am |
Date: |
Tue, 14 Sep 2004 19:34:08 +0200 |
User-agent: |
Mutt/1.4.1i |
* Zhi Qing Wu wrote on Fri, Sep 10, 2004 at 08:31:51PM CEST:
> Thanks for your quick reply. By following your advice,
> I did some changes to Makefile.am:
>
> The original Makefile.am:
> ...
> modpermisdir = $(libexecdir)
> modpermis_LTLIBRARIES = mod_permis.la
> mod_permis_la_SOURCES = mod_permis.cpp
> mod_permis_la_CXXFLAGS = $(APXS_CFLAGS)
> -I$(APXS_INCLUDE) $(RPC_CFLAGS) $(LIBGCJ_CXXFLAGS)
> mod_permis_la_LDFLAGS = -module -avoid-version
> ...
>
> The revised Makefile.am:
> ...
> modpermisdir = $(libexecdir)
> modpermis_LTLIBRARIES = mod_permis.la
> mod_permis_la_SOURCES = mod_permis.cpp
> mod_permis_la_CXXFLAGS = $(APXS_CFLAGS)
> -I$(APXS_INCLUDE)
> /home/zhiqing/tmp/shibboleth-1.2/apache $(RPC_CFLAGS)
You know how to add include paths to the preprocessor?
Use -I/some/path. Add it to _CPPFLAGS, not _CXXFLAGS.
> $(LIBGCJ_CXXFLAGS)
> mod_permis_la_LDFLAGS = -lgcj -module -avoid-version
> mod_permis_la_LDADD =
> /usr/lib/gcc-lib/i386-redhat-linux/3.3.2/libotherclass.so
This looks wrong. You should not have to add anything
compiler-internal.
>
> "otherclass" is the class I need to add to the program
> mod_permis.cpp (belong to the project)
> Directory "/home/zhiqing/tmp/shibboleth-1.2/apache"
> contains otherclass.h
> and mod_permis_la_LDADD points to the shared library
> "libotherclass.so"
>
> Yes, the project uses Libtool.
>
> The compilation result shows:
> apache/Makefile.am:44: use `mod_permis_la_LIBADD', not
> `mod_permis_la_LDADD'
Yes, precisely because your target is a library, not a program.
So use _LIBADD.
> /usr/share/automake-1.7/am/depend2.am: am__fastdepCXX
> does not appear in AM_CONDITIONAL
> ....
> and other errors.
Do you have AC_PROG_CXX in configure.ac?
Did you recreate all the autotools-generated files consistently?
Regards,
Ralf