Ticket #244: xapian-config-kill-swig-headers.patch

File xapian-config-kill-swig-headers.patch, 2.1 KB (added by Olly Betts, 17 years ago)

Combined patch to remove --swig-headers

  • xapian-config.in

     
    3232Usage: $PROG_NAME OPTION...
    3333
    3434Options:
    35   --cxxflags   output all preprocessor and C++ compiler flags
    36   --libs       output all linker flags
    37   --ltlibs     output linker flags for linking using GNU libtool
    38   --swigflags  output preprocessor flags for use with SWIG
    39   --help       output this help and exit
    40   --version    output version information and exit
     35  --cxxflags     output all preprocessor and C++ compiler flags
     36  --libs         output all linker flags
     37  --ltlibs       output linker flags for linking using GNU libtool
     38  --swigflags    output preprocessor flags for use with SWIG
     39  --swigheaders  output list of headers for use with SWIG
     40  --help         output this help and exit
     41  --version      output version information and exit
    4142EOF
    4243
    4344    exit $1
     
    103104    I="$I-I@abs_srcdir@/include"
    104105}
    105106
     107# Add any header files found in $1 to $H
     108add_headers_in_HDIR_to_H() {
     109    HDIR=$1
     110    list=`echo "$HDIR"/*.h`
     111    [ "$list" != "$HDIR/*.h" ] && H="$H$list "
     112}
     113
     114# set $H to a list of header files.
     115set_H_to_headers() {
     116    H=
     117    if is_uninstalled ; then
     118        # Some header files are generated, so we need to look in builddir too.
     119        add_headers_in_HDIR_to_H "@abs_builddir@/include"
     120        add_headers_in_HDIR_to_H "@abs_builddir@/include/xapian"
     121        if [ "@abs_srcdir@" != "@abs_builddir@" ] ; then
     122            add_headers_in_HDIR_to_H "@abs_srcdir@/include"
     123            add_headers_in_HDIR_to_H "@abs_srcdir@/include/xapian"
     124        fi
     125    else
     126        add_headers_in_HDIR_to_H "@includedir@"
     127        add_headers_in_HDIR_to_H "@includedir@/xapian"
     128    fi
     129}
     130
    106131# Extract dlname from a libtool .la file.
    107132extract_dlname() {
    108133    dlname=
     
    199224        echo "$I"
    200225        ;;
    201226
     227    --swigheaders)
     228        set_H_to_headers
     229        echo "$H"
     230        ;;
     231
    202232    --from-xo-lib-xapian)
    203233        # Top Secret option which allows us to give a more helpful error
    204234        # message if we're asked to link with an uninstalled libxapian