FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Development

 
 
LinkBack Thread Tools
 
Old 06-01-2008, 04:24 PM
Ray Van Dolson
 
Default Best way to enable _GNU_SOURCE

automake / autoconf newbie here. I have a package that isn't currently
being built with _GNU_SOURCE defined and is running into compile
problems when a portion of it attempts to access hostent->h_addr.

If I compile with -D_GNU_SOURCE all is well, but I want to get this
fixed correctly upstream. What is the proper / preferred way to do
this? I see a couple options:

- Get it added to acinclude.m4 and it will show up somewhere in a
header file(?)
- Modify configure.ac (or other) to generage a configure.in that
tacks it onto DEFS which shows up then as DEFS in configure and
populates DEFS in the resultant Makefile so we have -D_GNU_SOURCE
passed to the compiler

What other ways are there to do this and what's the preferred way?

I'll answer my own question if I find the answer in the automake /
autoconf docs.

Ray

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 06-01-2008, 04:47 PM
Ray Van Dolson
 
Default Best way to enable _GNU_SOURCE

> - Modify configure.ac (or other) to generage a configure.in that
> tacks it onto DEFS which shows up then as DEFS in configure and
> populates DEFS in the resultant Makefile so we have -D_GNU_SOURCE
> passed to the compiler

Well, the end solution was to modify configure.ac to include the
following:

AC_GNU_SOURCE

Pretty straightforward.

Ray

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 

Thread Tools




All times are GMT. The time now is 09:11 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org