diff options
author | Reuben Thomas <rrt@sc3d.org> | 2007-12-08 00:18:00 +0000 |
---|---|---|
committer | Reuben Thomas <rrt@sc3d.org> | 2007-12-08 00:18:00 +0000 |
commit | e22de8ed6b9d3cfb9f000745a36c76551700b2fc (patch) | |
tree | f50bc880071677f3132c97e1f62c53a6b0847384 | |
parent | 6552c17a058165061a0ad9271b9178d2e593f651 (diff) | |
download | plptools-e22de8ed6b9d3cfb9f000745a36c76551700b2fc.tar.gz plptools-e22de8ed6b9d3cfb9f000745a36c76551700b2fc.tar.bz2 plptools-e22de8ed6b9d3cfb9f000745a36c76551700b2fc.zip |
Remove remaining custom macros, folding them into configure.in.in.
Each was called only once.
-rw-r--r-- | Makefile.cvs | 4 | ||||
-rw-r--r-- | conf/configure.in.in | 56 | ||||
-rw-r--r-- | conf/m4/plptools/PLP_CHECK_INTL.m4 | 15 | ||||
-rw-r--r-- | conf/m4/plptools/PLP_CHECK_READLINE.m4 | 57 | ||||
-rw-r--r-- | conf/m4/plptools/PLP_FIND_FILE.m4 | 17 | ||||
-rw-r--r-- | conf/m4/plptools/PLP_SET_LIBVERSION.m4 | 9 |
6 files changed, 37 insertions, 121 deletions
diff --git a/Makefile.cvs b/Makefile.cvs index 2765a18..53da47c 100644 --- a/Makefile.cvs +++ b/Makefile.cvs @@ -1,7 +1,6 @@ LIBTOOLFILES = conf/config.guess conf/config.sub conf/ltconfig conf/ltmain.sh AUTOMAKEFILES = conf/mkinstalldirs conf/missing conf/install-sh CONFIGHIN = include/config.h.in -ACLOCAL = conf/aclocal.m4 GETTEXT = intl/Makefile.in GETTEXTDEP = conf/Makefile.am.in conf/configure.in.in @@ -34,9 +33,6 @@ htmldoc: man2html -H plptools.sourceforge.net -M "" $$f > $$o; \ done -$(ACLOCAL): - aclocal -I conf/m4/plptools $(M4SUB) - $(CONFIGHIN): configure.in autoheader diff --git a/conf/configure.in.in b/conf/configure.in.in index b8c19ab..479c7d6 100644 --- a/conf/configure.in.in +++ b/conf/configure.in.in @@ -7,7 +7,12 @@ AC_CANONICAL_SYSTEM AM_CONFIG_HEADER(include/config.h) AM_INIT_AUTOMAKE(plptools, 0.19) AM_PROG_LIBTOOL -PLP_SET_LIBVERSION + +dnl Set library version +maj=$(echo ${VERSION} | cut -d. -f1) +min=$(echo ${VERSION} | cut -d. -f2) +LIBVERSION=${maj}:${min}:${maj} +AC_SUBST(LIBVERSION) dnl Enable Maintainer stuff AM_MAINTAINER_MODE @@ -41,7 +46,18 @@ dnl NLS support ALL_LINGUAS="de sv" AM_GNU_GETTEXT dnl Additional glibc-intl checks -PLP_CHECK_INTL +if test "${USE_NLS}" = "yes" ; then + if test "${USE_INCLUDED_LIBINTL}" = "yes" ; then + plp_have_bind_textdomain_codeset=no + else + AC_CHECK_LIB(c, bind_textdomain_codeset, + plp_have_bind_textdomain_codeset=yes, + plp_have_bind_textdomain_codeset=no) + fi + if test "${plp_have_bind_textdomain_codeset}" = yes ; then + AC_DEFINE(HAVE_BIND_TEXTDOMAIN_CODESET) + fi +fi dnl Large File Support AC_SYS_LARGEFILE @@ -63,8 +79,6 @@ dnl checks for libraries dnl readline and history for plpftp ac_enable_readline=yes -AM_CONDITIONAL(HAVE_LIBREADLINE, false) -AM_CONDITIONAL(ADD_LIBCURSES, false) AC_ARG_ENABLE(readline, [ --disable-readline disable libreadline support [no]], if test "$enableval" = "no" ; then @@ -73,7 +87,14 @@ AC_ARG_ENABLE(readline, fi ) if test "x$ac_enable_readline" = "xyes" ; then - PLP_CHECK_READLINE + AC_MSG_CHECKING(for readline in -lreadline) + LIBREADLINE= + AC_CHECK_LIB([readline], [main], + [AC_SUBST([LIBREADLINE], ["-lreadline -lncurses"]) + AC_DEFINE([HAVE_LIBREADLINE], [1], + [Define if you have libreadline]) + ], + , -lncurses) fi ac_enable_history=yes @@ -133,7 +154,13 @@ AC_ARG_ENABLE(mnttab, ) if test "x$ac_enable_mnttab" = "xyes" ; then AC_MSG_CHECKING(for mount table) - PLP_FIND_FILE(/etc/mnttab /etc/mtab, MTAB) + MTAB=NO + for i in /etc/mnttab /etc/mtab; do + if test -r "$i" ; then + MTAB=$i + break 2 + fi + done AC_MSG_RESULT($MTAB) if test "$MTAB" = "NO" ; then AC_DEFINE_UNQUOTED(DONT_UPDATE_MTAB,1, @@ -167,18 +194,14 @@ AC_CHECK_HEADERS( ) dnl special options for customization -PLP_HELP_MSG([Options for overriding builtin defaults:]) AC_ARG_WITH(serial, [ --with-serial=DEV override default serial line], - [ DDEV="$withval" - AC_MSG_RESULT(Overriding serial line: $DDEV) + [ DDEV="$withval" + AC_MSG_RESULT(Overriding default serial device: $DDEV) ], - [ AC_MSG_CHECKING(for default serial line) - PLP_FIND_CDEV(/dev/psion /dev/tty0p0 /dev/tty00 /dev/ttyS0 /dev/term/a /dev/ttyfa /dev/ttya /dev/tty0 /dev/ttyf1 /dev/cuaa1, DDEV) - AC_MSG_RESULT($DDEV) - test "$DDEV" = "NO" && AC_MSG_ERROR(NO serial lines. Use --with-serial.) - ] + [ DDEV="/dev/ttyS0" + AC_MSG_RESULT(Using default serial device: $DDEV)] ) AC_DEFINE_UNQUOTED(DDEV,"$DDEV",[Define this to your serial device node]) AC_SUBST(DDEV) @@ -274,17 +297,12 @@ AH_BOTTOM([ /* Define this, if libc provides bind_textdomain_codeset */ #undef HAVE_BIND_TEXTDOMAIN_CODESET -/* Define to 401 or 402, depending on readline version 4.1 or 4.2 */ -#define READLINE_VERSION 401 - /* Some reasonable defaults */ - #ifndef PSIONHOSTNAME # define PSIONHOSTNAME "localhost" #endif /* misc tweaks */ - #ifdef _IBMR2 # undef DONT_UPDATE_MTAB # define DONT_UPDATE_MTAB /* The mount table is obtained from the kernel (!?) */ diff --git a/conf/m4/plptools/PLP_CHECK_INTL.m4 b/conf/m4/plptools/PLP_CHECK_INTL.m4 deleted file mode 100644 index 4dfdf33..0000000 --- a/conf/m4/plptools/PLP_CHECK_INTL.m4 +++ /dev/null @@ -1,15 +0,0 @@ -AC_DEFUN([PLP_CHECK_INTL],[ - if test "${USE_NLS}" = "yes" ; then - if test "${USE_INCLUDED_LIBINTL}" = "yes" ; then - plp_have_bind_textdomain_codeset=no - else - AC_CHECK_LIB(c, bind_textdomain_codeset, - plp_have_bind_textdomain_codeset=yes, - plp_have_bind_textdomain_codeset=no) - fi - if test "${plp_have_bind_textdomain_codeset}" = yes ; then - AC_DEFINE(HAVE_BIND_TEXTDOMAIN_CODESET) - fi - fi -]) - diff --git a/conf/m4/plptools/PLP_CHECK_READLINE.m4 b/conf/m4/plptools/PLP_CHECK_READLINE.m4 deleted file mode 100644 index df4e8d8..0000000 --- a/conf/m4/plptools/PLP_CHECK_READLINE.m4 +++ /dev/null @@ -1,57 +0,0 @@ -dnl -dnl Check for libreadline and if it is available, check if it -dnl depends on libcurses. (Normally, it silently resolves the -dnl following symbols from libtermcap: -dnl tgetnum, tgoto, tgetflag, tputs, tgetent, BC, PC, UP -dnl On RedHat 7.0 however, libtermcap is broken: It contains no -dnl symbols at all. Fortunately, libcurses provides the same -dnl and therefore we have to check for that special case.) -dnl -AC_DEFUN([PLP_CHECK_READLINE], -[ - AC_MSG_CHECKING(for readline in -lreadline) - ac_cv_readline_libs="" - rl_desc="Define this, if you have libreadline" - saved_libs=$LIBS - LIBS="$LIBS -lreadline" - l1ok=0 - l2ok=0 - l3ok=0 - l4ok=0 - AC_TRY_LINK(,[extern char *readline(void); readline();],l1ok=1) - LIBS="$saved_LIBS -lreadline -ltermcap" - AC_TRY_LINK(,[extern char *readline(void); readline();],l2ok=1) - LIBS="$saved_LIBS -lreadline -lcurses" - AC_TRY_LINK(,[extern char *readline(void); readline();],l3ok=1) - LIBS="$saved_LIBS -lreadline -lncurses" - AC_TRY_LINK(,[extern char *readline(void); readline();],l4ok=1) - LIBS="$saved_LIBS" - case "$l1ok$l2ok$l3ok$l4ok" in - 0000) - AC_MSG_RESULT(no) - ;; - 01*) - dnl We prefer libtermcap cause it's smaller - ac_cv_readline_libs="-lreadline -ltermcap" - AC_MSG_RESULT([yes, and needs libtermcap]) - ;; - 001*) - dnl Prefer libcurses over libncurses - ac_cv_readline_libs="-lreadline -lcurses" - AC_MSG_RESULT([yes, and needs libcurses]) - ;; - 0001) - ac_cv_readline_libs="-lreadline -lncurses" - AC_MSG_RESULT([yes, and needs libncurses]) - ;; - 1*) - ac_cv_readline_libs="-lreadline" - AC_MSG_RESULT(yes) - ;; - esac - LIBREADLINE="${ac_cv_readline_libs}" - AC_SUBST(LIBREADLINE) - if test "${ac_cv_readline_libs}" != "" ; then - AC_DEFINE_UNQUOTED(HAVE_LIBREADLINE,1,$rl_desc) - fi -]) diff --git a/conf/m4/plptools/PLP_FIND_FILE.m4 b/conf/m4/plptools/PLP_FIND_FILE.m4 deleted file mode 100644 index 5de64e4..0000000 --- a/conf/m4/plptools/PLP_FIND_FILE.m4 +++ /dev/null @@ -1,17 +0,0 @@ -dnl -dnl Select first existing file from a list of given files -dnl Usage: -dnl PLP_FIND_FILE(filea fileb filec, FOUND) -dnl -dnl On return, variable FOUND is set to one of fileX or to NO, if none -dnl was found. -dnl -AC_DEFUN([PLP_FIND_FILE],[ - $2=NO - for i in $1; do - if test -r "$i" ; then - $2=$i - break 2 - fi - done -]) diff --git a/conf/m4/plptools/PLP_SET_LIBVERSION.m4 b/conf/m4/plptools/PLP_SET_LIBVERSION.m4 deleted file mode 100644 index 3f1e8a4..0000000 --- a/conf/m4/plptools/PLP_SET_LIBVERSION.m4 +++ /dev/null @@ -1,9 +0,0 @@ -AC_DEFUN([PLP_SET_LIBVERSION], - [ - AC_REQUIRE([AM_INIT_AUTOMAKE]) - maj=$(echo ${VERSION} | cut -d. -f1) - min=$(echo ${VERSION} | cut -d. -f2) - LIBVERSION=${maj}:${min}:${maj} - AC_SUBST(LIBVERSION) - ] -) |