Home > Archive > Tcl > June 2005 > Adding PACKAGE_PATCHLEVEL to an extension
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Adding PACKAGE_PATCHLEVEL to an extension
|
|
| Tim Baker 2005-05-28, 8:57 pm |
| I added these lines to my configure.ac file:
AC_SUBST([PACKAGE_PATCHLEVEL], [1.0.1])
AC_DEFINE_UNQUOTED(PACKAGE_PATCHLEVEL, "$PACKAGE_PATCHLEVEL")
This passes -DPACKAGE_PATCHLEVEL=\"1.0.1\" to the compiler.
My question is, should I call Tcl_PkgProvide("1.0.1") or just
Tcl_PkgProvide("1.0")?
Tcl and Tk pass 8.4 not 8.4.9, while the Tile extension passes 0.6.3 not
0.6.
Also, should my pkgIndex.tcl file call "package provide MyPkg 1.0.1" or
"package provide MyPkg 1.0"? It seems the Tile Windows pkgIndex.tcl file
uses 0.6 while the Tile Unix pkgIndex.tcl file uses 0.6.3.
-- Tim Baker
| |
| Don Porter 2005-06-01, 3:58 am |
| Tim Baker wrote:
> I added these lines to my configure.ac file:
>
> AC_SUBST([PACKAGE_PATCHLEVEL], [1.0.1])
> AC_DEFINE_UNQUOTED(PACKAGE_PATCHLEVEL, "$PACKAGE_PATCHLEVEL")
>
> This passes -DPACKAGE_PATCHLEVEL=\"1.0.1\" to the compiler.
>
> My question is, should I call Tcl_PkgProvide("1.0.1") or just
> Tcl_PkgProvide("1.0")?
You should Tcl_PkgProvide("1.0.1") ...
>
> Also, should my pkgIndex.tcl file call "package provide MyPkg 1.0.1" or
> "package provide MyPkg 1.0"?
The index script (pkgIndex.tcl file) should not [package provide]
anything at all. It should use [package ifneeded] to trigger a
[load] of the appropriate shared library. During the [load] the
Tcl_PkgProvide() call discussed above will take care of any
[package provide]-ing.
The [package ifneeded] command in your index script should get
the full version number, 1.0.1, as an argument.
--
| Don Porter Mathematical and Computational Sciences Division |
| donald.porter@nist.gov Information Technology Laboratory |
| http://math.nist.gov/~DPorter/ NIST |
|_______________________________________
_______________________________|
|
|
|
|
|