File: configure.in

package info (click to toggle)
aca 0.1.6
  • links: PTS
  • area: main
  • in suites: woody
  • size: 492 kB
  • ctags: 569
  • sloc: ansic: 4,254; sh: 2,237; makefile: 256
file content (92 lines) | stat: -rw-r--r-- 2,079 bytes parent folder | download | duplicates (2)
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
#   Copyright 2001, RISKO, Gergely <risko@debian.org>. Under GPL.
#   With a lot of help from Karel Zak "Zakkr" <zakkr@zf.jcu.cz>

AC_INIT(widgets/button.c)
AC_CANONICAL_HOST
AC_PROG_CC

if test x"$GCC" = x"yes" ; then
   CFLAGS="$CFLAGS -Wall"
   SHARED_LIB=-fpic
fi

AC_PROG_LN_S
AC_PROG_INSTALL
AC_PATH_PROG(LS, ls, no)
AC_PATH_PROG(RM, rm, no)
AC_PATH_PROG(CP, cp, no)
AC_PATH_PROG(MSGFMT, msgfmt, no)
AC_PATH_PROG(XGETTEXT, xgettext, no)
AC_PATH_PROG(MAKE, make, no)
AC_PATH_PROG(RMDIR, rmdir, no)
VERSION=`cat VERSION`

AC_MSG_CHECKING(setting debug compiler flag)
AC_ARG_ENABLE(debug, [  --enable-debug          build with debugging symbols (-g)],
[
  case $enableval in
    yes)  CFLAGS="$CFLAGS -g"
          AC_MSG_RESULT(yes)
          debug="yes"
          ;;
    *)    CFLAGS=`echo "$CFLAGS" | sed -e 's/ -g/ /g' -e 's/^-g//'`
          AC_MSG_RESULT(no)
          debug="no"
	  ;;
  esac
],
[AC_MSG_RESULT(using default)])

dnl ======= libgpm =======

AC_ARG_ENABLE(mouse, 
	[  --disable-mouse         Compile without mouse code],
	[ mouse=no ],
	[ mouse="yes"]	
)

if test "$mouse" = "yes" 
then
	AC_ARG_WITH(libgpm, 
		[  --with-libgpm=base-dir  Specifies the base libgpm.a directory],
		if test x$withval = xyes
		then 
			AC_MSG_WARN(Usage is: --with-libgpm=base-dir)
		else
			LIBS="$LIBS -L$withval/lib/"
			INCLUDE="$INCLUDE -I$withval/include/"
		fi
	)
	AC_CHECK_LIB(gpm, Gpm_Open, [], [ 
		AC_MSG_WARN(not found library: gpm !!!) 
		mouse=no ])
fi

dnl ======= libncurses =======

AC_ARG_WITH(libncurses, 
	[  --with-libncurses=base-dir	Specifies the base libncurses.a directory],
	if test x$withval = xyes
	then 
		AC_MSG_WARN(Usage is: --with-libncurses=base-dir)
	else
		LIBS="$LIBS -L$withval/lib/"
		INCLUDE="$INCLUDE -I$withval/include/"
	fi
)

AC_CHECK_LIB(ncurses,  initscr, [], [AC_CHECK_LIB(curses, initscr, [], 
		AC_MSG_ERROR(not found library: ncurses !!!))])


DLSUFFIX=.so
AROPT=rcs
AC_SUBST(GCC)
AC_SUBST(AROPT)
AC_SUBST(SHARED_LIB)
AC_SUBST(DLSUFFIX)
AC_SUBST(INCLUDE)
AC_SUBST(VERSION)
AC_SUBST(debug)
AC_SUBST(mouse)
AC_OUTPUT(Makeconf)