1 dnl Process this file with autoconf to produce a configure script.
3 AC_INIT(FSViewer.app,0.2.6,[guido.scholz@bayernline.de])
4 AC_CONFIG_SRCDIR([src/FSViewer.c])
5 AM_INIT_AUTOMAKE([dist-bzip2])
6 AC_CONFIG_HEADERS([src/config.h])
8 dnl Checks for programs.
19 dnl move this earlier in the script... anyone know why this is handled
20 dnl in such a bizarre way?
22 test "x$prefix" = xNONE && prefix=$ac_default_prefix
23 dnl Let make expand exec_prefix.
24 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
26 dnl look for X windows first so further libs check
29 if test "$x_includes" != "NONE"; then
30 CFLAGS="$CFLAGS -I$x_includes"
32 if test "$x_libraries" != "NONE"; then
33 LDFLAGS="$LDFLAGS -L$x_libraries"
36 dnl Additional "default" items
38 #CFLAGS="$CFLAGS -I/usr/X11/include"
39 #LDFLAGS="$LDFLAGS -L/usr/X11/lib"
41 dnl Check for get-wraster-flags
42 AC_CHECK_PROG(GET_WRASTER_FLAGS, get-wraster-flags, get-wraster-flags)
43 if test "$GET_WRASTER_FLAGS" != ""; then
45 c_flags=`$GET_WRASTER_FLAGS --cflags`
47 CFLAGS="$CFLAGS $c_flags"
50 ld_flags=`$GET_WRASTER_FLAGS --ldflags`
52 LDFLAGS="$LDFLAGS $ld_flags"
55 libs_flags=`$GET_WRASTER_FLAGS --libs`
57 LIBS="$LIBS $libs_flags"
61 AC_MSG_ERROR("Danger Will Robinson: Unable to find get-wraster-flags in $PATH variable.");
64 dnl Check for get-wutil-flags
65 AC_CHECK_PROG(GET_WUTIL_FLAGS, get-wutil-flags, get-wutil-flags)
66 if test "$GET_WUTIL_FLAGS" != ""; then
68 c_flags=`$GET_WUTIL_FLAGS --cflags`
70 CFLAGS="$CFLAGS $c_flags"
73 ld_flags=`$GET_WUTIL_FLAGS --ldflags`
75 LDFLAGS="$LDFLAGS $ld_flags"
78 libs_flags=`$GET_WUTIL_FLAGS --libs`
80 LIBS="$LIBS $libs_flags"
84 AC_MSG_ERROR("Danger Will Robinson: Unable to find get-wutil-flags in $PATH variable.");
87 AC_CHECK_LIB(Xmu, XmuClientWindow)
89 dnl Support for extralibs
90 dnl ==============================================
94 AC_ARG_WITH(extralibs,
95 [ --with-extralibs=LIBS specify any libs the script doesn't detect e.g. -lmylib], extralibs=$withval )
97 if test "x$extralibs" != "x"; then
98 LIBS="$extralibs $LIBS"
101 AC_CHECK_LIB(Xft, XftFontOpen,,
102 AC_MSG_ERROR([Xft library not found]))
103 AC_CHECK_LIB(WMaker, WMAppSetMainMenu,,
104 AC_MSG_ERROR([WMaker library not found]))
105 AC_CHECK_LIB(WINGs, WMAppSetMainMenu,,
106 AC_MSG_ERROR([WINGs library not found]))
108 dnl Checks for PropList (not necessary since version 0.2.3b)
109 dnl AC_CHECK_HEADERS(proplist.h,, AC_MSG_WARN(Can't find PropList include-file: Please install libPropList (included in WindowMaker)))
110 dnl AC_CHECK_LIB(PropList, PLGetProplistWithPath,, AC_MSG_WARN(Can't find PropList library: Please install libPropList (included in WindowMaker)), , $LIBS)
112 dnl Needed by Sun/Solaris
113 AC_CHECK_LIB(nsl, gethostbyname)
114 AC_CHECK_LIB(socket, socket)
116 dnl Needed by FreeBSD
117 AC_CHECK_LIB(kvm, kvm_read)
119 dnl Checks for header files.
121 AC_CHECK_HEADERS(unistd.h)
124 dnl Checks for typedefs, structures, and compiler characteristics.
129 dnl Checks for library functions.
130 AC_CHECK_FUNCS(mktime strdup)
132 dnl Disable Clock in Inspector
133 dnl ==========================
137 [ --enable-clk enable inspector clk (default = yes)],
138 clk=$enableval, clk=yes)
139 AH_TEMPLATE([CLK],[enable inspector clk])
140 if test "$clk" = yes; then
141 AC_DEFINE([CLK], [1])
142 dnl AC_DEFINE(CLK, 1)
144 AC_DEFINE([CLK], [0])
145 dnl AC_DEFINE(CLK, 0)
149 dnl Support for GNUSTEP_LOCAL_ROOT
150 dnl ==============================================
154 AC_ARG_WITH(appspath,
155 [ --with-appspath=PATH specify the directory for GNUstep applications], appspath=$withval )
157 if test "x$appspath" = "x"; then
158 gnustepdir="${prefix}/GNUstep"
159 dnl WMPrefs uses this method but it doesn't seem to work for me
160 dnl if there are problems with ICONDIR or fsviewerdir uncomment
162 dnl gnustepdir='$(prefix)/GNUstep'
164 if test "x$GNUSTEP_LOCAL_ROOT" != "x" ; then
165 gnustepdir=`echo "$GNUSTEP_LOCAL_ROOT" | sed -e "s|^${prefix}|prefix|"`
166 gnustepdir=`echo $gnustepdir | sed -e 's|^prefix|${prefix}|'`
169 with_appspath=$gnustepdir/Apps
172 fsviewerdir=$with_appspath/FSViewer.app
173 AC_SUBST(fsviewerdir)
175 AH_TEMPLATE([ICONDIR],[Where to put icon files])
176 AC_DEFINE_UNQUOTED([ICONDIR], "${fsviewerdir}")
179 dnl ==============================================
180 dnl directory where .mo (translation) files should be placed
182 LOCALEDIR="${prefix}/share/locale"
185 AH_TEMPLATE([LOCALEDIR],[Where to put locale files])
186 AC_DEFINE_UNQUOTED(LOCALEDIR, "$LOCALEDIR")
189 AM_GNU_GETTEXT([external])
190 AM_GNU_GETTEXT_VERSION([0.15])
192 AC_OUTPUT(Makefile src/Makefile src/regexp/Makefile defs/Makefile \
193 po/Makefile.in m4/Makefile tiff/Makefile xpm/Makefile man/Makefile)