*** empty log message ***
[wmaker-crm.git] / configure.in
bloba6c7cf8145eb851ffd17ef8c5f3b2d58ba74fce3
1 dnl
2 dnl Window Maker autoconf input.
3 dnl
4 dnl Process with: aclocal; autoconf; automake
5 dnl
6 dnl
9 AC_INIT(src/WindowMaker.h)
13 AM_INIT_AUTOMAKE(WindowMaker, 0.62.0)
15 AM_PROG_LIBTOOL
17 # by Marcelo Magallon <mmagallo@efis.ucr.ac.cr>
18 # Turn around -rpath problem with libtool 1.0c
19 # This define should be improbable enough to not conflict with anything
20 case ${host} in
21   *-pc-linux-gnu)
22     AC_MSG_RESULT([Fixing libtool for -rpath problems.])
23     sed < libtool > libtool-2 \
24     's/^hardcode_libdir_flag_spec.*$/hardcode_libdir_flag_spec=" -D__LIBTOOL_IS_A_FOOL__ "/'
25     mv libtool-2 libtool
26     chmod 755 libtool
27   ;;
28 esac
31 AM_CONFIG_HEADER(src/config.h)
34 dnl Checks for host/os name
35 dnl =======================
36 AC_CANONICAL_HOST
39 dnl Checks for programs.
40 dnl ===================
41 AC_ISC_POSIX
42 AC_PROG_CC
43 dnl AC_PROG_MAKE_SET -- already done by AM_INIT_AUTOMAKE
44 #AC_PROG_RANLIB
45 dnl AC_PROG_INSTALL -- already done by AM_INIT_AUTOMAKE
46 AC_PROG_LN_S
47 AC_PROG_GCC_TRADITIONAL
50 dnl the prefix
51 dnl ==========
52 dnl
53 dnl move this earlier in the script... anyone know why this is handled
54 dnl in such a bizarre way?
56 test "x$prefix" = xNONE && prefix=$ac_default_prefix
57 dnl Let make expand exec_prefix.
58 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
61 _bindir=`eval echo $bindir`
62 _bindir=`eval echo $_bindir`
64 _libdir=`eval echo $libdir`
65 _libdir=`eval echo $_libdir`
66 lib_search_path="-L$_libdir"
68 inc_search_path=`eval echo $includedir`
69 inc_search_path="-I`eval echo $inc_search_path`"
72 dnl
73 dnl Check for RedHat bugs
74 dnl =====================
76 dnl WM_CHECK_REDCRAP_BUGS($prefix,$_bindir,$_libdir)
79 dnl
80 dnl Specify paths to look for libraries and headers
81 dnl ===============================================
82 AC_ARG_WITH(libs-from,
83 [  --with-libs-from       pass compiler flags to look for libraries],
84         [lib_search_path="$withval $lib_search_path"])
86 AC_ARG_WITH(incs-from,
87 [  --with-incs-from       pass compiler flags to look for header files],
88         [inc_search_path="$withval $inc_search_path"])
92 dnl Checks for library functions.
93 dnl ============================
94 dnl not used anywhere
95 dnl AC_FUNC_MEMCMP  
96 AC_FUNC_VPRINTF
97 AC_FUNC_ALLOCA
98 AC_CHECK_FUNCS(gethostname select poll strerror strncasecmp setpgid atexit)
102 dnl Loading of dynamic libraries at runtime
103 dnl =======================================
104 DLLIBS=""
106 AC_CHECK_FUNC(dlopen, [HAVEDL="yes"], 
107         AC_CHECK_LIB(dl, dlopen, [DLLIBS="-ldl" HAVEDL="yes"],
108                          DLLIBS="" ))
110 if test "x$HAVEDL" = xyes; then
111     AC_CHECK_HEADERS(dlfcn.h)
116 dnl Check CPP
117 dnl =========
118 if test "x$CPP_PATH" = x; then
119     AC_PATH_PROG(CPP_PATH, cpp, notfound, 
120                 $PATH:/lib:/usr/bin:/bin:/usr/lib:/usr/ccs/lib)
124 dnl Tell stupid Solaris cpp that the files it will process have C++ like syntax
125 dnl RedHat 5.x is broken too, so it won't make a symlink from cpp to the
126 dnl standard locations
128 if test "$CPP_PATH" = "/usr/ccs/lib/cpp" -o "$CPP_PATH" = "notfound" ; then
129     if test "$GCC" = "yes"; then
130         CPP_PATH="gcc -E -x c"
131     else 
132         if test "$CPP_PATH" = "/usr/ccs/lib/cpp"; then
133             CPP_PATH="$CPP_PATH -B"
134         else
135             echo "cpp, the C preprocessor was not found in your system."
136             echo "Create a symbolic link from it to /lib/cpp and rerun configure"
137             exit
138         fi
139     fi
141 AC_DEFINE_UNQUOTED(CPP_PATH, "$CPP_PATH")
145 dnl Checks for header files.
146 dnl =======================
147 dnl AC_HEADER_STDC
148 AC_HEADER_SYS_WAIT
149 AC_HEADER_TIME
150 AC_CHECK_HEADERS(fcntl.h limits.h sys/ioctl.h sys/time.h sys/types.h\
151                 libintl.h sys/select.h poll.h)
155 dnl Checks for typedefs, structures, and compiler characteristics.
156 dnl ==============================================================
157 AC_DECL_SYS_SIGLIST
158 AC_C_CONST
159 #AC_TYPE_SIZE_T
160 #AC_TYPE_PID_T
161 AC_TYPE_SIGNAL
163     
165 dnl Compiler/architecture specific optimizations
166 dnl ============================================
167     
169 dnl GCC with MMX support
170 dnl --------------------
172 if test "$ac_cv_prog_gcc" = yes; then
173     x86=0
174     changequote(,)dnl
175     case "$host_cpu" in
176         i[3456]86) x86=1
177         ;;
178     esac
179     changequote([,])dnl
181     if test $x86 = 1; then
182         AC_DEFINE(ASM_X86)
184         AC_CACHE_CHECK(whether gcc supports MMX(tm) inline asm,
185                        ac_cv_c_inline_mmx,
186                        [AC_TRY_COMPILE(,[asm ("movq %mm0, %mm1");],
187                        ac_cv_c_inline_mmx=yes,
188                        ac_cv_c_inline_mmx=no)])
190         if test "x$ac_cv_c_inline_mmx" = xyes; then
191                 AC_DEFINE(ASM_X86_MMX)
192         fi
193     fi
198 dnl gettext
199 dnl =======
202 dnl AM_GNU_GETTEXT
206 INTLIBS=""
208 AC_CHECK_FUNC(gettext, [HAVEGETTEXT="yes"], 
209         AC_CHECK_LIB(intl, gettext, [INTLIBS="-lintl" HAVEGETTEXT="yes"],
210                          INTLIBS="" ))
212 AC_CHECK_PROG(XGETTEXT, xgettext, xgettext)
214 if test "$XGETTEXT" != ""; then 
215     if $XGETTEXT --help 2>&1 | grep illegal >/dev/null ; then
216         echo "xgettext isn't GNU version"
217         XGETTEXT=""
218     fi
221 if test "$LINGUAS" != ""; then
222     if test "$XGETTEXT" != "" -a "$HAVEGETTEXT" != ""; then
223         AC_DEFINE(I18N)
224         PO=""
225 #       if test "$LINGUAS" = ""; then
226 #           ling=` (cd src/po; /bin/ls *.po) `
227 #           for l in $ling; do
228 #               lcode=`basename $l .po`
229 #               LINGUAS="$LINGUAS $lcode"
230 #           done
231 #       fi
232         echo "xgettext and gettext() exist; will build i18n support for $LINGUAS"
233     else
234         LINGUAS=""
235         PO=""
236         echo "xgettext and libintl.a don't both exist; will not build i18n support"
237     fi
238 else
239         INTLIBS=""
240         MOFILES=""
241         WPMOFILES=""
242         PO=""
246 dnl The Tower of Babel
247 dnl ==================
249 dnl List of supported locales
250 dnl -------------------------
251 supported_locales="cs de es fr gl it ja ko nl no pt ru se tr fi hr el pl ro da zh_TW.Big5 zh_CN sk"
252 supported_wprefs_locales="pt hr fr ko ja cs zh_TW.Big5 es zh_CN fi it ru de"
254 for lang in $LINGUAS; do
255         ok=0
256         for l in $supported_locales; do
257                 if test "$l" = "$lang"; then
258                         ok=1
259                         break
260                 fi
261         done
262         if test "$ok" = 1; then
263                 MOFILES="$MOFILES $lang.mo"
264         else
265                 echo "Locale $lang is not supported."
266         fi
267         ok=0
268         for l in $supported_wprefs_locales; do
269                 if test "$l" = "$lang"; then
270                         ok=1
271                         break
272                 fi
273         done
274         if test "$ok" = 1; then
275                 WPMOFILES="$WPMOFILES $lang.mo"
276         fi
277 done
280 dnl Kanji Characters support
281 dnl ========================
283 case $host_os in
284         freebsd*)
285                 AC_CHECK_LIB(xpg4, setlocale, [LIBS="$LIBS -lxpg4"]);;
286         *)
287         ;;
288 esac
292 dnl Added by Oliver - Support for NLSDIR option,   Hi Oliver!
293 dnl ===========================================
294 AC_ARG_WITH(nlsdir, 
295         [  --with-nlsdir=PATH      specify where the locale stuff should go ])
298 if test "x$NLSDIR" = "x"; then
299         if test "x$with_nlsdir" != "x"; then
300                 NLSDIR=$with_nlsdir
301         else
302                 NLSDIR='$(prefix)/lib/locale'
303         fi
308 AC_SUBST(DLLIBS)
309 AC_SUBST(INTLIBS)
310 AC_SUBST(NLSDIR)
311 AC_SUBST(MOFILES)
312 AC_SUBST(WPMOFILES)
313 AC_SUBST(supported_locales)
317 dnl Support for various hint things
318 dnl ===============================
321 AC_ARG_ENABLE(gnome,
322   [  --enable-gnome       enable stuff needed for GNOME ],
323   [if test x$enableval = xyes; then
324     AC_DEFINE(GNOME_STUFF)
325     gnome_on=yes
326   fi])
329 AC_ARG_ENABLE(kde,
330   [  --enable-kde                 enable support for KDE window manager (kwm) hints ],
331   [if test x$enableval = xyes; then
332     AC_DEFINE(KWM_HINTS)
333     kde_on=yes
334   fi])
337 AC_ARG_ENABLE(openlook,
338   [  --enable-openlook    enable support for OPEN LOOK(tm) (olwm) hints ],
339   [if test x$enableval = xyes; then
340     AC_DEFINE(OLWM_HINTS)
341     openlook_on=yes
342   fi])
346 dnl Disable some stuff that are duplicated in kde
347 dnl ---------------------------------------------
348 AC_ARG_ENABLE(lite,
349   [  --enable-lite                disable some stuff (dont use it) ],
350   [if test x$enableval = xyes; then
351         LITE=yes
352         AC_DEFINE(LITE)
353         AC_SUBST(LITE)
354   fi])
359 dnl Networking stuff
362 NETLIBS=""
364 AC_CHECK_FUNC(connect,,
365         AC_CHECK_LIB(socket, connect, NETLIBS="$NETLIBS -lsocket"))
367 AC_CHECK_FUNC(gethostbyname,,
368         AC_CHECK_LIB(nsl, gethostbyname, NETLIBS="$NETLIBS -lnsl"))
370 AC_CHECK_FUNC(inet_aton, AC_DEFINE(HAVE_INET_ATON),
371      for lib in resolv socket inet bsd; do
372         AC_CHECK_LIB($lib, inet_aton, [AC_DEFINE(HAVE_INET_ATON)
373                      NETLIBS="$NETLIBS -l$lib"; break],, $NETLIBS)
374      done)
376 AC_SUBST(NETLIBS)
379 dnl ===========================================
380 dnl             Stuff that uses X
381 dnl ===========================================
383 AC_PATH_XTRA
385 if test $no_x; then
386     AC_MSG_ERROR([The path for the X11 files not found!
387 Make sure you have X and it's headers and libraries (the -devel packages
388 in Linux) installed.])
391 X_LIBRARY_PATH=$x_libraries
393 XCFLAGS="$X_CFLAGS"
395 XLFLAGS="$X_LIBS"
397 XLIBS="-lX11 $X_EXTRA_LIBS"
400 lib_search_path="$lib_search_path $XLFLAGS"
401 inc_search_path="$inc_search_path $XCFLAGS"
404 AC_SUBST(X_LIBRARY_PATH)
408 dnl Decide which locale function to use, setlocale() or _Xsetlocale()
409 dnl by MANOME Tomonori 
410 dnl ===========================================
411 use_locale=yes
412 AC_ARG_ENABLE(locale, 
413 [  --disable-locale       disable use of X locale support],
414                 use_locale=no)
416 if test "$use_locale" = yes; then
417   AC_CHECK_LIB(X11, _Xsetlocale, AC_DEFINE(X_LOCALE),, $XLFLAGS $XLIBS)
421 dnl XKB keyboard language status
422 dnl ============================
423 AC_ARG_ENABLE(modelock,
424 [  --enable-modelock      XKB keyboard language status support],
425                 AC_DEFINE(XKB_MODELOCK))
429 dnl Shape support
430 dnl =============
431 shape=yes
432 AC_ARG_ENABLE(shape, 
433 [  --disable-shape        disable shaped window extension support],
434                 shape=$enableval, shape=yes)
436 added_xext=no
438 if test "$shape" = yes; then
439         AC_CHECK_LIB(Xext, XShapeSelectInput, [XLIBS="-lXext $XLIBS"
440                 added_xext=yes
441                 AC_DEFINE(SHAPE)], shape=no, $XLFLAGS $XLIBS)
446 dnl XINERAMA support
447 dnl ================
448 xinerama=yes
449 AC_ARG_ENABLE(xinerama, 
450 [  --disable-xinerama     disable XInerama extension support],
451                 xinerama=$enableval, xinerama=yes)
453 if test "$xinerama" = yes; then
454         AC_CHECK_LIB(Xext, X, [XLIBS="-lXext $XLIBS"
455                 added_xext=yes
456                 AC_DEFINE(XINERAMA)], xinerama=no, $XLFLAGS $XLIBS)
461 dnl MIT-SHM support
462 dnl ===============
463 shm=yes
464 AC_ARG_ENABLE(shm,
465 [  --disable-shm           disable usage of MIT-SHM extension],
466                 shm=$enableval, shm=yes)
468 if test "$shm" = yes; then
469         AC_CHECK_LIB(Xext, XShmAttach, ok=yes, ok=no, $XLFLAGS $XLIBS)
471         if test "$ok" = yes; then
472         AC_CHECK_FUNC(shmget, ok=yes, ok=no)
473         fi
475         if test "$ok" = yes; then
476                 if test "$added_xext" = no; then
477                         XLIBS="-lXext $XLIBS"
478                 fi
479                 AC_DEFINE(XSHM)
480         fi
484 dnl R6 Style Session Management Support
485 dnl ===================================
489 #AC_DEFINE(R6SM)
490 #AC_SUBST(XSMPLIBS)
494 dnl Check for libPropList
495 dnl =====================
497 LIBPL=""
499 WM_CHECK_LIB(PropList, PLGetString, $X_EXTRA_LIBS)
500 if test "x$ac_cv_lib_PropList_PLGetString" = xyes; then
501     WM_CHECK_HEADER(proplist.h)
502     if test "x$ac_cv_header_proplist_h" = xyes; then
503         LIBPL="-lPropList"
504     fi
507 if test "x$LIBPL" = "x"; then
508    echo
509    echo "ERROR!!! libPropList is not installed, or could not be found."
510    echo "         Window Maker requires libPropList to build."
511    echo "         Please read INSTALL to find where you can find libPropList,"
512    echo "         and install it first."
513    if test x$host_os = xlinux; then
514    echo "         If you're using some prepackaged version of libPropList,"
515    echo "         make sure you install it's \"development\" package as well."
516    fi
517    echo "         If you already have it installed, try using the"
518    if test "x$ac_cv_lib_PropList_PLGetString" != xyes; then
519    echo "         --with-libs-from flag to tell configure where the library"
520    echo "         is installed and"
521    fi
522    echo "         --with-incs-from flag to tell configure where the header"
523    echo "         files are installed"
524    exit 1
527 WM_CHECK_PROPLIST_VERSION(0.9.5, goodlPL=yes, goodlPL=no)
529 if test "$goodlPL" = no; then
530    echo
531    echo "ERROR!!! libPropList is an old version. Please consider upgrading"
532    echo "         to at least version 0.9.5. Older versions have bugs that"
533    echo "         may cause Window Maker to crash randomly."
534    echo "         If your libPropList is older than 0.9.2 it will also prevent"
535    echo "         Window Maker from compiling because new functions were"
536    echo "         introduced since that version."
537    echo "         Please read INSTALL to find where you can find libPropList,"
538    echo "         and upgrade it before you proceed."
539    exit 1
542 AC_SUBST(LIBPL)
545 dnl ==============================================
546 dnl         Graphic Format Libraries
547 dnl ==============================================
553 dnl XPM Support
554 dnl ===========
555 xpm=yes
556 AC_ARG_ENABLE(xpm, 
557 [  --disable-xpm                  disable use of XPM pixmaps through libXpm],
558         xpm=$enableval, xpm=yes)
560 if test "$xpm" = yes; then
561     WM_CHECK_LIB(Xpm, XpmCreatePixmapFromData, [$XLFLAGS $XLIBS])
563     if test "x$ac_cv_lib_Xpm_XpmCreatePixmapFromData" = xyes; then
564         WM_CHECK_HEADER(X11/xpm.h)
565         if test "x$ac_cv_header_X11_xpm_h" = xyes; then
566                 GFXLIBS="$GFXLIBS -lXpm"
567                 supported_gfx="XPM"
568                 AC_DEFINE(USE_XPM)
569         else
570                 supported_gfx="builtin-XPM"
571         fi
572     fi
575 # for wmlib
576 AC_SUBST(XCFLAGS)
577 # for test
578 AC_SUBST(XLFLAGS)
579 AC_SUBST(XLIBS)
581 AC_SUBST(X_EXTRA_LIBS)
583 dnl ===============================================
584 dnl             End of stuff that uses X
585 dnl ===============================================
588 dnl PNG Support
589 dnl ===========
590 png=yes
591 AC_ARG_ENABLE(png, 
592 [  --disable-png                  disable PNG support through libpng],
593         png=$enableval, png=yes, png=no)
596 if test "$png" = yes ; then
597     WM_CHECK_LIB(png, png_get_valid, [-lz -lm])
599     if test "x$ac_cv_lib_png_png_get_valid" = xyes; then
600         WM_CHECK_HEADER(png.h)
601         if test "x$ac_cv_header_png_h" = xyes; then
602             GFXLIBS="$GFXLIBS -lpng -lz" 
603             supported_gfx="$supported_gfx PNG"
604             AC_DEFINE(USE_PNG)
605         fi
606     fi
610 dnl JPEG Support
611 dnl ============
612 jpeg=yes
613 ljpeg=""
614 AC_ARG_ENABLE(jpeg,
615 [  --disable-jpeg         disable JPEG support through libjpeg],
616         jpeg=$enableval, jpeg=yes, jpeg=no)
618 if test "$jpeg" = yes; then
619     WM_CHECK_LIB(jpeg, jpeg_destroy_compress)
621     if test "x$ac_cv_lib_jpeg_jpeg_destroy_compress" = xyes; then
623         ljpeg="-ljpeg"
625         WM_CHECK_HEADER(jpeglib.h)
626         if test "x$ac_cv_header_jpeglib_h" = xyes; then
627             GFXLIBS="$GFXLIBS -ljpeg"
628             supported_gfx="$supported_gfx JPEG"
629             AC_DEFINE(USE_JPEG)
630         fi
631     fi
635 dnl GIF Support
636 dnl ============
637 gif=yes
638 AC_ARG_ENABLE(gif,
639 [  --disable-gif           disable GIF support through libgif or libungif],
640         gif=$enableval, gif=yes, gif=no)
642 if test "$gif" = yes; then
643     my_libname=""
644     WM_CHECK_LIB(ungif, DGifOpenFileName, [$XLFLAGS $XLIBS])
645     if test "x$ac_cv_lib_ungif_DGifOpenFileName" = xyes; then
646         my_libname=-lungif
647     fi
649 dnl libungif is the same thing as libgif for all practical purposes.
651     if test "x$my_libname" = x; then
652         WM_CHECK_LIB(gif, DGifOpenFileName, [$XLFLAGS $XLIBS])
653         if test "x$ac_cv_lib_gif_DGifOpenFileName" = xyes; then
654             my_libname=-lgif
655         fi
656     fi
658     if test "$my_libname" != x; then
659         WM_CHECK_HEADER(gif_lib.h)
660         if test "x$ac_cv_header_gif_lib_h" = xyes; then
661             GFXLIBS="$GFXLIBS $my_libname"
662             supported_gfx="$supported_gfx GIF"
663             AC_DEFINE(USE_GIF)
664         fi
665     fi
670 dnl TIFF Support
671 dnl ============
672 AC_ARG_ENABLE(tiff, 
673 [  --disable-tiff         disable use of TIFF images through libtiff],
674         tif=$enableval, tif=yes, tif=no)
677 # TIFF can optionally have JPEG and/or zlib support. Must find out
678 # when they are supported so that correct library flags are passed during
679 # detection and linkage
682 # By default use xpm icons if tiff is not found.
683 ICONEXT="xpm"
686 if test "$tif" = yes; then
687     my_libname=""
688     WM_CHECK_LIB(tiff, TIFFGetVersion, [-lm])
689     if test "x$ac_cv_lib_tiff_TIFFGetVersion" = xyes; then
690         my_libname="-ltiff"
691     fi
693 dnl Retry with zlib
695     unset ac_cv_lib_tiff_TIFFGetVersion
696     if test "x$my_libname" = x; then
697         WM_CHECK_LIB(tiff, TIFFGetVersion, [$ljpeg -lz -lm])
698         if test "x$ac_cv_lib_tiff_TIFFGetVersion" = xyes; then
699             my_libname="-ltiff -lz"
700         fi
701     fi
703     if test "x$my_libname" = x; then
704         WM_CHECK_LIB(tiff34, TIFFGetVersion, [$ljpeg -lm])
705         if test "x$ac_cv_lib_tiff34_TIFFGetVersion" = xyes; then
706             my_libname="-ltiff34"
707         fi
708     fi
711     if test "x$my_libname" != x; then
712         WM_CHECK_HEADER(tiffio.h)
713         if test "x$ac_cv_header_tiffio_h" = xyes; then
714             GFXLIBS="$my_libname $GFXLIBS"
715             ICONEXT="tiff"
716             supported_gfx="$supported_gfx TIFF"
717             AC_DEFINE(USE_TIFF)     
718         fi
719     fi
722 LIBRARY_SEARCH_PATH="$lib_search_path"
723 HEADER_SEARCH_PATH="$inc_search_path"
725 AC_SUBST(LIBRARY_SEARCH_PATH)
726 AC_SUBST(HEADER_SEARCH_PATH)
729 AC_SUBST(GFXLIBS)
730 AC_SUBST(ICONEXT)
733 dnl ==============================================
734 dnl         End of Graphic Format Libraries
735 dnl ==============================================
738 dnl Debugging setup
739 dnl ===============
740 AC_ARG_ENABLE(debug, 
741 [  --enable-debug         enable debugging ],, enable_debug=no)
743 if test "$enable_debug" = yes; then
744     DFLAGS="-g -DDEBUG"
745 #       Efence makes things too slow. Add it by hand in the Makefiles
746 #       if it is really needed.
747 #    AC_CHECK_LIB(efence, malloc, LIBS="$LIBS -lefence")
748 else
749     DFLAGS="-DWITHOUT_NANA"
751 AC_SUBST(DFLAGS)
754 dnl Sound support - Dan
755 dnl =============================================
756 sound=yes
757 AC_ARG_ENABLE(sound, 
758 [  --disable-sound        disable sound support ],
759                 sound=$enableval, sound=yes)
760 if test "$sound" = yes; then    
761         AC_DEFINE(WMSOUND)
765 # AC_PREFIX_PROGRAM(wmaker)
767 dnl Support for PIXMAPDIR option
768 dnl ============================
769 AC_ARG_WITH(pixmapdir,
770 [  --with-pixmapdir=PATH   specify where pixmaps are located [DATADIR/pixmaps]])
772 if test "x$with_pixmapdir" != "x"; then
773         pixmapdir=$with_pixmapdir
774 else
775         pixmapdir=`eval echo ${datadir}/pixmaps`
778 AC_DEFINE_UNQUOTED(PIXMAPDIR, "$pixmapdir")
780 pkgdatadir=`eval echo $datadir`
781 AC_DEFINE_UNQUOTED(PKGDATADIR, "$pkgdatadir/WindowMaker")
783 _sysconfdir=`eval echo $sysconfdir`
784 AC_DEFINE_UNQUOTED(SYSCONFDIR, "$_sysconfdir")
787 dnl Support for GNUSTEP_LOCAL_ROOT, for WPrefs.app
788 dnl ==============================================
790 appspath=""
792 AC_ARG_WITH(appspath,
793 [  --with-appspath=PATH    specify the directory for GNUstep applications], appspath=$withval )
795 if test "x$appspath" = "x"; then
796     gnustepdir='$(prefix)/GNUstep'
798     if test "x$GNUSTEP_LOCAL_ROOT" != "x" ; then
799         gnustepdir=`echo "$GNUSTEP_LOCAL_ROOT" | sed -e "s|^${prefix}|prefix|"`
800         gnustepdir=`echo $gnustepdir | sed -e 's|^prefix|${prefix}|'`
801     fi
803     with_appspath=$gnustepdir/Apps
806 wprefsdir=$with_appspath/WPrefs.app
808 AC_SUBST(wprefsdir)
812 dnl Enable single appicon per wm instance+class combo -cls
813 dnl =====================================================
814 AC_ARG_ENABLE(single-icon,
815 [  --enable-single-icon    use single application icon per WM_INSTANCE+WM_CLASS
817 if test "$enableval" = yes; then
818         AC_DEFINE(REDUCE_APPICONS)
822 dnl Enable User Defined Menu thing
823 dnl ==================================
824 AC_ARG_ENABLE(usermenu,
825 [  --enable-usermenu       user defined menus for applications
827 if test "$enableval" = yes; then
828         AC_DEFINE(USER_MENU)
834 dnl Nicolai:  Program tests for Documentation Section
835 dnl =================================================
836 dnl DOCTYPES=""
837 dnl AC_CHECK_PROG(MAKEINFO, makeinfo, makeinfo, ,$PATH)
838 dnl if test "x$MAKEINFO" != "x" ; then
839 dnl       DOCTYPES="$DOCTYPES info_doc"
840 dnl fi
841 dnl AC_CHECK_PROG(TEX, tex, tex, ,$PATH)
842 dnl if test "x$TEX" != "x" ; then
843 dnl       DOCTYPES="$DOCTYPES dvi_doc"
844 dnl fi
845 dnl AC_CHECK_PROG(DVIPS, dvips, dvips, ,$PATH)
846 dnl if test "x$DVIPS" != "x" ; then
847 dnl       DOCTYPES="$DOCTYPES ps_doc"
848 dnl fi
849 dnl AC_CHECK_PROG(PERL, perl, perl, ,$PATH)
850 dnl if test "x$PERL" != "x" ; then
851 dnl       DOCTYPES="$DOCTYPES html_doc"
852 dnl fi
853 dnl AC_PATH_PROG(PERL_PATH, perl, perl, ,$PATH)
854 dnl AC_CHECK_PROG(TEXI2HTML, texi2html, texi2html, ,$PATH)
855   
856 dnl AC_SUBST(DOCTYPES)
858 AC_OUTPUT(Makefile po/Makefile util/Makefile test/Makefile wmlib/Makefile \
859         WINGs/Makefile WINGs/Resources/Makefile src/Makefile src/wconfig.h \
860         wrlib/Makefile doc/Makefile WindowMaker/Makefile contrib/Makefile \
861         WindowMaker/Backgrounds/Makefile WindowMaker/Defaults/Makefile \
862         WindowMaker/IconSets/Makefile WindowMaker/Icons/Makefile \
863         WindowMaker/Pixmaps/Makefile WindowMaker/Styles/Makefile \
864         WindowMaker/Themes/Makefile \
865         WPrefs.app/Makefile WPrefs.app/tiff/Makefile WPrefs.app/xpm/Makefile \
866         WPrefs.app/po/Makefile contrib/WindowMaker.spec )
871 dnl Output some helpful data for compiling wraster and WINGs/WUtil apps
872 dnl ===================================================================
875 dnl echo "WFLAGS=\"$LIBPL_INC_PATH -I$prefix/include\"" > WINGs-flags
876 dnl echo "WLIBS=\"-L$exec_prefix/lib -lWINGs -lwraster $LIBPL_LIBS $GFXLIBS -lm\""\
877 dnl     | sed -e 's|\$(prefix)|'"$prefix|" >> WINGs-flags
879 dnl The #lp# and #rp# stuff below is a hack because [ and ] get lost when
880 dnl parsed by m4
882 cat <<EOF >get-wraster-flags
883 #!/bin/sh
885 prefix="$prefix"
886 exec_prefix=\$prefix
888 WCFLAGS="-I\$prefix/include $inc_search_path"
889 WLFLAGS="-L\$exec_prefix/lib $lib_search_path"
890 WLIBS="-lwraster $GFXLIBS $XLIBS -lm"
892 usage="Usage: get-wraster-flags #lp#--cflags#rp# #lp#--ldflags#rp# #lp#--libs#rp#"
894 if test \$# -eq 0; then
895       echo "\${usage}" 1>&2
896       exit 1
899 while test \$# -gt 0; do
900   case \$1 in
901     --cflags)
902         echo \$WCFLAGS
903         ;;
904     --ldflags|--lflags)
905         echo \$WLFLAGS
906         ;;
907     --libs)
908         echo \$WLIBS
909         ;;
910     *)
911         echo "\${usage}" 1>&2
912         exit 1
913         ;;
914   esac
915   shift
916 done
921 cat <<EOF >get-wings-flags
922 #!/bin/sh
924 prefix="$prefix"
925 exec_prefix=\$prefix
927 WCFLAGS="-I\$prefix/include $inc_search_path"
928 WLFLAGS="-L\$exec_prefix/lib $lib_search_path"
929 WLIBS="-lWINGs -lwraster $GFXLIBS $XLIBS -lm $NETLIBS -lPropList"
931 usage="Usage: get-wings-flags #lp#--cflags#rp# #lp#--ldflags#rp# #lp#--libs#rp#"
933 if test \$# -eq 0; then
934       echo "\${usage}" 1>&2
935       exit 1
938 while test \$# -gt 0; do
939   case \$1 in
940     --cflags)
941         echo \$WCFLAGS
942         ;;
943     --ldflags|--lflags)
944         echo \$WLFLAGS
945         ;;
946     --libs)
947         echo \$WLIBS
948         ;;
949     *)
950         echo "\${usage}" 1>&2
951         exit 1
952         ;;
953   esac
954   shift
955 done
960 cat <<EOF >get-wutil-flags
961 #!/bin/sh
963 prefix="$prefix"
964 exec_prefix=\$prefix
966 WCFLAGS="-I\$prefix/include $inc_search_path"
967 WLFLAGS="-L\$exec_prefix/lib $lib_search_path"
968 WLIBS="-lWUtil $NETLIBS -lPropList"
970 usage="Usage: get-wutil-flags #lp#--cflags#rp# #lp#--ldflags#rp# #lp#--libs#rp#"
972 if test \$# -eq 0; then
973       echo "\${usage}" 1>&2
974       exit 1
977 while test \$# -gt 0; do
978   case \$1 in
979     --cflags)
980         echo \$WCFLAGS
981         ;;
982     --ldflags|--lflags)
983         echo \$WLFLAGS
984         ;;
985     --libs)
986         echo \$WLIBS
987         ;;
988     *)
989         echo "\${usage}" 1>&2
990         exit 1
991         ;;
992   esac
993   shift
994 done
999 sed 's/#lp#/[/g' get-wraster-flags | sed 's/#rp#/]/g' > wrlib/get-wraster-flags
1000 sed 's/#lp#/[/g' get-wings-flags | sed 's/#rp#/]/g' > WINGs/get-wings-flags
1001 sed 's/#lp#/[/g' get-wutil-flags | sed 's/#rp#/]/g' > WINGs/get-wutil-flags
1003 chmod 755 wrlib/get-wraster-flags WINGs/get-wings-flags WINGs/get-wutil-flags
1005 rm -f get-wraster-flags get-wings-flags get-wutil-flags
1009 dnl Spit out the configuration
1010 dnl ==========================
1012 supported_gfx="$supported_gfx builtin-PPM"
1014 if test "x$MOFILES" = "x"; then
1015         mof=none
1016 else
1017         mof=$MOFILES
1021 echo
1022 echo "Window Maker was configured as follows:"
1023 echo
1024 echo "Installation path prefix: $prefix"
1025 echo "Installation path prefix for binaries: $_bindir"
1026 echo "Installation path for WPrefs.app: $wprefsdir" | sed -e 's|\$(prefix)|'"$prefix|"
1027 echo "Graphic format libraries: $supported_gfx"
1028 echo "Sound support: $sound"
1029 echo "Translated message files to install: $mof"
1030 if test "x$MOFILES" != "x"; then
1031         echo "Installation path of translated messages: $NLSDIR" | sed -e 's|\$(prefix)|'"$prefix|"
1034 dnl WM_PRINT_REDCRAP_BUG_STATUS
1036 if test "x$ac_cv_header_jpeglib_h" != xyes; then
1037 echo "WARNING   WARNING   WARNING   WARNING   WARNING   WARNING   WARNING"
1038 echo
1039 echo "JPEG support will not be included because the JPEG library is"
1040 echo "not installed correctly or was not found. Background images"
1041 echo "from themes will not display as they usually are JPEG files."
1042 echo
1043 echo "To fix, download and install the jpeg library and/or make sure you"
1044 echo "installed all jpeg related packages, SPECIALLY the development packages"
1045 echo "like jpeg-devel (if you use some prepackaged version of libjpeg)."
1046 echo
1047 echo "WARNING   WARNING   WARNING   WARNING   WARNING   WARNING   WARNING"
1051 dnl This is for Emacs.  I'm lazy, I know... (nicolai)
1052 dnl ================================================
1053 dnl Local Variables:
1054 dnl compile-command: "autoconf"
1055 dnl End: