From: Andrew Schulman <schulman.andrew@epa.gov>
To: cygwin@cygwin.com
Subject: Re: pinfo configure problem - configure.ac (1/1)
Date: Tue, 13 May 2014 15:35:00 -0000 [thread overview]
Message-ID: <hoe4n9pa884sfrp5kksb20h4hdhvs1r0fl@4ax.com> (raw)
In-Reply-To: <20140513115410.GP2436@calimero.vinschen.de>
[-- Attachment #1: configure.ac --]
[-- Type: application/octet-stream, Size: 7566 bytes --]
#***************************************************************************
#* Pinfo is a ncurses based lynx style info documentation browser
#*
#* Copyright (C) 1999-2005 Przemek Borys <pborys@dione.ids.pl>
#* Copyright (C) 2005,2006 Bas Zoetekouw <bas@debian.org>
#*
#* This program is free software; you can redistribute it and/or modify
#* it under the terms of version 2 of the GNU General Public License as
#* published by the Free Software Foundation.
#*
#* This program is distributed in the hope that it will be useful, but
#* WITHOUT ANY WARRANTY; without even the implied warranty of
#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
#* General Public License for more details.
#*
#* You should have received a copy of the GNU General Public License
#* along with this program; if not, write to the Free Software
#* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
#* USA
#***************************************************************************/
#
#
# Process this file with autoconf to produce a configure script.
# $Id: configure.ac 311 2010-09-19 13:08:36Z bas $
#
# init
AC_INIT([pinfo],[0.6.10],[pinfo-devel@lists.alioth.debian.org])
# require a recent autoconf
AC_PREREQ([2.57])
# for identification of derived ./configure scripts
AC_REVISION([$Revision: 311 $])
# put the config into config.h
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([macros])
# id main dir by src/pinfo.c file
AC_CONFIG_SRCDIR([src/pinfo.c])
# helper scripts are in tools/
AC_CONFIG_AUX_DIR([tools])
# The fairly useless --with-tags option to configure requires that
# C++ and F77 support be invoked; this makes configure horribly
# slow. Obliterating this macro pries the feature out of libtool 1.5; it
# is removed in 1.6 in favour of a different scheme.
m4_define([_LT_AC_TAGCONFIG], [])
# init automake
AM_INIT_AUTOMAKE
# disable automatic rebuilding of ./configure, Makefile.in, etc
AM_MAINTAINER_MODE
# include the m4 stuff in tools/macros
AM_ACLOCAL_INCLUDE(macros)
####################################################
## compiler stuff
####################################################
# find C compiler
AC_PROG_CC
# set correct LIBS for (almost obsolete) INTERACTIVE UNIX
AC_ISC_POSIX
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
# Checks for library functions.
AC_CHECK_FUNCS(strdup strstr strsep)
AC_CHECK_FUNCS(getopt_long snprintf)
AM_CONDITIONAL(HAVE_SNPRINTF,test "x$ac_cv_func_snprintf" = "xyes")
AC_CHECK_FUNC(sigblock,,AC_CHECK_LIB(bsd, sigblock))
if test "x$ac_cv_lib_bsd_sigblock" = "xyes" -o \
"x$ac_cv_func_sigblock" = "xyes" ; then
AC_DEFINE(HAVE_SIGBLOCK,1,[Define if have sigblock function])
fi
AM_CONDITIONAL(HAVE_SIGBLOCK,test "x$ac_cv_lib_bsd_sigblock" = "xyes" -o \
"x$ac_cv_func_sigblock" = "xyes" )
AM_PROG_CC_C_O
####################################################
## some additional utilities we need
####################################################
# find install
AC_PROG_INSTALL
# find ln -s
AC_PROG_LN_S
# set the MAKE variable for make in subdirs
AC_PROG_MAKE_SET
# find libtool
AC_PROG_LIBTOOL
####################################################
## readline and curses
####################################################
# readline
AC_CHECK_READLINE
# if we have readline, it needs to be version 5
if test "x$has_readline" = "xtrue"
then
if test $readline_version -lt 4
then
AC_MSG_WARN([Version 4 of readline is required to compile pinfo.
Yours is only version $readline_version.
Readline support will be disabled.])
has_readline=false
fi
fi
AM_CONDITIONAL(HAS_READLINE, test "$has_readline" = true)
# curses
AC_CHECK_CURSES
if ! test "x$USE_CURSES" = "xtrue"; then
AC_MSG_ERROR([Curses not found. You need curses to compile pinfo])
fi
LIBS="$LIBS $CURSES_LIBS"
CPPFLAGS="$CPPFLAGS $CURSES_INCLUDES $CURSES_FLAGS"
# check for some functions in curses
AC_CHECK_FUNCS(curs_set use_default_colors bkgdset)
# define the MAN_KEY_END var based on the curses support of KEY_END
if test "x$CURSES_KEY_END" = "xtrue"
then
MAN_KEY_END="End Key"
else
MAN_KEY_END="E"
fi
AC_SUBST(MAN_KEY_END)
####################################################
## wchar stuff
####################################################
AC_CHECK_WCHAR
if test "x$USE_WCHAR" = "xtrue"
then
CPPFLAGS="$CPPFLAGS $WCHAR_FLAGS"
fi
####################################################
## locales
####################################################
# the languages for which we have .po files
ALL_LINGUAS="cs de eu ja nl pl pt_BR ro ru sv vi"
# Checks for all prerequisites of the intl subdirectory
AM_INTL_SUBDIR
# gettext
AM_GNU_GETTEXT_VERSION([0.14.4])
AM_GNU_GETTEXT([external])
# TVM:
# horrible *temporary* hack to make sure that if we found gettext() in
# -lintl that we add -lintl *back* to $LIBS.
#
## TODO: do we still need this?
##if test X$gt_cv_func_gettext_libintl = Xyes ; then
## LIBS="-lintl $LIBS"
##fi
# Specify locale stuff destination
AC_ARG_WITH(localedir,
[ --with-localedir=PATH specify where the locale stuff should go ])
if test "x$LOCALEDIR" = "x"; then
if test "x$with_localedir" != "x"; then
LOCALEDIR=$with_localedir
else
LOCALEDIR='$(prefix)/share/locale'
fi
fi
####################################################
## user arguments
####################################################
# do you want to see cursor when working with pinfo?
## TODO: this should really be a command line/config file option
AC_ARG_ENABLE(showcursor,
[ --enable-cursor enable cursor when working with pinfo [default=no]], , )
if test "x$enable_showcursor" != "xyes" ; then
AC_DEFINE(HIDECURSOR,FALSE,[don't show cursor])
else
AC_DEFINE(HIDECURSOR,TRUE,[don't show cursor])
fi
# If pinfo is too slow, the below definition will resign from dynamical
# allocation in critical places, and replace it with static buffers which
# should save few instructions to CPU ;)
## TODO: do we still need this with current computing powers?
AC_ARG_ENABLE(use_static,
[ --disable-static enable using static buffers ], ,
enable_use_static=yes)
if test "x$enable_use_static" = "xyes" ; then
AC_DEFINE(___USE_STATIC___, 1, [don't use dynamic buffer])
fi
# do you want to use regexp searches?
## TODO: this should really be a command line/config file option
AC_ARG_WITH(regexp_search,
[ --with-regexp-search use regular expression search [default=yes]])
if test "x$with_regexp_search" = "xno"; then
AC_DEFINE(___DONT_USE_REGEXP_SEARCH___,1,
[Don't use regexp search engine])
fi
####################################################
## destination dirs
####################################################
CONFIGDIR=${sysconfdir}/pinforc
## TODO: have this put in config.h instead of passing it on the command line
CPPFLAGS="$CPPFLAGS -DCONFIGDIR=\\\"${sysconfdir}/pinforc\\\" -DLOCALEDIR=\\\"${LOCALEDIR}\\\""
## TODO: looks evil
MANDIR="`eval MANDIR=$mandir;echo $MANDIR|sed -e \"s#NONE#$ac_default_prefix#\"`"
##TODO: replace these by PACKAGE_VERSION and PACKAGE_NAME
AC_DEFINE_UNQUOTED(VERSION,"$VERSION",[Package version])
AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE",[Package name])
# export variables
AC_SUBST(KEY_END)
AC_SUBST(MAN_KEY_END)
AC_SUBST(EXTRA_SOURCES)
AC_SUBST(MANDIR)
# generate these files depending on the current configuration
AC_CONFIG_FILES([
Makefile
doc/Makefile
macros/Makefile
src/Makefile
pinfo.spec
po/Makefile.in
src/pinforc
doc/pinfo.1
])
# the end. Output config.status and launch it.
AC_OUTPUT
# vim:ts=4
next prev parent reply other threads:[~2014-05-13 15:32 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-13 10:58 pinfo configure problem Andrew Schulman
2014-05-13 11:25 ` Corinna Vinschen
2014-05-13 11:52 ` Andrew Schulman
2014-05-13 11:57 ` Corinna Vinschen
2014-05-13 15:35 ` Andrew Schulman [this message]
2014-05-13 16:54 ` pinfo configure problem - configure.ac (1/1) Corinna Vinschen
2014-05-13 16:16 ` pinfo configure problem - configure.ac (0/1) Andrew Schulman
2014-05-13 17:29 ` Andrew Schulman
2014-05-13 18:54 ` Eric Blake
2014-05-13 19:25 ` Andrew Schulman
2014-05-13 19:54 ` Eric Blake
2014-05-13 21:15 ` Andrew Schulman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=hoe4n9pa884sfrp5kksb20h4hdhvs1r0fl@4ax.com \
--to=schulman.andrew@epa.gov \
--cc=cygwin@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).