Menu

[r779]: / trunk / LWJGL / src / native / configure.in  Maximize  Restore  History

Download this file

70 lines (55 with data), 2.0 kB

#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ(2.57)
AC_INIT(LWJGL, 0.7)
AM_INIT_AUTOMAKE()
AC_CONFIG_SRCDIR([autogen.sh])
AM_CONFIG_HEADER([config.h])

AC_DISABLE_STATIC
AC_LIBTOOL_DLOPEN

# Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET

AC_PROG_CXX
CC="$CXX"
AC_PROG_LIBTOOL 

case "$host_os" in
        darwin*)        _BUILD_FLAG="-D_AGL"
                        CXXFLAGS="$CXXFLAGS -Wall $_BUILD_FLAGS"
                        CFLAGS="$CFLAGS -Wall $_BUILD_FLAGS"
                        ;;
	bsdi* | linux* | solaris*) AC_PATH_XTRA
                                   _BUILD_FLAGS="-pthread -D_X11 $X_CFLAGS"
                                   CXXFLAGS="$CXXFLAGS -Wall $_BUILD_FLAGS"
                                   CFLAGS="$CFLAGS -Wall $_BUILD_FLAGS"
                                   LIBS="$LIBS $X_LIBS"
                                   AC_CHECK_LIB(X11, XOpenDisplay,, AC_MSG_ERROR(X11 is required))
                                   AC_CHECK_LIB(Xext, main,, AC_MSG_ERROR(Xext is required))
                                   AC_CHECK_LIB(Xxf86vm, main,, AC_MSG_ERROR(Xxf86vm is required))
                                   AC_CHECK_LIB(pthread, pthread_create,, AC_MSG_ERROR(pthread is required))

                                   ;;
        *)              AC_MSG_ERROR([Unknow system $host_os]);;
esac

# Checks for libraries.

# Checks for header files.
AC_HEADER_STDC

AC_JNI_INCLUDE_DIR

for JNI_INCLUDE_DIR in $JNI_INCLUDE_DIRS
do
    CXXFLAGS="$CXXFLAGS -I$JNI_INCLUDE_DIR"
done

AC_CHECK_HEADER([stddef.h stdlib.h string.h sys/time.h])

# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_C_CONST
AC_C_INLINE
AC_HEADER_TIME

# Checks for library functions.
AC_FUNC_MALLOC
AC_CHECK_FUNCS([gettimeofday memset strchr strstr])

AC_CONFIG_FILES([Makefile
                 common/Makefile
                 linux/Makefile])
AC_OUTPUT
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.