This is the mail archive of the
automake@gnu.org
mailing list for the automake project.
Newbie: getopt - the right way
- From: Simon Waters <Simon at wretched dot demon dot co dot uk>
- To: automake at gnu dot org
- Date: Fri, 07 Mar 2003 16:11:09 +0000
- Subject: Newbie: getopt - the right way
-----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-----