[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Newbie: getopt - the right way
From: |
Simon Waters |
Subject: |
Newbie: getopt - the right way |
Date: |
Fri, 07 Mar 2003 16:11:09 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021130 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I want to autoconf/automake the "right way" for including GNU
getopt_long in a C program.
Currently configure.ac has;
AC_SUBST(LIBOBJS)
AC_CHECK_FUNCS(getopt_long , , [LIBOBJS="$LIBOBJS getopt.o getopt1.o"] )
In ./src/ I have getopt.h getopt.c getopt1.c
EXTRA_DIST lists relevant files to include.
So where do I stick LIBOBJ in src/Makefile.am to best effect? Or is
there a better way?
I'm tending to think it would be better to just include the sources on
the relevant line as I can't figure out how to put LIBOBJ cleanly in
Makefile.am
Alas "hello" always builds it's own getopt, which is looking
appeallingly simple at the moment. I seem to have misplaced the tutorial
page that got me this far as well :-(
-----BEGIN PGP SIGNATURE-----
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQE+aMSbGFXfHI9FVgYRAl7OAJ44t7A3IU5CxCqVE3RsKNI452Wc9wCeKNE5
zFdMX1GZ9NU9g1CkEBKSnW4=
=S5xV
-----END PGP SIGNATURE-----
- Newbie: getopt - the right way,
Simon Waters <=