El dt 15 de 10 de 2013 a les 11:47 +0200, en/na Kevin Brubeck Unhammer va escriure: > trunk/apertium and trunk/lttoolbox both install pkg-config[1] .pc > files, typically into /usr/local/lib/pkgconfig/. Language pairs check > for the existence of these in the autogen/configure step to ensure > apertium and lttoolbox are available. This check is in configure.ac in > the language pair. > > However, the files installed by apertium and lttoolbox have the > version number in the file name, e.g. > /usr/local/lib/pkgconfig/apertium-3.2.pc – and this means the filename > changes with every release. And this means the language pairs have to > update their configure.ac every time apertium/lttoolbox has a new > release. So every time apertium/lttoolbox releases, all language pairs > have to release to be compatible. And we get a mess like e.g. this, > found in a real configure.ac: > > > AC_DEFUN([PKG_CHECK_APERTIUM], [ > APERTIUM_VER=0 > PKG_CHECK_MODULES(APERTIUM, apertium-1.0 >= 1.0.0, > [ > APERTIUM_VER=10 > ], > [ > PKG_CHECK_MODULES(APERTIUM, apertium-2.0 >= 2.0.0, > [ > APERTIUM_VER=20 > ], > [ > PKG_CHECK_MODULES(APERTIUM, apertium-3.0 >= 3.0.0, > [ > APERTIUM_VER=30 > ], > [ > PKG_CHECK_MODULES(APERTIUM, apertium-3.1 >= 3.1.0, > [ > APERTIUM_VER=31 > ], > [ > PKG_CHECK_MODULES(APERTIUM, apertium-3.2 >= 3.2.0) > APERTIUM_VER=32 > ]) > ]) > ]) > ]) > AC_SUBST(APERTIUM_VER) > ]) > PKG_CHECK_APERTIUM > > which checks for the existence of > $PKG_CONFIG_PATH/apertium-1.0.pc and checks that it's at least 1.0 > or if not that, then > $PKG_CONFIG_PATH/apertium-2.0.pc and checks that it's at least 2.0 > or if not that, then > $PKG_CONFIG_PATH/apertium-3.0.pc and checks that it's at least 3.0 > or if not that, then > $PKG_CONFIG_PATH/apertium-3.1.pc and checks that it's at least 3.1 > or if not that, then > $PKG_CONFIG_PATH/apertium-3.2.pc and checks that it's at least 3.2 > > Can we end this madness? Inside each such .pc file is a line saying > e.g. "Version=3.2.0". Autotools has a method called > PKG_CHECK_MODULES[2]. If we simply remove the version number from the > .pc file, then language pairs can instead just say > > PKG_CHECK_MODULES([APERTIUM], [APERTIUM >= 1.0]) > > if they want an apertium later or equal to 1.0 (or they can e.g. > require less than 4.0 but more than 3.0). > > The only reason to have version numbers in the .pc file names is if > you want to allow several versions installed at once. But this doesn't > work with apertium/lttoolbox, since installed files would overwrite > each other (if you really want different versions, installing to a > $prefix instead works just fine). > > > If we rename the .pc files, all language pairs need one change to > configure.ac, but hopefully this will be the last one they need :-)
I think this is a great idea. Can anyone think of any reasons against it ? Fran ------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk _______________________________________________ Apertium-stuff mailing list Apertium-stuff@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/apertium-stuff