[BACK]Return to configure.ac CVS log [TXT][DIR] Up to [contributed] / dgamelaunch-openbsd

Annotation of dgamelaunch-openbsd/configure.ac, Revision 1.1.1.1

1.1       rubenllo    1: dnl Use autoconf 2.53
                      2: dnl (Things tend to break across versions, they're neither upwards nor
                      3: dnl downward compatible. Blame GNU.)
                      4:
                      5: AC_INIT(dgamelaunch, [1.5.1])
                      6: AC_PREREQ(2.53)
                      7:
                      8: AC_CONFIG_HEADER(config.h)
                      9:
                     10: AC_PROG_CC(cc gcc)
                     11: AC_STDC_HEADERS
                     12:
                     13: AC_PROG_LEX
                     14: if test -z "$LEX"; then
                     15:    AC_MSG_ERROR([lex or flex not found.])
                     16: fi
                     17:
                     18: LEXLIBS="$LEXLIB"
                     19:
                     20: AC_CHECK_LIB(pthread, pthread_create, [], [AC_MSG_ERROR([need pthreads])])
                     21:
                     22: AC_CHECK_PROGS(YACC, 'bison -y' byacc yacc)
                     23: if test -z "$YACC"; then
                     24:    AC_MSG_ERROR([bison or yacc not found.])
                     25: fi
                     26:
                     27: case "$(uname -s)" in
                     28:   Linux | *BSD)
                     29:     MY_LIBS="$MY_LIBS -lutil -lcrypt"
                     30:     AC_DEFINE(NOSTREAMS, 1, [Don't use SVR4 streams support in ttyrec.])
                     31:   ;;
                     32: esac
                     33:
                     34: AC_MSG_CHECKING([for Solaris cc])
                     35: case "`$CC -V 2>&1`" in
                     36:   *Sun*WorkShop* | *Forte*Developer*)
                     37:     AC_MSG_RESULT(yes)
                     38:     suncc=yes
                     39:   ;;
                     40:   *)
                     41:     AC_MSG_RESULT(no)
                     42:   ;;
                     43: esac
                     44:
                     45: AC_PATH_PROG(MKDEP, mkdep)
                     46: AC_PATH_PROG(MAKEDEPEND, makedepend)
                     47:
                     48: AC_MSG_CHECKING([how to generate dependency info])
                     49:
                     50: if test "$ac_cv_c_compiler_gnu" = yes; then
                     51:   CFLAGS="$CFLAGS -Wall -Wno-unused"
                     52:   MKDEP="$CC -MM"
                     53:   MKDEP_DIRECT="> .depend"
                     54:   AC_MSG_RESULT(gcc)
                     55: elif test "$suncc" = yes; then
                     56:   MKDEP="$CC -xM"
                     57:   # -xM is noisy
                     58:   MKDEP_DIRECT="> .depend 2>/dev/null"
                     59:   AC_MSG_RESULT([Solaris cc])
                     60: elif test -n "$MKDEP"; then
                     61:   AC_MSG_RESULT(mkdep)
                     62: elif test -n "$MAKEDEPEND"; then
                     63:   MKDEP=":> .depend; $MAKEDEPEND -f.depend"
                     64:   MKDEP_DIRECT=">/dev/null 2>&1" # noisy prick of a program
                     65:   AC_MSG_RESULT(makedepend)
                     66: else
                     67:   MKDEP=:
                     68:   AC_MSG_RESULT([nothing!])
                     69: fi
                     70:
                     71: AC_SUBST(MKDEP)
                     72: AC_SUBST(MKDEP_DIRECT)
                     73:
                     74: AC_SEARCH_LIBS(use_default_colors, [ncursesw],
                     75: [
                     76:    AC_MSG_RESULT([Using ncursesw and color.])
                     77:    AC_DEFINE(USE_NCURSES_COLOR,1,[Use ncursesw and color])
                     78: ],
                     79: [
                     80:    AC_MSG_RESULT([Not using ncursesw, not using color.])
                     81: ])
                     82:
                     83: AC_PROG_INSTALL
                     84: AC_SEARCH_LIBS(initscr, [ncursesw cursesw], [], [
                     85:    AC_MSG_ERROR([Cannot find cursesw or ncursesw devel libs.])
                     86: ])
                     87:
                     88:
                     89:
                     90: AC_ARG_ENABLE(debugfile,
                     91: [AC_HELP_STRING([--enable-debugfile], [Enable debugging output to a file.])],
                     92: [], [])
                     93:
                     94: if test "$enable_debugfile" = yes; then
                     95:    AC_MSG_RESULT([Enabling debugging output to a file.])
                     96:    AC_DEFINE(USE_DEBUGFILE,1,[Output debugging into to a file in chroot.])
                     97: fi
                     98:
                     99:
                    100: AC_ARG_ENABLE(sqlite,
                    101: [AC_HELP_STRING([--enable-sqlite], [Use SQLite for the database instead of flat text file.])],
                    102: [], [])
                    103:
                    104: AC_ARG_WITH(sqlite-db,
                    105: [AC_HELP_STRING([--with-sqlite-db=PATH], [Define the path and filename of the SQLite database.])],
                    106: [dgl_sqlite_db=$withval; enable_sqlite=yes], [dgl_sqlite_db="/dgldir/dgamelaunch.db"])
                    107:
                    108: if test "$enable_sqlite" = yes; then
                    109:    AC_MSG_RESULT([Using SQLite for the database, located at $dgl_sqlite_db])
                    110:    AC_DEFINE(USE_SQLITE3,1,[Use SQLite for the database instead of flat text file.])
                    111:    MY_LIBS="$MY_LIBS -lsqlite3"
                    112:    AC_DEFINE_UNQUOTED(USE_SQLITE_DB, "$dgl_sqlite_db", [Path and filename of the SQLite database.])
                    113: fi
                    114:
                    115:
                    116:
                    117:
                    118: dgl_rlimit_core_default=157286400
                    119: AC_ARG_WITH(rlimit-core,
                    120: [AC_HELP_STRING([--with-rlimit-core=SIZE], [Enable and set the core dump maximum size.])],
                    121: [dgl_rlimit_core=$withval; enable_rlimit=yes], [dgl_rlimit_core=$dgl_rlimit_core_default])
                    122:
                    123: if test "$enable_rlimit" = yes; then
                    124:    if test "$dgl_rlimit_core" = yes; then
                    125:       dgl_rlimit_core=$dgl_rlimit_core_default
                    126:    fi
                    127:    AC_CHECK_HEADERS([sys/resource.h], [], [AC_MSG_ERROR([sys/resource.h not found.])], [])
                    128:    AC_MSG_RESULT([Enabled and set maximum core dump size to $dgl_rlimit_core])
                    129:    AC_DEFINE(USE_RLIMIT,1,[Use getrlimit/setrlimit])
                    130:    AC_DEFINE_UNQUOTED(USE_RLIMIT_CORE, $dgl_rlimit_core, [Maximum core dump size])
                    131:    enable_rlimit=no
                    132: fi
                    133:
                    134: dgl_rlimit_as_default=104857600
                    135: AC_ARG_WITH(rlimit-as,
                    136: [AC_HELP_STRING([--with-rlimit-as=SIZE], [Enable and set the maximum memory usage.])],
                    137: [dgl_rlimit_as=$withval; enable_rlimit=yes], [dgl_rlimit_as=$dgl_rlimit_as_default])
                    138:
                    139: if test "$enable_rlimit" = yes; then
                    140:    if test "$dgl_rlimit_as" = yes; then
                    141:       dgl_rlimit_as=$dgl_rlimit_as_default
                    142:    fi
                    143:    AC_CHECK_HEADERS([sys/resource.h], [], [AC_MSG_ERROR([sys/resource.h not found.])], [])
                    144:    AC_MSG_RESULT([Enabled and set maximum memory usage limit to $dgl_rlimit_as])
                    145:    AC_DEFINE(USE_RLIMIT,1,[Use getrlimit/setrlimit])
                    146:    AC_DEFINE_UNQUOTED(USE_RLIMIT_AS, $dgl_rlimit_as, [Maximum mem usage])
                    147:    enable_rlimit=no
                    148: fi
                    149:
                    150:
                    151: AC_ARG_ENABLE(shmem,
                    152: [AC_HELP_STRING([--enable-shmem], [Use a shared memory block to show number of watchers.])],
                    153: [enable_shmem=yes], [])
                    154:
                    155: if test "$enable_shmem" = yes; then
                    156:    AC_CHECK_HEADERS([semaphore.h], [], [AC_MSG_ERROR([semaphore.h not found.])], [])
                    157:    AC_CHECK_HEADERS([sys/ipc.h], [], [AC_MSG_ERROR([sys/ipc.h not found.])], [])
                    158:    AC_CHECK_HEADERS([sys/shm.h], [], [AC_MSG_ERROR([sys/shm.h not found.])], [])
                    159:    AC_MSG_RESULT([Enabled showing number of watchers.])
                    160:    AC_DEFINE(USE_SHMEM,1,[Use shared memory block])
                    161:    MY_LIBS="$MY_LIBS -lrt"
                    162:    # or -pthread?
                    163: fi
                    164:
                    165:
                    166: AC_ARG_WITH(config-file,
                    167: [AC_HELP_STRING([--with-config-file=PATH], [Define the path to the default configuration file.])],
                    168: [configfile=$withval], [configfile="/etc/dgamelaunch.conf"])
                    169:
                    170: AC_DEFINE_UNQUOTED(DEFCONFIG, "$configfile", [Path to the default config file.])
                    171:
                    172: AC_CHECK_HEADERS([sys/pstat.h])
                    173: AC_CHECK_FUNCS([openpty setenv setproctitle pstat kqueue])
                    174:
                    175: if test "$ac_cv_func_setproctitle" = no; then
                    176:   SETPROCTITLE_C=setproctitle.c
                    177:   if test "$ac_cv_func_pstat" = yes; then
                    178:     AC_DEFINE(SPT_TYPE,SPT_PSTAT,[Type of setproctitle emulation to use.])
                    179:   else
                    180:     AC_DEFINE(SPT_TYPE,SPT_REUSEARGV)
                    181:   fi
                    182: else
                    183:   SETPROCTITLE_C=""
                    184: fi
                    185:
                    186:
                    187: LIBS="$LIBS $MY_LIBS"
                    188:
                    189: AC_SUBST(SETPROCTITLE_C)
                    190: AC_SUBST(LEXLIBS)
                    191:
                    192: AC_CONFIG_FILES(Makefile)
                    193: AC_OUTPUT

CVSweb