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])
7 AM_INIT_AUTOMAKE([1.11 silent-rules])
9 dnl Checks for programs.
20 dnl move this earlier in the script... anyone know why this is handled
21 dnl in such a bizarre way?
23 test "x$prefix" = xNONE && prefix=$ac_default_prefix
24 dnl Let make expand exec_prefix.
25 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
27 dnl look for X windows first so further libs check
30 if test "$x_includes" != "NONE"; then
31 CFLAGS="$CFLAGS -I$x_includes"
33 if test "$x_libraries" != "NONE"; then
34 LDFLAGS="$LDFLAGS -L$x_libraries"
37 dnl Additional "default" items
39 #CFLAGS="$CFLAGS -I/usr/X11/include"
40 #LDFLAGS="$LDFLAGS -L/usr/X11/lib"
42 dnl Check for get-wraster-flags
43 AC_CHECK_PROG(GET_WRASTER_FLAGS, get-wraster-flags, get-wraster-flags)
44 if test "$GET_WRASTER_FLAGS" != ""; then
46 c_flags=`$GET_WRASTER_FLAGS --cflags`
48 CFLAGS="$CFLAGS $c_flags"
51 ld_flags=`$GET_WRASTER_FLAGS --ldflags`
53 LDFLAGS="$LDFLAGS $ld_flags"
56 libs_flags=`$GET_WRASTER_FLAGS --libs`
58 LIBS="$LIBS $libs_flags"
62 AC_MSG_ERROR("Danger Will Robinson: Unable to find get-wraster-flags in $PATH variable.");
65 dnl Check for get-wutil-flags
66 AC_CHECK_PROG(GET_WUTIL_FLAGS, get-wutil-flags, get-wutil-flags)
67 if test "$GET_WUTIL_FLAGS" != ""; then
69 c_flags=`$GET_WUTIL_FLAGS --cflags`
71 CFLAGS="$CFLAGS $c_flags"
74 ld_flags=`$GET_WUTIL_FLAGS --ldflags`
76 LDFLAGS="$LDFLAGS $ld_flags"
79 libs_flags=`$GET_WUTIL_FLAGS --libs`
81 LIBS="$LIBS $libs_flags"
85 AC_MSG_ERROR("Danger Will Robinson: Unable to find get-wutil-flags in $PATH variable.");
88 AC_CHECK_LIB(Xmu, XmuClientWindow)
90 dnl Support for extralibs
91 dnl ==============================================
95 AC_ARG_WITH(extralibs,
96 [ --with-extralibs=LIBS specify any libs the script doesn't detect e.g. -lmylib], extralibs=$withval )
98 if test "x$extralibs" != "x"; then
99 LIBS="$extralibs $LIBS"
102 AC_CHECK_LIB(Xft, XftFontOpen,,
103 AC_MSG_ERROR([Xft library not found]))
104 AC_CHECK_LIB(WMaker, WMAppSetMainMenu,,
105 AC_MSG_ERROR([WMaker library not found]))
106 AC_CHECK_LIB(WINGs, WMAppSetMainMenu,,
107 AC_MSG_ERROR([WINGs library not found]))
109 dnl Checks for PropList (not necessary since version 0.2.3b)
110 dnl AC_CHECK_HEADERS(proplist.h,, AC_MSG_WARN(Can't find PropList include-file: Please install libPropList (included in WindowMaker)))
111 dnl AC_CHECK_LIB(PropList, PLGetProplistWithPath,, AC_MSG_WARN(Can't find PropList library: Please install libPropList (included in WindowMaker)), , $LIBS)
113 dnl Needed by Sun/Solaris
114 AC_CHECK_LIB(nsl, gethostbyname)
115 AC_CHECK_LIB(socket, socket)
117 dnl Needed by FreeBSD
118 AC_CHECK_LIB(kvm, kvm_read)
120 dnl Checks for header files.
122 AC_CHECK_HEADERS(unistd.h)
125 dnl Checks for typedefs, structures, and compiler characteristics.
130 dnl Checks for library functions.
131 AC_CHECK_FUNCS(mktime strdup)
133 dnl Disable Clock in Inspector
134 dnl ==========================
138 [ --enable-clk enable inspector clk (default = yes)],
139 clk=$enableval, clk=yes)
140 AH_TEMPLATE([CLK],[enable inspector clk])
141 if test "$clk" = yes; then
142 AC_DEFINE([CLK], [1])
143 dnl AC_DEFINE(CLK, 1)
145 AC_DEFINE([CLK], [0])
146 dnl AC_DEFINE(CLK, 0)
150 dnl Support for GNUSTEP_LOCAL_ROOT
151 dnl ==============================================
155 AC_ARG_WITH(appspath,
156 [ --with-appspath=PATH specify the directory for GNUstep applications], appspath=$withval )
158 if test "x$appspath" = "x"; then
159 gnustepdir="${prefix}/GNUstep"
160 dnl WMPrefs uses this method but it doesn't seem to work for me
161 dnl if there are problems with ICONDIR or fsviewerdir uncomment
163 dnl gnustepdir='$(prefix)/GNUstep'
165 if test "x$GNUSTEP_LOCAL_ROOT" != "x" ; then
166 gnustepdir=`echo "$GNUSTEP_LOCAL_ROOT" | sed -e "s|^${prefix}|prefix|"`
167 gnustepdir=`echo $gnustepdir | sed -e 's|^prefix|${prefix}|'`
170 with_appspath=$gnustepdir/Apps
173 fsviewerdir=$with_appspath/FSViewer.app
174 AC_SUBST(fsviewerdir)
176 AH_TEMPLATE([ICONDIR],[Where to put icon files])
177 AC_DEFINE_UNQUOTED([ICONDIR], "${fsviewerdir}")
180 dnl ==============================================
181 dnl directory where .mo (translation) files should be placed
183 LOCALEDIR="${prefix}/share/locale"
186 AH_TEMPLATE([LOCALEDIR],[Where to put locale files])
187 AC_DEFINE_UNQUOTED(LOCALEDIR, "$LOCALEDIR")
190 AM_GNU_GETTEXT([external])
191 AM_GNU_GETTEXT_VERSION([0.15])
193 AC_OUTPUT(Makefile src/Makefile src/regexp/Makefile defs/Makefile \
194 po/Makefile.in m4/Makefile tiff/Makefile xpm/Makefile man/Makefile)