summaryrefslogtreecommitdiff
path: root/Build/source/texk/xdvik/configure.in.work
blob: ab0e576256d92c5ef12f1c89fd793b7790859086 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52

dnl ##########

dnl SU: added flags to turn on gcc warnings, taken from gnome/compiler-flags.m4 and put into aclocal.m4
COMPILER_WARNINGS

dnl ##########

dnl First, check for libXp and libXext:
if test -z "$x_ext_lib"; then # allow envvar override
  if test -n "$x_libraries"; then
    XLFLAG="-L$x_libraries"
  else
    XLFLAG=
  fi
  AC_CHECK_LIB(Xp, XpQueryVersion,
               x_ext_lib="-lXp -lXext", :, -lXext -lX11 $X_EXTRA_LIBS $XLFLAG)
fi
dnl
dnl If libXp not found, try libXext only:
dnl
if test -z "$x_ext_lib"; then # previous test unsuccessful, or envvar override
  if test -n "$x_libraries"; then
    XLFLAG="-L$x_libraries"
  else
    XLFLAG=
  fi
  AC_CHECK_LIB(Xext, XextCreateExtension,
               x_ext_lib=-lXext, :, -lX11 $X_EXTRA_LIBS $XLFLAG)
fi
AC_SUBST(x_ext_lib)

dnl ##########

dnl We try to perform the $program_transform_name replacement already
dnl here, and AC_SUBST the final names into the Makefile; this makes
dnl the compilation commands more readable and causes less problems with
dnl backtick magic inside other commands.
dnl
dnl For some reason, the doubling of $$ and \\ must be reverted here:
my_program_transform_name=`echo $program_transform_name | sed 's,\\$\\$,$,g' | sed 's,\\\\\\\\,\\\\,g'`
exec_name="xdvi-$prog_extension"
final_exec_name=`echo $exec_name | sed "$my_program_transform_name"`
dnl OBSOLETE?? exec_link=`echo xdvi.bin | sed "$my_program_transform_name"`		
wrapper_script=`echo xdvi | sed "$my_program_transform_name"`		
AC_SUBST(exec_name)
AC_SUBST(final_exec_name)
dnl OBSOLETE?? AC_SUBST(exec_link)
AC_SUBST(wrapper_script)

dnl ##########