File: configure.in

package info (click to toggle)
xfonts-efont-unicode 0.4.2-11
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 12,572 kB
  • sloc: perl: 1,272; makefile: 244; sh: 153
file content (113 lines) | stat: -rw-r--r-- 2,871 bytes parent folder | download | duplicates (8)
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.12)
AC_INIT(f14_add.hex)

dnl default values
X11FONTDIR=""

dnl Checks for programs.
AC_PROG_INSTALL

AC_PATH_PROG(MKFONTDIR, mkfontdir)
if test "x$MKFONTDIR" = "x" ; then
    echo "  Error: mkfontdir is necessary."
    exit 1;
fi

AC_PATH_PROG(SED, sed)
if test "x$SED" = "x" ; then
    echo "  Error: sed is necessary."
    exit 1;
fi

AC_PATH_PROG(GAWK, gawk)

if test "x$GAWK" = "x" ; then
	AC_PATH_PROG(GAWK, awk)
	if test "x$GAWK" = "x" ; then
	    echo "  Error: GNU awk is necessary, please install it."
	    exit 1;
	elif ! ($GAWK --copyleft > /dev/null 2>&1 ) ; then
	    echo "  Error: Your system has only non-GNU awk."
	    echo "        GNU awk is necessary specially, please install it."
	    exit 1;
	fi
fi

AC_PATH_PROG(PERL, perl)
if test "x$PERL" = "x" ; then
    echo "  Error: perl is necessary, please install it."
    exit 1;
fi

dnl
dnl Check for other options.
dnl
AC_ARG_WITH(fontdir,
[  --with-fontdir=DIR      install font directory],
    FONTDIR=$withval)

AC_ARG_ENABLE(bold, 
[  --disable-bold	  disable making bold fonts],
		MAKE_BOLD="", MAKE_BOLD=bold)

AC_ARG_ENABLE(italic, 
[  --disable-italic	  disable making italic fonts],
		MAKE_ITALIC="", MAKE_ITALIC=italic)

AC_ARG_ENABLE(bolditalic, 
[  --disable-bolditalic	  disable making bold italic fonts],
		MAKE_BOLDITALIC="", MAKE_BOLDITALIC=bolditalic)

AC_ARG_ENABLE(naga10,
[  --enable-naga10        enable naga10 fonts],
		NAGA10_H="5x10rk_uni.hex 5x10a_uni.hex"; NAGA10_F="knj10_uni.hex",
		NAGA10_H=""; NAGA10_F="")

dnl
dnl Search Font directory
dnl
if test -z "$X11FONTDIR" ; then
    for X11FONTDIR in	/usr/X11R6.4/lib/X11/fonts \
			/usr/X11R6/lib/X11/fonts \
			/usr/X11R5/lib/X11/fonts \
			/usr/X11/lib/X11/fonts \
			/usr/openwin/lib/X11/fonts \
			/usr/lib/X11/fonts ; do
	test -d $X11FONTDIR && break
    done
    echo checking X11 font directory... $X11FONTDIR
fi

dnl  Look up script files.
SCRIPTS=""
for SCRIPT in tools/*.in; do
	SCRIPTS="${SCRIPTS} "tools/$(basename ${SCRIPT} .in)
done

dnl Create Makefie
AC_SUBST(MAKE_BOLD)
AC_SUBST(MAKE_ITALIC)
AC_SUBST(MAKE_BOLDITALIC)
AC_SUBST(MKFONTDIR)
AC_SUBST(GAWK)
AC_SUBST(PERL)
AC_SUBST(X11FONTDIR)
AC_SUBST(NAGA10_H)
AC_SUBST(NAGA10_F)

AC_OUTPUT(Makefile ${SCRIPTS})

chmod +x ${SCRIPTS}

ALIAS_VOID_PATTERN="-e #"
test "x${MAKE_BOLD}"       = "x" && ALIAS_VOID_PATTERN="-e bold-r-   $ALIAS_VOID_PATTERN"
test "x${MAKE_ITALIC}"     = "x" && ALIAS_VOID_PATTERN="-e medium-i- $ALIAS_VOID_PATTERN"
test "x${MAKE_BOLDITALIC}" = "x" && ALIAS_VOID_PATTERN="-e bold-i-   $ALIAS_VOID_PATTERN"

if test -f "$ALIASFILE"; then
    sed 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/' $ALIASFILE | \
	grep . | grep -v $ALIAS_VOID_PATTERN | \
	awk '{if ($1 ~ /^!/ || $1 != $2) print $0;}' > $ALIASFILE-
    mv -f $ALIASFILE- $ALIASFILE
fi