home *** CD-ROM | disk | FTP | other *** search
/ Dream 52 / Amiga_Dream_52.iso / Linux / Divers / xgalaga-2_0_tar.gz / xgalaga-2_0_tar / xgalaga-2.0 / configure.in < prev    next >
Text File  |  1998-04-12  |  3KB  |  118 lines

  1. dnl Process this file with autoconf to produce a configure script.
  2. AC_INIT(data.h)
  3. AC_CONFIG_HEADER(config.h) 
  4. AC_PREFIX_DEFAULT(/usr/lib/xgalaga)
  5.  
  6. test "$prefix" = NONE && prefix=/usr/lib/xgalaga
  7. test "$exec_prefix" = NONE && exec_prefix=/usr/X11/bin
  8.  
  9. AC_CANONICAL_HOST
  10.  
  11. dnl Checks for programs.
  12. AC_PROG_CC
  13. AC_PROG_CPP
  14. AC_PROG_INSTALL
  15. AC_PROG_LN_S
  16. AC_PROG_MAKE_SET
  17. AC_PROG_RANLIB
  18.  
  19. AC_ARG_WITH(xpm-lib,[  --with-xpm-lib          Directory containing libXpm (may be autodetected)],xpm_lib=$withval)
  20. AC_ARG_WITH(sound,  [  --with-sound            Type of sound to use (native or nas)],sound_type=$withval)
  21.  
  22. AC_PATH_XTRA
  23. if test -n "$no_x"; then
  24.   AC_MSG_ERROR([Can't find X, you need X!])
  25. else
  26.   INCS="$INCS -I$x_includes"
  27.   LIBS="-L$x_libraries"
  28.  
  29.   if test -n "$xpm_lib"; then
  30.     LIBS="$LIBS -L$xpm_lib"
  31.   fi
  32. fi
  33.  
  34. if test -n "$sound-type"; then
  35.   case $host_alias in
  36.     *linux*) 
  37.     sound_type=native
  38.     ;;
  39.     *freebsd*)
  40.         sound_type=native
  41.     ;;
  42.     *sunos*)
  43.         sound_type=native
  44.         ;;
  45.     *solaris*)
  46.         sound_type=native
  47.         ;;
  48.     *)
  49.         sound_type=none
  50.         ;;
  51.   esac
  52. fi
  53.  
  54. case $sound_type in
  55.   native)
  56.     case $host_alias in
  57.       *linux*)
  58.         SOUNDSERVER=xgal.sndsrv.linux
  59.     AC_DEFINE(SOUNDDEV,"/dev/dsp")
  60.     AC_DEFINE(SOUND)
  61.     ;;
  62.       *freebsd*)
  63.         SOUNDSERVER=xgal.sndsrv.freebsd
  64.     AC_DEFINE(SOUNDDEV,"/dev/dsp")
  65.     AC_DEFINE(SOUND)
  66.     ;;
  67.       *sunos*)
  68.         SOUNDSERVER=xgal.sndsrv.sun.c
  69.     AC_DEFINE(SOUNDDEV,"/dev/audio")
  70.     AC_DEFINE(SOUND)
  71.     ;;
  72.       *solaris*)
  73.         SOUNDSERVER=xgal.sndsrv.sun.c
  74.     AC_DEFINE(SOUNDDEV,"/dev/audio")
  75.     AC_DEFINE(SOUND)
  76.     ;;
  77.       *)
  78.         AC_MSG_WARN(Native sound selected, but not supported for $host_alias)
  79.     ;;
  80.     esac
  81.     ;;
  82.   nas)
  83.     AC_DEFINE(SOUND)
  84.     AC_DEFINE(NAS_SOUND)
  85.     ;;
  86.   *)
  87.     ;;
  88. esac
  89.  
  90. AC_SUBST(SOUNDSERVER)
  91.  
  92. AC_DEFINE_UNQUOTED(SCOREFILE,"$prefix/scores")
  93. AC_DEFINE_UNQUOTED(SOUNDDIR,"$prefix/sounds/")
  94. AC_DEFINE(IMAGEDIR,"images")
  95. AC_DEFINE_UNQUOTED(LEVELDIR,"$prefix/levels/")
  96.  
  97. AC_CHECK_LIB(X11, main, LIBS="$LIBS -lX11")
  98. AC_CHECK_LIB(Xmu, main, LIBS="$LIBS -lXmu",,-lX11)
  99. AC_CHECK_LIB(Xt, main, LIBS="$LIBS -lXt",,-lX11)
  100. AC_CHECK_LIB(Xext, main, LIBS="$LIBS -lXext",,-lX11)
  101. AC_CHECK_LIB(XExExt, main, LIBS="$LIBS -lXExExt",,-lX11)
  102. AC_CHECK_LIB(Xpm, main, LIBS="$LIBS -lXpm",AC_MSG_ERROR(libXpm can't be found.  Get it from ftp://ftp.x.org/contrib/libraries or specify the location with --with-xpm-lib=DIR.),-lX11)
  103.  
  104. dnl Checks for header files.
  105. AC_HEADER_STDC
  106. AC_CHECK_HEADERS(fcntl.h malloc.h strings.h sys/ioctl.h sys/time.h unistd.h)
  107.  
  108. dnl Checks for typedefs, structures, and compiler characteristics.
  109. AC_C_CONST
  110. AC_HEADER_TIME
  111.  
  112. dnl Checks for library functions.
  113. AC_PROG_GCC_TRADITIONAL
  114. AC_TYPE_SIGNAL
  115. AC_CHECK_FUNCS(gettimeofday select random lrand48)
  116.  
  117. AC_OUTPUT(Makefile libsprite/Makefile)
  118.