Autoconf help

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Autoconf help

Adam Thornton
This isn't exactly Hercules material, but I know there are some  
autoconf wizards around here...

What do I do for an AC macro where I want something like

--groupid=nje

Where it's not really an AC_ARG_ENABLE option, because you have to  
have a group ID, and it's not a path and therefore not derived from  
one of the existing directories?

Specifically, I want to say, "this program runs setgid as a member of  
a particular group.  If you don't specify the group, it's "nje".

And on a related note, is there a portable (across Unixes and  
Linuxes) way to check for the existence of a named group?  Anything  
better that grepping for a line in /etc/groups that starts with the  
group name followed by a colon?

Adam


Community email addresses:
  Post message: [hidden email]
  Subscribe:    [hidden email]
  Unsubscribe:  [hidden email]
  List owner:   [hidden email]

Files and archives at:
  http://groups.yahoo.com/group/hercules-390

Get the latest version of Hercules from:
  http://www.conmicro.cx/hercules 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/hercules-390/

<*> To unsubscribe from this group, send an email to:
    [hidden email]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Autoconf help

Greg Smith-14
On Mon, 2005-05-23 at 14:54 -0500, Adam Thornton wrote:

> This isn't exactly Hercules material, but I know there are some  
> autoconf wizards around here...
>
> What do I do for an AC macro where I want something like
>
> --groupid=nje
>
> Where it's not really an AC_ARG_ENABLE option, because you have to  
> have a group ID, and it's not a path and therefore not derived from  
> one of the existing directories?
>
> Specifically, I want to say, "this program runs setgid as a member of  
> a particular group.  If you don't specify the group, it's "nje".
>
> And on a related note, is there a portable (across Unixes and  
> Linuxes) way to check for the existence of a named group?  Anything  
> better that grepping for a line in /etc/groups that starts with the  
> group name followed by a colon?

I certainly don't want to come across as an expert on auto-magic and
configure, mainly because I'm not, but I have observed that a lot of
tests involve creating a file conftest.c and compiling and executing it.
So maybe you could design a conftest.c program that calls the `getgrnam'
function.  Can't say off-hand how you would do that, but I assume you
are sufficiently motivated;-)

Greg



Community email addresses:
  Post message: [hidden email]
  Subscribe:    [hidden email]
  Unsubscribe:  [hidden email]
  List owner:   [hidden email]

Files and archives at:
  http://groups.yahoo.com/group/hercules-390

Get the latest version of Hercules from:
  http://www.conmicro.cx/hercules 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/hercules-390/

<*> To unsubscribe from this group, send an email to:
    [hidden email]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Loading...