"Fossies" - the Fresh Open Source Software Archive

Member "rpm2html-1.11.2/configure.in" (9 Nov 2010, 5941 Bytes) of package /linux/privat/rpm2html-1.11.2.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 dnl Process this file with autoconf to produce a configure script.
    2 AC_PREREQ(2.2)
    3 AC_INIT(rpm2html.c)
    4 AM_CONFIG_HEADER(config.h)
    5 AC_CANONICAL_HOST
    6 
    7 RPM2HTML_MAJOR_VERSION=1
    8 RPM2HTML_MINOR_VERSION=11
    9 RPM2HTML_MICRO_VERSION=2
   10 RPM2HTML_VERSION=$RPM2HTML_MAJOR_VERSION.$RPM2HTML_MINOR_VERSION.$RPM2HTML_MICRO_VERSION
   11 RPM2HTML_VERSION_INFO=`expr $RPM2HTML_MAJOR_VERSION + $RPM2HTML_MINOR_VERSION`:$RPM2HTML_MICRO_VERSION:$RPM2HTML_MINOR_VERSION
   12 
   13 RPM2HTML_VERSION_NUMBER=`expr $RPM2HTML_MAJOR_VERSION \* 10000 + $RPM2HTML_MINOR_VERSION \* 100 + $RPM2HTML_MICRO_VERSION`
   14 
   15 AC_SUBST(RPM2HTML_MAJOR_VERSION)
   16 AC_SUBST(RPM2HTML_MINOR_VERSION)
   17 AC_SUBST(RPM2HTML_MICRO_VERSION)
   18 AC_SUBST(RPM2HTML_VERSION)
   19 AC_SUBST(RPM2HTML_VERSION_INFO)
   20 AC_SUBST(RPM2HTML_VERSION_NUMBER)
   21 
   22 VERSION=${RPM2HTML_VERSION}
   23 
   24 AM_INIT_AUTOMAKE(rpm2html, $VERSION)
   25 
   26 AC_SUBST(VERSION)
   27 
   28 dnl Checks for programs.
   29 AC_PROG_CC
   30 AC_PROG_LN_S
   31 AC_PROG_INSTALL
   32 AC_PATH_PROG(CP, cp, /bin/cp)
   33 AC_PATH_PROG(RM, rm, /bin/rm)
   34 AC_PATH_PROG(MV, mv, /bin/mv)
   35 AC_PATH_PROG(TAR, tar, /bin/tar)
   36 AC_PATH_PROG(GZIP, gzip, /bin/gzip)
   37 
   38 dnl Checks for libraries.
   39 dnl Replace `main' with a function in -lrpm:
   40 for z in z gz ; do
   41    AC_CHECK_LIB(${z}, deflate,
   42      [LIBS="-l${z} $LIBS"; break])
   43 done
   44 
   45 AC_CHECK_LIB(bz2, bzread,
   46   [LIBS="$LIBS -lbz2"],
   47    AC_CHECK_LIB(bz2, BZ2_bzread, [
   48      LIBS="$LIBS -lbz2" ],
   49      AC_MSG_WARN([rpm needs libbz2.a (from the bzip2 package)])))
   50 
   51 AC_SUBST(LIBS)
   52 
   53 AC_CHECK_LIB(intl, gettext)
   54 
   55 AC_CHECK_FUNC(dbopen, [], [
   56     AC_CHECK_LIB(db-3.1, db_create, [LIBS="-ldb-3.1 $LIBS"],
   57       AC_CHECK_LIB(db-3.0, db_create, [LIBS="-ldb-3.0 $LIBS"],
   58         AC_CHECK_LIB(db1, dbopen, [LIBS="-ldb1 $LIBS"],
   59           AC_CHECK_LIB(db, dbopen, [LIBS="-ldb $LIBS"],
   60              [LIBS="-lbz2 -lpthread -lrt $LIBS"]))))
   61 ])
   62 
   63 AC_CHECK_LIB(popt, poptGetContext,
   64   [LIBS="-lpopt $LIBS"],
   65   AC_MSG_ERROR(*** libpopt not found))
   66 
   67 AC_CHECK_LIB(rpmio, Fopen,
   68   [LIBS="-lrpmio $LIBS";
   69 	AC_DEFINE_UNQUOTED(USE_RPMIO, 1)
   70 	AC_SUBST(USE_RPMIO)
   71 	USE_RPMIO=1
   72   ])
   73 
   74 AC_CHECK_LIB(rpmdb, rpmdbOpen, [LIBS="-lrpm -lrpmdb $LIBS"],
   75   AC_CHECK_LIB(rpm, rpmReadConfigFiles, [LIBS="-lrpm $LIBS"],
   76     AC_MSG_ERROR(*** librpm not found)
   77   ), -lrpm
   78 )
   79 
   80 AC_CHECK_LIB(rpm, rpmBuildFileList, [],
   81   [AC_DEFINE_UNQUOTED(HAVE_RPM42, 1) AC_SUBST(HAVE_RPM42)],
   82 )
   83 
   84 dnl
   85 dnl Is there a specific path for RPM stuff ?
   86 dnl
   87 
   88 RPM_CFLAGS="-I/usr/include/rpm"
   89 RPM_LIBS="-L/usr/lib"
   90 AC_ARG_WITH(rpm-prefix, [  --with-rpm-prefix       Prefix for RPM  (/usr)])
   91 if test "$with_rpm_prefix" != "" ; then
   92     RPM_CFLAGS="-I$with_rpm_prefix/include/rpm"
   93     RPM_LIBS="-L$with_rpm_prefix/libs"
   94 fi
   95 
   96 AC_ARG_WITH(rpm-includes, [  --with-rpm-includes     Includes for RPM  (/usr/include/rpm)])
   97 if test "$with_rpm_includes" != "" ; then
   98     RPM_CFLAGS="-I$with_rpm_includes"
   99 fi
  100 
  101 AC_ARG_WITH(rpm-flags, [  --with-rpm-flags        Libs for RPM  (/usr/lib)])
  102 if test "$with_rpm_flags" != "" ; then
  103     RPM_LIBS="-L$with_rpm_flags"
  104 fi
  105 
  106 AC_SUBST(RPM_CFLAGS)
  107 AC_SUBST(RPM_LIBS)
  108 
  109 dnl hack: we're gonna use rpm-3.1
  110 AC_DEFINE_UNQUOTED(USE_RPM310, 1)
  111 AC_SUBST(USE_RPM310)
  112 AC_CHECK_LIB(rpm, rpmReadConfigFiles,,AC_MSG_ERROR(*** rpm lib not found))
  113 
  114 dnl
  115 dnl Checking for libxml
  116 dnl
  117 AC_CHECK_PROG(XML2_CONFIG, xml2-config, xml2-config)
  118 if test "$XML2_CONFIG" = ""
  119 then
  120     AC_CHECK_PROG(XML_CONFIG, xml-config, xml-config)
  121     if test "$XML_CONFIG" != ""
  122     then
  123 	XML_LIBS="`$XML_CONFIG --libs`"
  124 	XML_CFLAGS="`$XML_CONFIG --cflags`"
  125     else
  126 	echo 'rpm2html needs libxml(2) to be installed'
  127 	echo 'On Linux you will need the libxml(2) and libxml(2)-devel packages'
  128 	echo 'You can find them at ftp://xmlsoft.org/'
  129 	exit 1
  130     fi
  131 else
  132     XML_LIBS="`$XML2_CONFIG --libs`"
  133     XML_CFLAGS="`$XML2_CONFIG --cflags`"
  134 fi
  135 AC_SUBST(XML_LIBS)
  136 AC_SUBST(XML_CFLAGS)
  137 
  138 dnl Checks for header files.
  139 AC_HEADER_DIRENT
  140 AC_HEADER_STDC
  141 AC_CHECK_HEADERS(db_185.h db1/db.h)
  142 AC_CHECK_HEADERS(fcntl.h unistd.h ctype.h dirent.h errno.h malloc.h)
  143 AC_CHECK_HEADERS(rpm/rpmio.h)
  144 AC_CHECK_HEADERS(stdarg.h sys/stat.h sys/types.h time.h)
  145 AC_CHECK_HEADERS(zlib.h rpm/rpmlib.h)
  146 AC_CHECK_HEADERS(rpm/rpmlegacy.h)
  147 
  148 
  149 dnl Checks for library functions.
  150 AC_FUNC_STRFTIME
  151 AC_CHECK_FUNCS(gethostname strdup strndup strerror snprintf unlink)
  152 
  153 dnl
  154 dnl Do we plug in the database backend ?
  155 dnl
  156 
  157 SQL_FLAGS=
  158 SQL_OBJ=
  159 SQL_PROGS=
  160 AC_ARG_WITH(sql, [  --with-sql              Add the SQL support (off)])
  161 if test "$with_sql" = "yes" ; then
  162     LIBS="$LIBS -L/usr/lib/mysql"
  163     AC_CHECK_LIB(mysqlclient, mysql_init,
  164       [LIBS="$LIBS -lmysqlclient"],
  165       AC_MSG_ERROR(*** libmysqlclient not found))
  166 
  167     echo Enabling SQL support
  168     SQL_FLAGS="-DWITH_SQL"
  169     SQL_OBJ=sql.o
  170     SQL_PROGS=sqltools
  171 fi
  172 AM_CONDITIONAL(WITH_MYSQL, test "${with_sql}" = "yes")
  173 AC_SUBST(SQL_FLAGS)
  174 AC_SUBST(SQL_PROGS)
  175 AC_SUBST(SQL_OBJ)
  176 
  177 dnl
  178 dnl Do we plug in the gpg?
  179 dnl
  180 
  181 GPG_FLAGS=
  182 GPG_PROG=
  183 AC_ARG_WITH(gpg, [  --with-gpg              Add the GPG support (off)])
  184 if test "x$with_gpg" != "x" ; then
  185     if test "$with_gpg" = "yes" ; then
  186         AC_PATH_PROG(GPG_PROG, gpg, /usr/bin/gpg)
  187     else
  188         AC_PATH_PROG(GPG_PROG, gpg, "$with_gpg")
  189     fi
  190 
  191     dnl for now, signature resolving code is implemented only with librpmio
  192     dnl so without librpmio it wont work
  193     if test "x$USE_RPMIO" != "x1" ; then
  194 	AC_MSG_ERROR([*** librpmio not found, use --without-gpg])
  195     fi
  196 
  197     echo Enabling GPG support
  198     GPG_FLAGS="-DWITH_GPG -DGPG_PROG=\\\"$GPG_PROG\\\""
  199 fi
  200 AC_SUBST(GPG_FLAGS)
  201 AC_SUBST(GPG_PROG)
  202 
  203 AC_ARG_WITH(template, [  --with-template         Add the libtemplate support (off)])
  204 if test "$with_template" = "yes" ; then
  205   AC_CHECK_LIB(template, tpl_parse,
  206     [LIBS="-ltemplate $LIBS" AC_DEFINE([HAVE_LIBTEMPLATE], 1, [use templating engine libtemplate])],
  207     [AC_CHECK_LIB(llt, tpl_parse,
  208       [LIBS="-lllt $LIBS" AC_DEFINE([HAVE_LIBTEMPLATE], 1, [use templating engine libtemplate])],
  209       [AC_MSG_ERROR(*** libtemplate not found)])])
  210   echo Enabling libtemplate support
  211 fi
  212 
  213 AC_OUTPUT(rpm2html.spec Makefile)