1 dnl Copyright © 2022 Nick Bowler
3 dnl License WTFPL2: Do What The Fuck You Want To Public License, version 2.
4 dnl This is free software: you are free to do what the fuck you want to.
5 dnl There is NO WARRANTY, to the extent permitted by law.
7 AC_INIT([rrace], [0], [nbowler@draconx.ca])
8 AC_CONFIG_HEADERS([config.h])
10 AM_INIT_AUTOMAKE([-Wall -Wno-portability foreign subdir-objects])
11 AM_SILENT_RULES([yes])
18 AS_IF([test x"$no_x" != x"yes"],
19 [AC_CACHE_CHECK([for Motif], [dx_cv_have_motif],
20 [save_CFLAGS=$CFLAGS save_LIBS=$LIBS
21 dx_cv_motif_cflags="$X_CFLAGS"
22 dx_cv_motif_libs="$X_LIBS $X_PRE_LIBS -lXm -lXt -lX11 $X_EXTRA_LIBS"
23 CFLAGS="$dx_cv_motif_cflags $CFLAGS"
24 LIBS="$dx_cv_motif_libs $LIBS"
25 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <Xm/XmAll.h>],
26 [XmCreateMainWindow(0, 0, 0, 0); XtAppSetExitFlag(0)])],
27 [dx_cv_have_motif=yes], [dx_cv_have_motif=no])
28 CFLAGS=$save_CFLAGS LIBS=$save_LIBS])])
30 AS_IF([test x"$with_x" = x"yes" && test "$dx_cv_have_motif" != x"yes"],
31 [AC_MSG_FAILURE([--with-x requested but Motif was not found])])
33 AC_SUBST([MOTIF_CFLAGS], [@&t@])
34 AC_SUBST([MOTIF_LIBS], [@&t@])
35 AS_IF([test x"$dx_cv_have_motif" = x"yes"],
36 [MOTIF_CFLAGS=$dx_cv_motif_cflags MOTIF_LIBS=$dx_cv_motif_libs])
38 AC_CONFIG_TESTDIR([.], [t:.])
40 AM_CONDITIONAL([HAVE_AUTOTEST], [test x"$dx_cv_autotest_works" = x"yes"])
42 AC_CONFIG_FILES([Makefile])