# Public domain REGISTER("--with-ode", "SG: ODE physics interface [default: check]") REGISTER("--with-cg", "SG: CG shader support [default: check]") REGISTER("--enable-warnings", "Suggested compiler warnings [default: no]") REGISTER("--enable-edition", "Enable edition features [default: yes]") # FreeSG version HDEFINE(VERSION, "0.1.1") HDEFINE(RELEASE, "A Mild Breeze on the Brow of the Dead") # Installation directories MDEFINE(SHAREDIR, "\${PREFIX}/share/freesg") HDEFINE(SHAREDIR, "$PREFIX/share/freesg") MDEFINE(INCLDIR, "\${PREFIX}/include/freesg") HDEFINE(INCLDIR, "$PREFIX/include/freesg") CHECK(cc) CHECK(sys_types) CHECK(sys_queue) CHECK(stdlib_h) CHECK(unistd_h) CHECK(limits_h) CHECK(math) CHECK(strsep) CHECK(asprintf) CHECK(vasprintf) CHECK(snprintf) CHECK(vsnprintf) CHECK(strtoll) CHECK(opengl) C_DEFINE(_FREESG_INTERNAL) C_DEFINE(_USE_AGAR_CPUINFO) C_DEFINE(_USE_AGAR_STD) C_DEFINE(_USE_AGAR_QUEUE) C_DEFINE(_USE_AGAR_CORE) C_DEFINE(_USE_AGAR_GUI) C_DEFINE(_USE_AGAR_MATH) C_NO_SECURE_WARNINGS() #C_EXTRA_WARNINGS() #C_FATAL_WARNINGS() if [ "${enable_warnings}" = "yes" ]; then C_OPTION(-Wall) C_OPTION(-Werror) C_OPTION(-Wmissing-prototypes) MDEFINE(WNO_UNINITIALIZED, "-Wno-uninitialized") else MDEFINE(WNO_UNINITIALIZED, "") fi if [ "${enable_threads}" != "no" ]; then CHECK(pthreads) if [ "${HAVE_PTHREADS}" = "yes" ]; then if [ "${enable_threads}" = "yes" ]; then echo "*" echo "* --enable-threads was given, but could not find" echo "* a usable pthreads library. Try running the" echo "* configure script again without this option." echo "*" exit 1 fi fi fi # Agar is required. CHECK(agar, 1.4) CHECK(agar-math) if [ "${HAVE_AGAR}" = "no" ]; then echo "*" echo "* The Agar library is not installed on your system. It is " echo "* required by this package. See http://libagar.org/" echo "*" exit 1 fi if [ "${HAVE_AGAR_MATH}" = "no" ]; then echo "*" echo "* The Agar-Math library is not installed on your system. It is " echo "* required by this package. See http://libagar.org/" echo "*" exit 1 fi # Enable ODE interface if libode is found. if [ "${with_ode}" != "no" ]; then CHECK(ode) if [ "${HAVE_ODE}" != "yes" ]; then if [ "${with_ode}" = "yes" ]; then echo "*" echo "* --with-ode was requested, but ODE was not" echo "* found on this system." echo "*" exit 1 else HUNDEF(HAVE_ODE) fi fi else HUNDEF(HAVE_ODE) fi # Enable CG support if Cg toolkit is found. if [ "${with_cg}" != "no" ]; then CHECK(cg) if [ "${HAVE_CG}" != "yes" ]; then if [ "${with_cg}" = "yes" ]; then echo "*" echo "* --with-cg was requested, but Cg was not" echo "* found on this system." echo "*" exit 1 else HUNDEF(HAVE_CG) fi fi else HUNDEF(HAVE_CG) fi if [ "${enable_debug}" = "yes" ]; then MDEFINE(CFLAGS, "$CFLAGS -DDEBUG") fi if [ "${enable_edition}" != "no" ]; then C_DEFINE(EDITION) fi # Generate includes into ./include/freesg. C_INCPREP(include,freesg) # We use both and in the sources. C_INCDIR($BLD/include) C_INCDIR($BLD/include/freesg) C_INCDIR_CONFIG($BLD/include/freesg/config) echo "*" echo "* Configuration successful." echo "* Use make && make install to build and install FreeSG." echo "*"