From: Julien L. <ju...@fa...> - 2006-01-26 00:08:04
|
> -----Original Message----- > From: min...@li... > [mailto:min...@li...] On Behalf Of > Roberto Wilson > Sent: mercredi 25 janvier 2006 21:31 > > I am in doubts with autoconf, when I create configure.scan > with autoscan, I write: You shouldn't rely on configure.scan (generated by autoscan). Not only does it underquote the macros, but usually doesn't respect the autoconf manual guidelines. You should rely more on the libtool, autoconf and automake manuals, which are of great help to create a 'portable' configuration for a package. > AC_INIT(README) > AC_CANONICAL_SYSTEM > AC_CONFIG_SRCDIR([Dll.h ]) > AM_INIT_AUTOMAKE(Test, 0.1) > > AC_PROG_CC > AC_PROG_CXX > AC_PROG_LIBTOOL > AC_LIBTOOL_WIN32_DLL > AC_LIBTOOL_SETUP > AC_ENABLE_SHARED > AC_ENABLE_STATIC > AC_INSTALL > > AC_OUTPUT(Makefile) The libtool manuals states that AC_PROG_LIBTOOL *must* be called before AC_PROG_LIBTOOL. AFAIK, AC_ENABLE_SHARED and AC_ENABLE_STATIC aren't usefull in this case since LIBTOOL will always try to create shared and static libraries. Of the other hand, if you wish to use AC_DISABLE_SHARED or AC_DISABLE_STATIC, they too must be called before AC_PROG_LIBTOOL. Also, avoid underquoted (ie. the AC_INIT you used) and deprecated (ie. AM_INIT_AUTOMAKE(PACKAGE, VERSION) macros. Spaces do count when in between brakets, this can cause painful to find bugs in the configure scripts. Reorganized, your configure.ac should rather be : AC_INIT([Test],[0.1]) AC_CONFIG_SRCDIR([Dll.h]) AC_CANONICAL_SYSTEM AM_INIT_AUTOMAKE AC_PROG_CC AC_PROG_CXX AC_LIBTOOL_WIN32_DLL AC_PROG_LIBTOOL AC_CONFIG_FILES([Makefile]) AC_OUTPUT I'm not sure of what AC_LIBTOOL_SETUP does, so I didn't include it. As for AC_INSTALL, you should rather use AC_PROG_INSTALL, but at least AM_INIT_AUTOMAKE or AC_CONFIG_SRCDIR check for /bin/install or install-sh > > he safe is as configure.in, later I create the Makefile.am: > > lib_LTLIBRARIES = libTest.la > libTest_la_SOURCES = Dll.c Dll.h > > noinst_PROGRAMS = hello > hello_LDFLAGS = libTest.la You must also set `libtest_la_LDFLAGS = --no-undefined' You might also want to add versioning to libtest_la_LDFLAGS with either `--version x:y:z' or `--release x' (view libtool manual for more precise information) It's this versioning information that adds the version number to the dll. `hello' should rather use `hello_LDADD = libTest.la' instead of `hello_LDFLAGS = libTest.la' > Later I make: > aclocal > autoconf > libtoolize -- automake > touch NEWS README AUTHORS ChangeLog > automake - a A plain `autoreconf' (or autoreconf -i) would do the trick. > But what I do not obtain to make it is that the generated DLL > has the name of Test.dll and not it name libTest-0.dll. What > I must make to correct this? Answered just above ;-) > > I also do not obtain to configure prefix, when I make: > /configure --prefix=c:/meusdo~1/zzz -- disable-static > > It appears a message: > ./configure: -print-search-dir command not found > > And later when I execute make: > > make install > cypath not found. > > Somebody could say me what I am making of made a mistake? > > thanks a lot > Hope it helps, Julien |