patchGNU Autoconf Archive - Patches: patch #7862, ax_pkg_swig.m4, add SWIG_FLAGS

 
 

patch #7862: ax_pkg_swig.m4, add SWIG_FLAGS

Submitter:  Václav Haisman <wilx>
Submitted:  Sun 14 Oct 2012 08:38:35 PM UTC
   
 
Priority:  5 - Normal Status:  Invalid
Assigned to:  simons Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 14 Nov 2012 08:45:13 AM UTC, comment #3: 

Hi Václav,

I'm not sure whether adding SWIG flags into the $SWIG variable itself is a good idea. $SWIG is expected to be an executable. If that variable suddenly contains several words separated by whitespace, it might break the scripts of other people who have been relying on the current behavior. Other toolsets separate the location of the compiler from the compiler flags as well, i.e. $CC versus $CPPFLAGS and $CFLAGS.

In my humble opinion, it's probably best to define

    AC_ARG_VAR([SWIG_FLAGS], [SWIG flags])

in your project's configure.ac instead of patching that feature into the AX_PKG_SWIG macro. It's unsatisfactory that there is no comprehensive solution to building SWIG file. Solving that issue seems to be a difficult task, though.

Peter Simons <simons>
Group administrator
Sat 27 Oct 2012 04:18:35 PM UTC, comment #2: 

I use it to pass -DUNICODE flag to swig but I expand it in Makefile instead of directly into $SWIG. E.g., like this:

$ ../configure --with-python CXXFLAGS="-DUNICODE" SWIG_FLAGS="-DUNICODE"

And then in Makefile.am:

$(SWIG) $(SWIG_FLAGS) -c++ -python...

I guess that for $SWIG_FLAGS to be more useful, the variable would would have to be expanded into $SWIG variable. Would you accept such patch for the macro?

Václav Haisman <wilx>
Sat 27 Oct 2012 03:31:08 PM UTC, comment #1: 

I'm not sure whether I follow. The variable $SWIG_FLAGS isn't used anywhere in the macro, so why is it beneficial to define it?

Peter Simons <simons>
Group administrator
Sun 14 Oct 2012 08:38:35 PM UTC, original submission:  

I find it useful to have the attached patch applied. It adds SWIG_FLAGS precious variable to ax_pkg_swig.m4. I use it to specify -DUNICODE switch to $SWIG invocations.

Václav Haisman <wilx>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #26762:  ax_pkg_swig.m4.patch added by wilx (317B - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by simons (Posted a comment)
  • -email is unavailable- added by wilx (Submitted the item)
  • -email is unavailable- added by wilx
  •  

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2012-11-14 simons StatusNeed Info Invalid
        Open/ClosedOpen Closed
    2012-10-27 simons StatusNone Need Info
        Assigned toNone simons
    2012-10-14 wilx Attached File- Added ax_pkg_swig.m4.patch, #26762
        Carbon-Copy- Added wilx

    Back to the top

    Powered by Savane 3.13-0329.
    Corresponding source code