📄 configure.in
字号:
dnl Process this file with autoconf to produce a configure script.AC_INIT(README)AM_INIT_AUTOMAKE(cheetah, 0.05mt)AM_CONFIG_HEADER(config.h)dnl Check for compilers. We set CFLAGS and CXXFLAGS to null if unset, sodnl that these macros won't set them to default values that we don't want.if test "x${CFLAGS-notset}" = "xnotset" ; then export CFLAGS CFLAGS=""fiAC_PROG_CCdnl Checks for programs.AC_PROG_MAKE_SETAC_C_INLINEAC_PROG_INSTALLdnl Checks for header files.AC_HEADER_STDCdnl Check for functionsAC_CHECK_FUNCS(snprintf strdup)dnl -------------------------------------------------------------------------dnl General optionsdnl -------------------------------------------------------------------------CFLAGS="$CFLAGS -O2 -Wall"AC_ARG_ENABLE(debug, [ --enable-debug Produce an executable with debugging symbols], [CFLAGS="$CFLAGS -g -D_DEBUG"])dnl ---------------------------------------------------------------------------dnl GTK Stuffdnl ---------------------------------------------------------------------------dnl AM_PATH_GTK(1.2.0,,exit 1, gthread)AC_PATH_PROG(gtkconfigbsd,gtk12-config,no)if test x$gtkconfigbsd = xno; then AM_PATH_GTK(1.2.0, , exit 1, gtk gthread) CFLAGS="$CFLAGS $GTK_CFLAGS" LIBS="$LIBS $GTK_LIBS"else BSD_GTK_CFLAGS=`$gtkconfigbsd --cflags gtk gthread` BSD_GTK_LIBS=`$gtkconfigbsd --libs gtk gthread` CFLAGS="$CFLAGS $BSD_GTK_CFLAGS" LIBS="$LIBS $BSD_GTK_LIBS"fidnl ---------------------------------------------------------------------------dnl pthreads (POSIX threads)dnl platforms test: Mandrake 8.0, Slackware 7.0, FreeBSD 4.2dnl ---------------------------------------------------------------------------THREAD1=0THREAD2=0THREAD3=0THREAD4=0AC_HEADER_CHECK(pthread.h,THREAD1=1)AC_CHECK_LIB(pthread,pthread_create,THREAD2=1)AC_CHECK_LIB(pthread,pthread_setcancelstate,THREAD3=1)AC_CHECK_LIB(pthread,pthread_setcanceltype,THREAD4=1)if test x$THREAD1$THREAD2 = x11; then LIBS="$LIBS -lpthread"else AC_CHECK_LIB(c_r, pthread_create, THREAD2=1) if test x$THREAD2 = x1; then LIBS="$LIBS -lc_r" CFLAGS="$CFLAGS -pthread" AC_CHECK_LIB(c_r, pthread_setcancelstate, THREAD3=1) AC_CHECK_LIB(c_r, pthread_setcanceltype, THREAD4=1) else echo "*** You must have pthreads support (glibc2.x for Linux, libc_r for" echo "*** FreeBSD) to compile and run Cheetah." exit 0 fifidnl FreeBSD's implementation used to be flakky about theseif test x$THREAD3$THREAD4 = x11; then AC_DEFINE(HAVE_PTHREADS_CANCEL_FLAGS)fidnl ---------------------------------------------------------------------------dnl libpng Stuffdnl ---------------------------------------------------------------------------AC_CHECK_LIB(png, png_read_info, have_libpng=yes, have_libpng=no)if test x$have_lib_png = xno; then echo "*** You require libpng to compile and run" echo "*** RockBlast. You can obtain libpng at" echo "*** http://www.libpng.org/pub/png. See INSTALL file" echo "*** for more details" exit 0fiLIBS="$LIBS -lpng"dnl ---------------------------------------------------------------------------dnl libungif Stuffdnl ---------------------------------------------------------------------------AC_CHECK_LIB(gif, DGifOpenFileHandle, have_libgif=yes, have_libgif=no)if test x$have_libgif = xyes; then LIBS="$LIBS -lgif"else AC_CHECK_LIB(ungif, DGifOpenFileHandle, have_libungif=yes, have_libungif=no) if test x$have_libungif = xyes; then LIBS="$LIBS -lungif" else echo "*** You require libungif to compile and run" echo "*** Cheetah. You can obtain libungif at" echo "*** http://http://prtr-13.ucsc.edu/~badger/software/libungif/." echo "*** See INSTALL file for more details" exit 0 fifidnl ---------------------------------------------------------------------------dnl libjpeg Stuffdnl ---------------------------------------------------------------------------AC_CHECK_LIB(jpeg, jpeg_stdio_src, have_libjpeg=yes, have_libjpeg=no)if test x$have_libjpeg = xno; then echo "*** You require libjpeg to compile and run" echo "*** Cheetah. You can obtain libjpeg at" echo "*** http://www.ijg.org/. See INSTALL file" echo "*** for more details" exit 0fiLIBS="$LIBS -ljpeg"AC_OUTPUT(Makefile src/Makefile utils/Makefile tests/Makefile)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -