Re: Question about Makefile templates for gtk



On Sat, Nov 06, 1999 at 11:33:00PM -0500, Havoc Pennington wrote:
> 
> Makefile.in is autogenerated from Makefile.am, then Makefile is generated
> from Makefile.in. If gdk wasn't linked it would have to be a bug in one of
> the build tools, maybe libtool or automake; gdk is specified in
> Makefile.am.
> 
> Havoc

I'm not so sure.
Take a look at Makefile.am in the gtk subdirectory:

libgtk_la_LDFLAGS = @STRIP_BEGIN@ \
        -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)    \
        -release $(LT_RELEASE)                                  \
        -export-dynamic                                         \
        @GLIB_DEPLIBS@                                          \
        @x_ldflags@                                             \
        @x_libs@                                                \
        -lm                                                     \
@STRIP_END@
#       $(top_builddir)/gdk/libgdk.la                              
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Why is this line commented out?  I think this is what caused me loads of
grief.

I have a related question regarding the configure.in file in the glib
subdirectory, lines 796-807:

                if test "$ac_cv_func_getpwuid_r" = "yes"; then
                        AC_MSG_CHECKING(whether getpwuid_r is posix like)
                        # getpwuid_r(0, NULL, NULL, 0) is the signature on
                        # solaris, if that is not found, the prog below won't
                        # compile, then the posix signature is assumed as
                        # the default.
                        AC_TRY_COMPILE([#include <pwd.h>],
                                [getpwuid_r(0, NULL, NULL, 0);],
                                [AC_MSG_RESULT(no)],
                                [AC_MSG_RESULT(yes)
                                AC_DEFINE(HAVE_GETPWUID_R_POSIX)])
                fi                                                   


The AIX xlc compiler has a brain-dead behavior, where
if it finds a function with an incorrect number of arguments,
it will flag it as an error, will still return an errno of 0.

eg. "conftest.c", line 4.14: 1506-098 (E) Missing argument(s). 

Under AIX 4.3, the prototype for getpwuid_r() is the POSIX one.  But
when xlc compiles the non-POSIX prototype, getpwuid_r(0, NULL, NULL, 0),
it says: "Missing argument(s)", but still accepts the non-POSIX prototype.
The binary will then build, and then every subsequent call to the
libglib will coredump!

Can the above test be changed to check for the POSIX prototype?
That would be:  
int getpwuid_r(uid_t, struct passwd *, char *, size_t, struct passwd **);

If the test fails, then default to getpwuid_r(0, NULL, NULL, 0).

I have no experience with automake, so I could use some assistance.
I have been spending hours tracking these bugs down on AIX............

Thanks.

-- 
Craig Rodrigues        
http://www.gis.net/~craigr    
rodrigc@mediaone.net          



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