# -*- Autoconf -*- # Process this file with autoconf to produce a configure script. AC_PREREQ(2.57) AC_INIT([openmosix-tools], [0.3.6-2], [openmosix-devel@lists.sourceforge.net]) AC_CONFIG_SRCDIR([mosrun/mosrun.c]) AM_CONFIG_HEADER(config.h) #PACKAGE=openmosix-tools #VERSION=0.3.2 AM_INIT_AUTOMAKE($PACKAGE_NAME, $PACKAGE_VERSION) # Checks for programs. AC_PROG_CC AC_PROG_INSTALL AC_PROG_LN_S AC_PREFIX_DEFAULT([/usr/local]) AC_MSG_CHECKING([for an openMosix kernel]) AC_ARG_WITH([kerneldir], AC_HELP_STRING([--with-kerneldir],[use specified kernel path (default is /usr/src/linux-openmosix)]), [OPENMOSIXDIR=$withval], [OPENMOSIXDIR=/usr/src/linux-openmosix]) AC_MSG_RESULT($OPENMOSIXDIR) AC_CHECK_HEADER($OPENMOSIXDIR/include/hpc/comm.h, AC_MSG_RESULT([good: looks like you have an openMosix kernel]), AC_MSG_ERROR([openMosix header files not found])) AC_ARG_WITH([configdir], AC_HELP_STRING([--with-configdir],[install openMosix config file into the specified directory (default is /etc)]), [omcfg=$withval], [omcfg=/etc/openmosix]) AC_ARG_WITH([sysvdir], AC_HELP_STRING([--with-sysvdir],[install openMosix script in the specified directory (default is /etc/init.d)]), [omsysv=$withval], [omsysv=/etc/init.d]) AC_ARG_WITH([mapdir], AC_HELP_STRING([--with-mapdir],[install openMosix map file in the specified directory (default is /etc)]), [ommap=$withval], [ommap=/etc]) AC_ARG_WITH([mosrundir], AC_HELP_STRING([--with-mosrundir],[install the mosrun command into the specified path (default is /bin)]), [mosrundir=$withval], [mosrundir=/bin]) AC_SUBST(ommap) AC_SUBST(omsysv) AC_SUBST(omcfg) AC_SUBST(mosrundir) AC_MSG_CHECKING([Checking for lock dir]) if test -d /var/lock/subsys then OM_VARLOCK_DIR="/var/lock/subsys/" AC_SUBST(OM_VARLOCK_DIR) elif test -d /var/lock/ then OM_VARLOCK_DIR="/var/lock" AC_SUBST(OM_VARLOCK_DIR) else AC_MSG_ERROR([/var/lock dir has not been found! Are you sure this is a GNU/Linux distribution?]) fi AC_MSG_RESULT($OM_VARLOCK_DIR) #AC_PROG_RANLIB AM_PROG_LIBTOOL # Checks for libraries. #AC_CHECK_LIB([bfd],[bfd_i386linux_size_dynamic_sections], [], AC_MSG_ERROR([please install binutils])) #AC_CHECK_LIB([iberty], [main]) oLIBS="$LIBS" AC_CHECK_LIB([ncurses], [beep], [NCURSES_LIBS="-lncurses"], AC_MSG_ERROR([please install libncurses])) LIBS=$oLIBS AC_SUBST(NCURSES_LIBS) #libproc version LIBPROC_VERSION=1 LIBPROC_SUBVERSION=2 LIBPROC_MINORVERSION=9 AC_SUBST(LIBPROC_VERSION) AC_SUBST(LIBPROC_SUBVERSION) AC_SUBST(LIBPROC_MINORVERSION) LIBPROC_LIBVERSION=`expr $LIBPROC_VERSION + $LIBPROC_SUBVERSION`:$LIBPROC_MINORVERSION:$LIBPROC_SUBVERSION AC_SUBST(LIBPROC_LIBVERSION) #moslib version MOSLIB_VERSION=0 MOSLIB_SUBVERSION=3 MOSLIB_MINORVERSION=0 AC_SUBST(LIBPROC_VERSION) AC_SUBST(LIBPROC_SUBVERSION) AC_SUBST(LIBPROC_MINORVERSION) MOSLIB_LIBVERSION=`expr $MOSLIB_VERSION + $MOSLIB_SUBVERSION`:$MOSLIB_MINORVERSION:$MOSLIB_SUBVERSION AC_SUBST(MOSLIB_LIBVERSION) LIBFIXVFORK_LIBVERSION=$MOSLIB_LIBVERSION # Checks for header files. AC_HEADER_DIRENT AC_HEADER_STDC AC_HEADER_SYS_WAIT 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]) # Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_TYPE_OFF_T AC_TYPE_PID_T AC_TYPE_SIZE_T AC_CHECK_MEMBERS([struct stat.st_rdev]) AC_HEADER_TIME AC_STRUCT_TM AC_TYPE_UID_T #check for openmosix kernel AC_CHECK_HEADER([$OPENMOSIXDIR/include/linux/autoconf.h],OM_INCLUDES="-I$OPENMOSIXDIR/include",AC_MSG_ERROR([please configure your kernel before running configure again])) CFLAGS="$CFLAGS -Wall -O2 -I../moslib $OM_INCLUDES -I." AC_SUBST(CFLAGS) # Checks for library functions. AC_FUNC_CLOSEDIR_VOID AC_FUNC_FORK AC_PROG_GCC_TRADITIONAL AC_FUNC_LSTAT AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK AC_FUNC_MALLOC AC_FUNC_MEMCMP AC_FUNC_MMAP AC_FUNC_REALLOC AC_FUNC_SELECT_ARGTYPES AC_TYPE_SIGNAL AC_FUNC_STAT 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]) AC_CONFIG_FILES([Makefile autodiscovery/Makefile fixvfork/Makefile migrate/Makefile mosmon/Makefile mosctl/Makefile moslib/Makefile moslimit/Makefile mosrun/Makefile mps/Makefile mps/proc/Makefile setpe/Makefile scripts/Makefile scripts/openmosix]) AC_OUTPUT