Make AddMouseRegion's index unsigned
[dockapps.git] / yawmppp / configure.in
blob429c466dcaff48a556e14e5b6ba9769b6c71aa4a
1 dnl configure.in for yawmppp
2 dnl by Felipe Bergo (bergo@seul.org)
4 dnl Process this file with autoconf to produce a configure script.
5 AC_INIT(src/gtksetup/applet.c)
6 AC_PREREQ(2.0)
8 AC_CHECK_PROG(GNU_MAKE,make,yes)
9 AC_CHECK_PROG(GOTSED,sed,yes,no)
10 AC_PROG_CC
11 AC_PROG_INSTALL
13 AC_HEADER_STDC
14 AC_HEADER_CHECK(unistd.h,,AC_MSG_ERROR(required header file missing))
15 AC_HEADER_CHECK(sys/wait.h,,AC_MSG_ERROR(required header file missing))
16 AC_HEADER_CHECK(sys/stat.h,,AC_MSG_ERROR(required header file missing))
17 AC_HEADER_CHECK(sys/param.h,,AC_MSG_ERROR(required header file missing))
18 AC_HEADER_CHECK(sys/types.h,,AC_MSG_ERROR(required header file missing))
19 AC_HEADER_CHECK(sys/ioctl.h,,AC_MSG_ERROR(required header file missing))
20 AC_HEADER_CHECK(sys/socket.h,,AC_MSG_ERROR(required header file missing))
22 AC_PATH_X
24 XINC="$x_includes"
25 XLIB="$x_libraries"
27 if test "tmp$no_x" = "tmpyes" ; then
28         AC_MSG_ERROR(
30 ** You must have the X11R6 system. If you have an X11R6 system installed
31    and are seeing this message, try using the --x-includes and --x-libraries
32    options with configure. Use the --help option for help.
37 AC_HEADER_CHECK(X11/Xlib.h,,AC_MSG_WARN(required header file missing ?))
38 AC_HEADER_CHECK(X11/xpm.h,,AC_MSG_WARN(required header file missing ?))
39 AC_HEADER_CHECK(X11/extensions/shape.h,,AC_MSG_WARN(required header file missing ?))
41 AC_SUBST(XINC)
42 AC_SUBST(XLIB)
44 AC_MSG_CHECKING(Operating System)
45 OSTYPE=`uname -s`
46 AC_MSG_RESULT("$OSTYPE")
48 SYSDEF="UNKNOWN"
50 case $OSTYPE in
51   Linux)
52     AC_HEADER_CHECK(asm/types.h,,AC_MSG_ERROR(required header file missing))
53     AC_HEADER_CHECK(linux/if.h,,AC_MSG_ERROR(required header file missing))
54     AC_HEADER_CHECK(linux/ppp_defs.h,,AC_MSG_ERROR(required header file missing))
55     AC_HEADER_CHECK(linux/if_ppp.h,,AC_MSG_ERROR(required header file missing))
56     SYSDEF="LINUX"
57     ;;
58   FreeBSD)
59     AC_HEADER_CHECK(net/if.h,,AC_MSG_ERROR(required header file missing))
60 dnl AC_HEADER_CHECK(net/if_ppp.h,,AC_MSG_ERROR(required header file missing))
61     AC_HEADER_CHECK(net/ppp_defs.h,,AC_MSG_ERROR(required header file missing))
62     SYSDEF="FREEBSD"
63     ;;
64   OpenBSD)
65     AC_MSG_WARN(*************************************************)
66     AC_MSG_WARN(*                                               *)
67     AC_MSG_WARN(* OpenBSD support not tested - if it works      *)
68     AC_MSG_WARN(* please report to bergo@seul.org. Good Luck.   *)
69     AC_MSG_WARN(*                                               *)
70     AC_MSG_WARN(*************************************************)
71     sleep 2
72     AC_HEADER_CHECK(net/if.h,,AC_MSG_ERROR(required header file missing))
73 dnl AC_HEADER_CHECK(net/if_ppp.h,,AC_MSG_ERROR(required header file missing))
74     AC_HEADER_CHECK(net/ppp_defs.h,,AC_MSG_ERROR(required header file missing))
75     SYSDEF="OPENBSD"
76     ;;
77   NetBSD)
78     AC_MSG_WARN(*************************************************)
79     AC_MSG_WARN(*                                               *)
80     AC_MSG_WARN(* NetBSD support not tested - if it works       *)
81     AC_MSG_WARN(* please report to bergo@seul.org. Good Luck.   *)
82     AC_MSG_WARN(*                                               *)
83     AC_MSG_WARN(*************************************************)
84     sleep 2
85     AC_HEADER_CHECK(net/if.h,,AC_MSG_ERROR(required header file missing))
86 dnl AC_HEADER_CHECK(net/if_ppp.h,,AC_MSG_ERROR(required header file missing))
87     AC_HEADER_CHECK(net/ppp_defs.h,,AC_MSG_ERROR(required header file missing))
88     SYSDEF="NETBSD"
89     ;;
90 esac
92 if test "$SYSDEF" = "UNKNOWN" ; then
93     AC_HEADER_CHECK(net/if.h,,AC_MSG_ERROR(required header file missing))
94     AC_HEADER_CHECK(net/if_ppp.h,,AC_MSG_ERROR(required header file missing))
95     AC_HEADER_CHECK(net/ppp_defs.h,,AC_MSG_ERROR(required header file missing))
96     AC_MSG_WARN(*************************************************)
97     AC_MSG_WARN(*                                               *)
98     AC_MSG_WARN(* This system has not been tested. I will try   *)
99     AC_MSG_WARN(* compiling with BSDish settings. If it works   *)
100     AC_MSG_WARN(* please report to bergo@seul.org. Good Luck!   *)
101     AC_MSG_WARN(*                                               *)
102     AC_MSG_WARN(*************************************************)
103     sleep 2
104     SYSDEF="BSDISH"
107 AC_SUBST(SYSDEF)
109 dnl now gtk
111 AC_PATH_PROG(GTKCONFIG,gtk-config,no)
113 if test "$GTKCONFIG" = "no" ; then
114 AC_MSG_ERROR(
116 -(GTK >= 1.2.1 NOT FOUND)---------------------------------------
117  The config application requires the GTK libary. See the
118  README for information on how to install GTK.
119 ----------------------------------------------------------------
121 else
122   dnl check for gtk-version
123   GTK_LIBS=`$GTKCONFIG --libs`
124   GTK_FLAGS=`$GTKCONFIG --cflags`
126   dnl test for Gtk+ >= 1.2.1
127   AC_MSG_CHECKING(for gtk+ >=1.2.1)
129   dnl copied from gtk+'s aclocal.m4. These guys must love sed
130   GTK_MAJOR=`$GTKCONFIG --version | \
131            sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
132   GTK_MINOR=`$GTKCONFIG --version | \
133            sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
134   GTK_MICRO=`$GTKCONFIG --version | \
135            sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
137   GTK121_FINE=1
139   if test $GTK_MAJOR -lt 1 ; then
140     GTK121_FINE=0
141   else
142     if test $GTK_MAJOR -eq 1 ; then
143       if test $GTK_MINOR -lt 2 ; then
144           GTK121_FINE=0
145       fi
146       if test $GTK_MINOR -eq 2 ; then
147           if test $GTK_MICRO -lt 1 ; then
148               GTK121_FINE=0
149           fi
150       fi
151     fi
152   fi
154   if test "$GTK121_FINE" = "1" ; then
155       AC_MSG_RESULT(yes)
156   else
157       AC_MSG_RESULT(no)
158       AC_MSG_ERROR(
160 -(GTK >= 1.2.1 NOT FOUND)---------------------------------------
161  The config application requires the GTK libary. See the
162  README for information on how to install GTK.
163 ----------------------------------------------------------------
166   fi
169 AC_SUBST(GTK_LIBS)
170 AC_SUBST(GTK_FLAGS)
172 MK_YAWMPPP_RELEASE="2.0.2"
173 AC_SUBST(MK_YAWMPPP_RELEASE)
175 AC_OUTPUT(Makefile src/Makefile src/dockapp/Makefile src/gtksetup/Makefile src/gtklog/Makefile src/thinppp/Makefile)
177 echo
178 echo "--> type make to compile yawmppp"
179 echo