guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Add to the 2.1.x branch GUILE_SITE_CCACHE_DIR and GUILE_EXTE


From: Freja Nordsiek
Subject: Re: [PATCH] Add to the 2.1.x branch GUILE_SITE_CCACHE_DIR and GUILE_EXTENSION_DIR Autoconf macros along with needed siteccachdir entry in pkgconfig file
Date: Tue, 14 Mar 2017 15:08:47 +0100

I coalesced the new macros into the existing GUILE_SITE_DIR macro,
though I had to change a few things as will be explained. It works on
Guile 2.1.x, 2.0.x, and 1.8.x. I changed it so that if the directories
for go files and compiled C extensions are not found, a warning is
raised and those variables are set to blank. Otherwise, it would just
result in failure on Guile 1.8.x. While testing this for these
different Guile versions, I uncovered a small bug in the GUILE_PROGS
macro that I will make a patch for in another email (back on the email
chain for the relevant bug).

Freja Nordsiek

On Mon, Mar 13, 2017 at 1:46 PM, Andy Wingo <address@hidden> wrote:
> On Sun 12 Mar 2017 10:38, Freja Nordsiek <address@hidden> writes:
>
>> Guile provides the GUILE_SITE_DIR Autoconf macro for finding where a
>> user should install scheme files, but there are no equivalent macros
>> for the directories to put compiled go files and C extensions into.
>> The patch adds the equivalent macros to do this for the 2.1.x branch
>> (it might work as is for the 2.0.x branch but I haven't tested it),
>> which are more or less copy-pastes of the GUILE_SITE_DIR macro.
>
> The patch looks good.  WDYT though about instead extending
> GUILE_SITE_DIR to search for the ccache dir and the extension dir and
> AC_SUBST them?  It would be nice to avoid adding more ceremonial lines
> to configure.ac.
>
> (I really wish I hadn't named it "ccache"; oh well, too late in 2.1.x to
> change.)
>
>> GUILE_SITE_CCACHE_DIR does require an additional entry to be put into
>> Guile's pkgconfig file, which I named siteccachedir to fit in with the
>> rest. One major issue is that the GUILE_SITE_CCACHE_DIR macro will
>> fail for any version of Guile that does not have the new entry in the
>> pkgconfig file, which would be all 2.0.x and 2.1.x releases thus far.
>> One way around it would be to instead of using pkgconfig for it would
>> to instead use the following macro that uses the Guile interpreter
>> itself to find the directory (this is more or less the version I use
>> in one of my own projects).
>>
>>     AC_DEFUN([GUILE_SITE_CCACHE_DIR],
>>      [AC_REQUIRE([GUILE_PROGS])
>>       AC_MSG_CHECKING([for Guile site-ccache directory])
>>       GUILE_SITE_CCACHE=`$GUILE -c "(display (%site-ccache-dir))"`
>>       if test $? != "0" -o "$GUILE_SITE_CCACHE" = ""; then
>>         AC_MSG_FAILURE([siteccachedir not found])
>>       fi
>>       AC_MSG_RESULT([$GUILE_SITE_CCACHE])
>>       AC_SUBST([GUILE_SITE_CCACHE])
>>      ])
>
> A fallback sounds good.  In that case it would work fine with 2.0.  We
> can add more paths to the pkg-config file as well, in parallel; it's
> better for other build systems.
>
> Andy

Attachment: 0001-Made-GUILE_SITE_DIR-Autoconf-macro-look-for-director.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]