From: Vadim Z. <vz...@ze...> - 2011-02-27 12:12:18
|
On Sat, 26 Feb 2011 19:15:30 -0800 Dean Edmonds <dea...@gm...> wrote: DE> I'm building swig 2.0.2 on linux and would like to enable pcre DE> support, but the binary will be distributed to a number of in-house DE> systems which cannot be guaranteed to have the pcre lib installed on DE> them. To get around that I would like to have swig link to the static DE> version of libpcre rather than the shared lib, but I don't see any DE> option for that in ./configure. DE> DE> I tried setting the PCRE_LIBS envariable to /usr/lib64/libpcre.a DE> before doing the configure and make, but the resulting swig binary was DE> still linked to the shared lib. DE> DE> Any ideas on how to achieve what my goal? Hello, Looking at Tools/config/ax_path_generic.m4 PCRE_LIBS seems to be indeed ignored. AFAICS the only workaround would be to create your own shell script which would output the wanted values for it, e.g. (this is untested) $ cat > ~/static-pcre-config #!/bin/sh usage="Usage: static-pcre-config --{libs,cflags}" if [ $# -neq 1 ]; then echo "$usage" 1>&2 exit 1 fi case $1 in --cflags) ;; --libs) echo "/usr/lib64/libpcre.a" ;; *) echo "$usage" 1>&2 exit 1 ;; esac ^D $ swig/configure PCRE_CONFIG=$HOME/static-pcre-config Or maybe you could just edit the makefile generated by configure if it's a one off build. Regards, VZ |