# include "psphotInternal.h"

# if (HAVE_KAPA)
# include <kapa.h>
# endif

static const char *cvsTag = "$Name: not supported by cvs2svn $";// CVS tag name

psString psphotVersion(void)
{
    psString version = NULL;            // Version, to return
    psStringAppend(&version, "%s-%s",PACKAGE_NAME,PACKAGE_VERSION);
    return version;
}

psString psphotVersionLong(void)
{
    psString version = psphotVersion(); // Version, to return
    psString tag = psStringStripCVS(cvsTag, "Name"); // CVS tag
    psStringAppend(&version, " (cvs tag %s) %s, %s", tag, __DATE__, __TIME__);

# if (HAVE_KAPA)
    psString ohanaVersion = psStringStripCVS (ohana_version(), "Name");
    psString libdvoVersion = psStringStripCVS (libdvo_version(), "Name");

    psStringAppend (&version, " with libkapa (ohana %s, libdvo: %s)", ohanaVersion, libdvoVersion);
    psFree (ohanaVersion);
    psFree (libdvoVersion);
# else
    psStringAppend (&version, " WITHOUT libkapa");
# endif

    psFree(tag);
    return version;
}

// Defined by RHL; leaving for backwards compatibility.
const char *psphotCVSName(void) {
   return cvsTag;
}
