| 1 |
# -*- Autoconf -*- |
|---|
| 2 |
# Process this file with autoconf to produce a configure script. |
|---|
| 3 |
|
|---|
| 4 |
AC_PREREQ(2.57) |
|---|
| 5 |
AC_INIT([openmosix-tools], [0.3.6-2], [openmosix-devel@lists.sourceforge.net]) |
|---|
| 6 |
AC_CONFIG_SRCDIR([mosrun/mosrun.c]) |
|---|
| 7 |
AM_CONFIG_HEADER(config.h) |
|---|
| 8 |
#PACKAGE=openmosix-tools |
|---|
| 9 |
#VERSION=0.3.2 |
|---|
| 10 |
AM_INIT_AUTOMAKE($PACKAGE_NAME, $PACKAGE_VERSION) |
|---|
| 11 |
# Checks for programs. |
|---|
| 12 |
AC_PROG_CC |
|---|
| 13 |
AC_PROG_INSTALL |
|---|
| 14 |
AC_PROG_LN_S |
|---|
| 15 |
AC_PREFIX_DEFAULT([/usr/local]) |
|---|
| 16 |
AC_MSG_CHECKING([for an openMosix kernel]) |
|---|
| 17 |
AC_ARG_WITH([kerneldir], |
|---|
| 18 |
AC_HELP_STRING([--with-kerneldir],[use specified kernel path (default is /usr/src/linux-openmosix)]), |
|---|
| 19 |
[OPENMOSIXDIR=$withval], |
|---|
| 20 |
[OPENMOSIXDIR=/usr/src/linux-openmosix]) |
|---|
| 21 |
AC_MSG_RESULT($OPENMOSIXDIR) |
|---|
| 22 |
AC_CHECK_HEADER($OPENMOSIXDIR/include/hpc/comm.h, |
|---|
| 23 |
AC_MSG_RESULT([good: looks like you have an openMosix kernel]), |
|---|
| 24 |
AC_MSG_ERROR([openMosix header files not found])) |
|---|
| 25 |
AC_ARG_WITH([configdir], |
|---|
| 26 |
AC_HELP_STRING([--with-configdir],[install openMosix config file into the specified directory (default is /etc)]), |
|---|
| 27 |
[omcfg=$withval], |
|---|
| 28 |
[omcfg=/etc/openmosix]) |
|---|
| 29 |
AC_ARG_WITH([sysvdir], |
|---|
| 30 |
AC_HELP_STRING([--with-sysvdir],[install openMosix script in the specified directory (default is /etc/init.d)]), |
|---|
| 31 |
[omsysv=$withval], |
|---|
| 32 |
[omsysv=/etc/init.d]) |
|---|
| 33 |
AC_ARG_WITH([mapdir], |
|---|
| 34 |
AC_HELP_STRING([--with-mapdir],[install openMosix map file in the specified directory (default is /etc)]), |
|---|
| 35 |
[ommap=$withval], |
|---|
| 36 |
[ommap=/etc]) |
|---|
| 37 |
AC_ARG_WITH([mosrundir], |
|---|
| 38 |
AC_HELP_STRING([--with-mosrundir],[install the mosrun command into the specified path (default is /bin)]), |
|---|
| 39 |
[mosrundir=$withval], |
|---|
| 40 |
[mosrundir=/bin]) |
|---|
| 41 |
AC_SUBST(ommap) |
|---|
| 42 |
AC_SUBST(omsysv) |
|---|
| 43 |
AC_SUBST(omcfg) |
|---|
| 44 |
AC_SUBST(mosrundir) |
|---|
| 45 |
AC_MSG_CHECKING([Checking for lock dir]) |
|---|
| 46 |
if test -d /var/lock/subsys |
|---|
| 47 |
then |
|---|
| 48 |
OM_VARLOCK_DIR="/var/lock/subsys/" |
|---|
| 49 |
AC_SUBST(OM_VARLOCK_DIR) |
|---|
| 50 |
elif test -d /var/lock/ |
|---|
| 51 |
then |
|---|
| 52 |
OM_VARLOCK_DIR="/var/lock" |
|---|
| 53 |
AC_SUBST(OM_VARLOCK_DIR) |
|---|
| 54 |
else |
|---|
| 55 |
AC_MSG_ERROR([/var/lock dir has not been found! Are you sure this is a GNU/Linux distribution?]) |
|---|
| 56 |
fi |
|---|
| 57 |
AC_MSG_RESULT($OM_VARLOCK_DIR) |
|---|
| 58 |
#AC_PROG_RANLIB |
|---|
| 59 |
AM_PROG_LIBTOOL |
|---|
| 60 |
# Checks for libraries. |
|---|
| 61 |
#AC_CHECK_LIB([bfd],[bfd_i386linux_size_dynamic_sections], [], AC_MSG_ERROR([please install binutils])) |
|---|
| 62 |
#AC_CHECK_LIB([iberty], [main]) |
|---|
| 63 |
oLIBS="$LIBS" |
|---|
| 64 |
AC_CHECK_LIB([ncurses], [beep], [NCURSES_LIBS="-lncurses"], AC_MSG_ERROR([please install libncurses])) |
|---|
| 65 |
LIBS=$oLIBS |
|---|
| 66 |
AC_SUBST(NCURSES_LIBS) |
|---|
| 67 |
#libproc version |
|---|
| 68 |
LIBPROC_VERSION=1 |
|---|
| 69 |
LIBPROC_SUBVERSION=2 |
|---|
| 70 |
LIBPROC_MINORVERSION=9 |
|---|
| 71 |
AC_SUBST(LIBPROC_VERSION) |
|---|
| 72 |
AC_SUBST(LIBPROC_SUBVERSION) |
|---|
| 73 |
AC_SUBST(LIBPROC_MINORVERSION) |
|---|
| 74 |
LIBPROC_LIBVERSION=`expr $LIBPROC_VERSION + $LIBPROC_SUBVERSION`:$LIBPROC_MINORVERSION:$LIBPROC_SUBVERSION |
|---|
| 75 |
AC_SUBST(LIBPROC_LIBVERSION) |
|---|
| 76 |
#moslib version |
|---|
| 77 |
MOSLIB_VERSION=0 |
|---|
| 78 |
MOSLIB_SUBVERSION=3 |
|---|
| 79 |
MOSLIB_MINORVERSION=0 |
|---|
| 80 |
AC_SUBST(LIBPROC_VERSION) |
|---|
| 81 |
AC_SUBST(LIBPROC_SUBVERSION) |
|---|
| 82 |
AC_SUBST(LIBPROC_MINORVERSION) |
|---|
| 83 |
MOSLIB_LIBVERSION=`expr $MOSLIB_VERSION + $MOSLIB_SUBVERSION`:$MOSLIB_MINORVERSION:$MOSLIB_SUBVERSION |
|---|
| 84 |
AC_SUBST(MOSLIB_LIBVERSION) |
|---|
| 85 |
LIBFIXVFORK_LIBVERSION=$MOSLIB_LIBVERSION |
|---|
| 86 |
# Checks for header files. |
|---|
| 87 |
AC_HEADER_DIRENT |
|---|
| 88 |
AC_HEADER_STDC |
|---|
| 89 |
AC_HEADER_SYS_WAIT |
|---|
| 90 |
AC_CHECK_HEADERS([arpa/inet.h fcntl.h limits.h netdb.h netinet/in.h stddef.h stdint.h stdlib.h string.h sys/ioctl.h sys/param.h sys/socket.h sys/time.h syslog.h termio.h termios.h unistd.h utmp.h]) |
|---|
| 91 |
|
|---|
| 92 |
# Checks for typedefs, structures, and compiler characteristics. |
|---|
| 93 |
AC_C_CONST |
|---|
| 94 |
AC_TYPE_OFF_T |
|---|
| 95 |
AC_TYPE_PID_T |
|---|
| 96 |
AC_TYPE_SIZE_T |
|---|
| 97 |
AC_CHECK_MEMBERS([struct stat.st_rdev]) |
|---|
| 98 |
AC_HEADER_TIME |
|---|
| 99 |
AC_STRUCT_TM |
|---|
| 100 |
AC_TYPE_UID_T |
|---|
| 101 |
#check for openmosix kernel |
|---|
| 102 |
AC_CHECK_HEADER([$OPENMOSIXDIR/include/linux/autoconf.h],OM_INCLUDES="-I$OPENMOSIXDIR/include",AC_MSG_ERROR([please configure your kernel before running configure again])) |
|---|
| 103 |
CFLAGS="$CFLAGS -Wall -O2 -I../moslib $OM_INCLUDES -I." |
|---|
| 104 |
AC_SUBST(CFLAGS) |
|---|
| 105 |
# Checks for library functions. |
|---|
| 106 |
AC_FUNC_CLOSEDIR_VOID |
|---|
| 107 |
AC_FUNC_FORK |
|---|
| 108 |
AC_PROG_GCC_TRADITIONAL |
|---|
| 109 |
AC_FUNC_LSTAT |
|---|
| 110 |
AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK |
|---|
| 111 |
AC_FUNC_MALLOC |
|---|
| 112 |
AC_FUNC_MEMCMP |
|---|
| 113 |
AC_FUNC_MMAP |
|---|
| 114 |
AC_FUNC_REALLOC |
|---|
| 115 |
AC_FUNC_SELECT_ARGTYPES |
|---|
| 116 |
AC_TYPE_SIGNAL |
|---|
| 117 |
AC_FUNC_STAT |
|---|
| 118 |
AC_CHECK_FUNCS([alarm ftruncate gethostbyaddr gethostbyname gethostname gettimeofday inet_ntoa memset munmap select socket strcasecmp strchr strdup strerror strncasecmp strpbrk strrchr strtol strtoul uname]) |
|---|
| 119 |
AC_CONFIG_FILES([Makefile |
|---|
| 120 |
autodiscovery/Makefile |
|---|
| 121 |
fixvfork/Makefile |
|---|
| 122 |
migrate/Makefile |
|---|
| 123 |
mosmon/Makefile |
|---|
| 124 |
mosctl/Makefile |
|---|
| 125 |
moslib/Makefile |
|---|
| 126 |
moslimit/Makefile |
|---|
| 127 |
mosrun/Makefile |
|---|
| 128 |
mps/Makefile |
|---|
| 129 |
mps/proc/Makefile |
|---|
| 130 |
setpe/Makefile |
|---|
| 131 |
scripts/Makefile |
|---|
| 132 |
scripts/openmosix]) |
|---|
| 133 |
AC_OUTPUT |
|---|