On 01/09/2012 03:46 PM, Roger Pau Monné wrote: > Hello! > > I'm a new user of the GNU Autotools build system, and I need some help > from more experienced Autoconf fellows. I'm trying to create an > Autoconf script that generates a config.h and Config.mk to include to > my sources and Makefiles respectively, but I'm having some trouble > when trying to use Autoconf without using Automake. That's a supported use of autoconf, but if you don't mind me asking, what do you have against also using automake? > AC_CANONICAL_HOST As documented in https://www.gnu.org/software/autoconf/manual/autoconf.html#Canonicalizing, if you use AC_CANONICAL_*, then _you_ are responsible for providing config.sub in the AC_CONFIG_AUX_DIR (default '.') directory. You can meet this requirement by using automake, or you can meet it by doing 'cp /some/path/to/config.sub .' by hand. [Hint - if you built autoconf from source, then your autoconf source tree includes those files under the build-aux/ subdirectory] > Since I don't use any Automake macros, I thought that I dind't need > Automake, and so I executed the following: > > $ autoheader && autoconf This should work, except that you have to provide the helper files yourself, to avoid... > > Everything runs fine, but when trying to execute configure script: > checking whether it is safe to define __EXTENSIONS__... yes > configure: error: cannot run /bin/bash ./config.sub this. You can do the copy before or after running 'autoconf' (that is, autoconf currently doesn't check that config.sub exists; it might be a nice enhancement to AC_CANONICAL_* to check for existence and/or even install the files automatically, but someone would have to submit the patch). > > Now If I try to run Automake to create the missing files: > > $ automake -a > configure.ac: no proper invocation of AM_INIT_AUTOMAKE was found. Correct - since you didn't use automake macros, you can't expect automake to populate config.sub and friends on your behalf. > It creates the needed files, but exits with status 1. Is there anyway > to generate config.sub without relying on Automake, Use 'cp'. That's all the more automake was doing when it outputs lines about installing helper files. -- Eric Blake eblake@xxxxxxxxxx +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Attachment:
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Autoconf mailing list Autoconf@xxxxxxx https://lists.gnu.org/mailman/listinfo/autoconf