summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbwarken <bwarken>2011-03-21 21:37:53 +0000
committerbwarken <bwarken>2011-03-21 21:37:53 +0000
commit76311ed0bac3df270d1fa3a71b0cda2a030e7753 (patch)
treee46938a4105c2479333edc6ed236fd0bbcc3156b
parent3c74e24b61e0e7551f68f16313bd9e76627ccf26 (diff)
downloadgroff-76311ed0bac3df270d1fa3a71b0cda2a030e7753.tar.gz
groffer: remove hardcoded path to 'libdir/groff/groffer' directory.
-rw-r--r--ChangeLog11
-rw-r--r--Makefile.in3
-rwxr-xr-xconfigure57
-rw-r--r--configure.ac2
-rw-r--r--contrib/groffer/ChangeLog9
-rw-r--r--contrib/groffer/Makefile.sub4
-rwxr-xr-xcontrib/groffer/perl/groffer.pl3
-rw-r--r--m4/groff.m416
8 files changed, 80 insertions, 25 deletions
diff --git a/ChangeLog b/ChangeLog
index feeb272c..281b5801 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2011-03-21 Jan Vcelak <jvcelak@redhat.com>
+ Bernd Warken
+
+ [groffer] Remove hardcoded path to 'libdir/groff/groffer' directory.
+
+ * configure.ac: add GROFFERDIR variables.
+
+ * Makefile.in: add and handle variable groffer_dir
+
+ * m4/groff.m4: set up the --with-grofferdir command line option.
+
2011-03-18 Werner LEMBERG <wl@gnu.org>
[troff] Improve error message.
diff --git a/Makefile.in b/Makefile.in
index d068a30e..e938c8a8 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -188,6 +188,8 @@ localtmacdir=$(dataprogramdir)/site-tmac
# gxditview.
appresdir=@appresdir@
+groffer_dir=@groffer_dir@
+
# `tmacpath' says where to look for macro files.
# The current directory will be prepended in unsafe mode only; the home
# directory will be always added.
@@ -493,6 +495,7 @@ MDEFINES= \
"YACC=$(YACC)" \
"YACCFLAGS=$(YACCFLAGS)" \
"appresdir=$(appresdir)" \
+ "groffer_dir=$(groffer_dir)" \
"bindir=$(bindir)" \
"common_words_file=$(common_words_file)" \
"datadir=$(datadir)" \
diff --git a/configure b/configure
index 0e806a10..5760f805 100755
--- a/configure
+++ b/configure
@@ -648,6 +648,7 @@ PSPRINT
LPQ
LP
LPR
+groffer_dir
appresdir
XLIBDIRS
XPROGDIRS
@@ -715,6 +716,7 @@ ac_user_opts='
enable_option_checking
with_x
with_appresdir
+with_grofferdir
with_gnu_ld
enable_rpath
with_libiconv_prefix
@@ -1362,6 +1364,7 @@ Optional Packages:
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-x use the X Window System
--with-appresdir=DIR X11 application resource files
+ --with-grofferdir=DIR groffer files location
--with-gnu-ld assume the C compiler uses GNU ld default=no
--with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
--without-libiconv-prefix don't search for libiconv in includedir and libdir
@@ -1610,7 +1613,7 @@ $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >
$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
( $as_echo "## -------------------------------- ##
## Report this to bug-groff@gnu.org ##
-## -------------------------------- ##"[]
+## -------------------------------- ##"
) | sed "s/^/$as_me: WARNING: /" >&2
;;
esac
@@ -2103,7 +2106,7 @@ trap 'exit_status=$?
$as_echo "## ---------------- ##
## Cache variables. ##
-## ---------------- ##"[]
+## ---------------- ##"
echo
# The following way of writing the cache mishandles newlines in values,
(
@@ -2139,7 +2142,7 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
$as_echo "## ----------------- ##
## Output variables. ##
-## ----------------- ##"[]
+## ----------------- ##"
echo
for ac_var in $ac_subst_vars
do
@@ -2154,7 +2157,7 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
if test -n "$ac_subst_files"; then
$as_echo "## ------------------- ##
## File substitutions. ##
-## ------------------- ##"[]
+## ------------------- ##"
echo
for ac_var in $ac_subst_files
do
@@ -2170,7 +2173,7 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
if test -s confdefs.h; then
$as_echo "## ----------- ##
## confdefs.h. ##
-## ----------- ##"[]
+## ----------- ##"
echo
cat confdefs.h
echo
@@ -2249,7 +2252,7 @@ $as_echo "$as_me: loading site script $ac_site_file" >&6;}
|| { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "failed to load site script $ac_site_file
-See \`config.log' for more details" "$LINENO" 5; }
+See \`config.log' for more details" "$LINENO" 5 ; }
fi
done
@@ -2648,7 +2651,7 @@ fi
test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "no acceptable C compiler found in \$PATH
-See \`config.log' for more details" "$LINENO" 5; }
+See \`config.log' for more details" "$LINENO" 5 ; }
# Provide some information about the compiler.
$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
@@ -2763,7 +2766,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "C compiler cannot create executables
-See \`config.log' for more details" "$LINENO" 5; }
+See \`config.log' for more details" "$LINENO" 5 ; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
@@ -2806,7 +2809,7 @@ else
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details" "$LINENO" 5; }
+See \`config.log' for more details" "$LINENO" 5 ; }
fi
rm -f conftest conftest$ac_cv_exeext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
@@ -2865,7 +2868,7 @@ $as_echo "$ac_try_echo"; } >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot run C compiled programs.
If you meant to cross compile, use \`--host'.
-See \`config.log' for more details" "$LINENO" 5; }
+See \`config.log' for more details" "$LINENO" 5 ; }
fi
fi
fi
@@ -2917,7 +2920,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot compute suffix of object files: cannot compile
-See \`config.log' for more details" "$LINENO" 5; }
+See \`config.log' for more details" "$LINENO" 5 ; }
fi
rm -f conftest.$ac_cv_objext conftest.$ac_ext
fi
@@ -3266,7 +3269,7 @@ else
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details" "$LINENO" 5; }
+See \`config.log' for more details" "$LINENO" 5 ; }
fi
ac_ext=c
@@ -3899,7 +3902,7 @@ fi
test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "no acceptable C compiler found in \$PATH
-See \`config.log' for more details" "$LINENO" 5; }
+See \`config.log' for more details" "$LINENO" 5 ; }
# Provide some information about the compiler.
$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
@@ -4592,7 +4595,7 @@ if test "x$with_x" = xno; then
have_x=disabled
else
case $x_includes,$x_libraries in #(
- *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
+ *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5 ;; #(
*,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
$as_echo_n "(cached) " >&6
else
@@ -5446,6 +5449,18 @@ EOF
fi
fi
+
+# Check whether --with-grofferdir was given.
+if test "${with_grofferdir+set}" = set; then :
+ withval=$with_grofferdir;
+fi
+
+if test "x$with_grofferdir" = "x"; then
+ groffer_dir=$libdir/groff/groffer
+ else
+ groffer_dir=$with_grofferdir
+ fi
+
if test -z "$PSPRINT"; then
for ac_prog in lpr
do
@@ -7765,7 +7780,7 @@ $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
;; #(
*)
as_fn_error $? "unknown endianness
- presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
+ presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
esac
@@ -7868,7 +7883,7 @@ fi
$as_echo "$ac_cv_build" >&6; }
case $ac_cv_build in
*-*-*) ;;
-*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
esac
build=$ac_cv_build
ac_save_IFS=$IFS; IFS='-'
@@ -7901,7 +7916,7 @@ fi
$as_echo "$ac_cv_host" >&6; }
case $ac_cv_host in
*-*-*) ;;
-*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
esac
host=$ac_cv_host
ac_save_IFS=$IFS; IFS='-'
@@ -10914,7 +10929,7 @@ do
"contrib/gdiffmk/tests/runtests") CONFIG_FILES="$CONFIG_FILES contrib/gdiffmk/tests/runtests" ;;
"test-groff") CONFIG_FILES="$CONFIG_FILES test-groff" ;;
- *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+ *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
esac
done
@@ -11229,7 +11244,7 @@ do
esac
case $ac_mode$ac_tag in
:[FHL]*:*);;
- :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
+ :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
:[FH]-) ac_tag=-:-;;
:[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
esac
@@ -11257,7 +11272,7 @@ do
[\\/$]*) false;;
*) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
esac ||
- as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+ as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
esac
case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
as_fn_append ac_file_inputs " '$ac_f'"
@@ -11284,7 +11299,7 @@ $as_echo "$as_me: creating $ac_file" >&6;}
case $ac_tag in
*:-:* | *:-) cat >"$tmp/stdin" \
- || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
esac
;;
esac
diff --git a/configure.ac b/configure.ac
index f528e1b7..c4310594 100644
--- a/configure.ac
+++ b/configure.ac
@@ -59,6 +59,8 @@ GROFF_OS390
GROFF_X11
GROFF_APPRESDIR_OPTION
GROFF_APPRESDIR_DEFAULT
+GROFF_GROFFERDIR_OPTION
+GROFF_GROFFERDIR_DEFAULT
GROFF_PRINT
AC_PROG_EGREP
AC_PATH_PROG([PERLPATH], [perl], [/usr/bin/perl])
diff --git a/contrib/groffer/ChangeLog b/contrib/groffer/ChangeLog
index d881fd62..342b0250 100644
--- a/contrib/groffer/ChangeLog
+++ b/contrib/groffer/ChangeLog
@@ -1,3 +1,12 @@
+2011-03-21 Jan Vcelak <jvcelak@redhat.com>
+ Bernd Warken
+
+ Remove hardcoded path to 'libdir/groff/groffer' directory.
+
+ * Makefile.sub: use @groffer_dir@
+
+ * groffer.pl: use @groffer_dir@
+
2011-01-27 James Budiono <james.budiono@gmail.com>
Bernd Warken
diff --git a/contrib/groffer/Makefile.sub b/contrib/groffer/Makefile.sub
index 6d2666be..bc962a28 100644
--- a/contrib/groffer/Makefile.sub
+++ b/contrib/groffer/Makefile.sub
@@ -63,8 +63,6 @@ GROFFER_REST=$(srcdir)/roff2.man \
GROFFER_PERL_=`echo $(GROFFER_PERL) | sed 's|$(srcdir)/perl/||g'`
GROFFER_SHELL_=`echo $(GROFFER_SHELL) | sed 's|$(srcdir)/shell||g'`
-groffer_dir=$(libdir)/groff/groffer
-
# TODO: Add perl check to configure script.
groffer: $(GROFFER_PERL) $(GROFFER_SHELL) \
$(GROFFER_REST) $(SH_DEPS_SED_SCRIPT)
@@ -75,6 +73,7 @@ groffer: $(GROFFER_PERL) $(GROFFER_SHELL) \
-e "s|@g@|$(g)|g" \
-e "s|@BINDIR@|$(DESTDIR)$(bindir)|g" \
-e "s|@libdir@|$(DESTDIR)$(libdir)|g" \
+ -e "s|@groffer_dir@|$(DESTDIR)$(groffer_dir)|g" \
-e "s|@VERSION@|$(version)$(revision)|g" \
-e "$(SH_SCRIPT_SED_CMD)" \
$(srcdir)/perl/groffer.pl >$@; \
@@ -89,6 +88,7 @@ groffer: $(GROFFER_PERL) $(GROFFER_SHELL) \
-e "s|@g@|$(g)|g" \
-e "s|@BINDIR@|$(DESTDIR)$(bindir)|g" \
-e "s|@libdir@|$(DESTDIR)$(libdir)|g" \
+ -e "s|@groffer_dir@|$(DESTDIR)$(groffer_dir)|g" \
-e "s|@VERSION@|$(version)$(revision)|g" \
-e "$(SH_SCRIPT_SED_CMD)" \
$(srcdir)/shell/groffer.sh >$@; \
diff --git a/contrib/groffer/perl/groffer.pl b/contrib/groffer/perl/groffer.pl
index 5254dcd8..9805fcf6 100755
--- a/contrib/groffer/perl/groffer.pl
+++ b/contrib/groffer/perl/groffer.pl
@@ -132,8 +132,7 @@ BEGIN {
$at_at{'BINDIR'} = '@BINDIR@';
$at_at{'G'} = '@g@';
$at_at{'LIBDIR'} = '@libdir@';
- $groffer_libdir =
- File::Spec->catdir($at_at{'LIBDIR'}, 'groff', 'groffer');
+ $groffer_libdir = '@groffer_dir@';
$file_perl_test_pl = File::Spec->catfile($groffer_libdir,
'perl_test.pl');
$File_version_sh = File::Spec->catfile($groffer_libdir, 'version.sh');
diff --git a/m4/groff.m4 b/m4/groff.m4
index c2c58cc5..349399d0 100644
--- a/m4/groff.m4
+++ b/m4/groff.m4
@@ -1193,3 +1193,19 @@ AC_DEFUN([GROFF_APPRESDIR_CHECK],
])
fi
fi])
+
+
+# Set up the `--with-grofferdir' command line option.
+
+AC_DEFUN([GROFF_GROFFERDIR_OPTION],
+ [AC_ARG_WITH([grofferdir],
+ AS_HELP_STRING([--with-grofferdir=DIR],
+ [groffer files location]))])
+
+AC_DEFUN([GROFF_GROFFERDIR_DEFAULT],
+ [if test "x$with_grofferdir" = "x"; then
+ groffer_dir=$libdir/groff/groffer
+ else
+ groffer_dir=$with_grofferdir
+ fi
+ AC_SUBST([groffer_dir])])