From ea1947ffcc606d757357398b24e74a3f4ecefa07 Mon Sep 17 00:00:00 2001 From: neonloop Date: Wed, 20 Oct 2021 14:54:27 +0000 Subject: Initial commit from steward-fu release --- modules/configure.in | 214 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 214 insertions(+) create mode 100644 modules/configure.in (limited to 'modules/configure.in') diff --git a/modules/configure.in b/modules/configure.in new file mode 100644 index 0000000..df88cee --- /dev/null +++ b/modules/configure.in @@ -0,0 +1,214 @@ +AC_INIT(bennu,1.0.0) + +LT_INIT([disable-static]) + +PKG_PROG_PKG_CONFIG() + +AC_CONFIG_MACRO_DIR([m4]) + +AC_CANONICAL_SYSTEM +AC_ARG_PROGRAM + +AC_LIBTOOL_WIN32_DLL +AC_LIBTOOL_DLOPEN +AC_PROG_LIBTOOL + +AM_MAINTAINER_MODE + +echo "Your machine: ${target_cpu} ${target_os}" + +AC_ARG_ENABLE(debug, [ --enable-debug enable use of Debug (default: no)], enable_debug=$enableval, enable_debug=no) +AC_ARG_WITH(bennu-prefix,[ --with-bennu-prefix=PFX Prefix where Bennu is installed (optional)], BGD_PATH="$withval", BGD_PATH="`pwd`/../core") + +AC_CHECK_TOOL(WINDRES, windres, ) +AM_CONDITIONAL(HAVE_WINDRES, test "$WINDRES" != "") + +dnl Aqui es donde se chequeara el SO, pero solo hay una opcion xD +case "$target_os" in + linux-gnueabi) + COMMON_CFLAGS="-Wall -DTARGET_LINUX" + COMMON_LDFLAGS="$COMMON_LIBS -lc -ldl" + + COMMON_CFLAGS="$COMMON_CFLAGS $CFLAGS" + COMMON_LDFLAGS="$COMMON_LDFLAGS $LDFLAGS" + SDL_MIXER_DEPS="-lSDL -lvorbis -logg -lmad -lvorbisfile -lvorbisidec" + LM=-lm + ;; + + linux-gnu*) + COMMON_CFLAGS="-Wall -DTARGET_LINUX" + COMMON_LDFLAGS="$COMMON_LIBS -lc -ldl" + + case "$target_cpu" in + i*86*) + COMMON_CFLAGS="$COMMON_CFLAGS -m32" + COMMON_LDFLAGS="$COMMON_LDFLAGS -m32 -L/lib32" + LM=-lm + LIBSSL="crypto" + USE_OPENSSL=yes + ;; + + arm) + COMMON_CFLAGS="$COMMON_CFLAGS -DUSE_LIBDES $CFLAGS -I`pwd`/../3rdparty/des-4.04b" + COMMON_LDFLAGS="$COMMON_LDFLAGS $LDFLAGS -L`pwd`/../3rdparty/des-4.04b -ldes" + SDL_MIXER_DEPS="-lSDL -liconv -lvorbis -logg -lmad -lvorbisfile -lvorbisidec" + LM=-lm + ;; + + mipsel) + COMMON_CFLAGS="$COMMON_CFLAGS -DUSE_LIBDES $CFLAGS -I`pwd`/../3rdparty/des-4.04b" + COMMON_LDFLAGS="$COMMON_LDFLAGS $LDFLAGS -L`pwd`/../3rdparty/des-4.04b -ldes" + SDL_MIXER_DEPS="-lSDL -liconv -lvorbis -logg -lmad -lvorbisfile -lvorbisidec" + LM=-lm + ;; + + esac + ;; + + mingw32) + COMMON_CFLAGS="$COMMON_CFLAGS $CFLAGS -I/usr/local/include -DTARGET_WIN32 -DWIN32 -D_WIN32 -DUSE_LIBDES -I`pwd`/../3rdparty/des-4.04b" + COMMON_LDFLAGS="$COMMON_LDFLAGS $LDFLAGS -L`pwd`/../3rdparty/des-4.04b -ldes -L/usr/local/lib -lshlwapi -lkernel32 -Wl,--enable-auto-import" + LM=-lm + USE_OPENSSL=no + ;; + + mingw32msvc) + COMMON_CFLAGS="$COMMON_CFLAGS $CFLAGS -I/usr/i586-mingw32msvc/include -DTARGET_WIN32 -DWIN32 -D_WIN32 -DUSE_LIBDES -I`pwd`/../3rdparty/des-4.04b" + COMMON_LDFLAGS="$COMMON_LDFLAGS $LDFLAGS -L`pwd`/../3rdparty/des-4.04b -ldes -L/usr/i586-mingw32msvc/lib -lshlwapi -lkernel32 -Wl,--enable-auto-import" + LM=-lm + LIBSSL="crypto" + USE_OPENSSL=yes + ;; + + dragonfly*) + COMMON_CFLAGS="-I/usr/local/include -Wall -DTARGET_BSD" + COMMON_LDFLAGS="-pthread -L/usr/local/lib" + LM=-lm + LIBSSL="crypto" + USE_OPENSSL=yes + ;; + + darwin*) + COMMON_CFLAGS="-I/usr/local/include -Wall -DTARGET_MAC" + COMMON_LDFLAGS="-L/usr/local/lib" + LM=-lm + LIBSSL="crypto" + USE_OPENSSL=yes + ;; + + haiku) + INCLUDES="-I/usr/local/include" + COMMON_CFLAGS="-Wall -DTARGET_BEOS" + COMMON_LDFLAGS="-L/usr/local/lib" + LM= + LIBSSL="crypto" + USE_OPENSSL=yes + ;; + +esac + +AM_INIT_AUTOMAKE(1.6) + +dnl Check for compilers +AC_PROG_CC + +AC_CHECK_LIB(m,fabs,,AC_MSG_RESULT(math library not found)) + +if test "x$enable_debug" = "xyes"; then + CFLAGS+=" -g $COMMON_CFLAGS" +else + CFLAGS+=" -O2 -finline-functions -fno-strict-aliasing $COMMON_CFLAGS" +fi + +if test "x$enable_static" = "xyes"; then + CFLAGS+=" -D__STATIC__ " + enable_shared=no +fi + +dnl librerias para todos + +dnl Check for SDL library + +PKG_CHECK_MODULES([SDL], [sdl >= 1.2]) +PKG_CHECK_MODULES(ZLIB, [ zlib ]) +PKG_CHECK_MODULES([PNG], [libpng >= 1.2]) +PKG_CHECK_MODULES([SDL_mixer], [SDL_mixer]) + +if test "$USE_OPENSSL" = "yes"; then +AC_CHECK_LIB($LIBSSL, DES_ecb_encrypt, [AC_CHECK_HEADER(openssl/des.h,CRYPT_LDFLAGS=-l$LIBSSL,)], [AC_MSG_ERROR($LIBSSL not found!)]) +fi + +#AC_CHECK_LIB(z, gzsetparams, [AC_CHECK_HEADER(zlib.h,ZLIBS="-lz",)], [AC_MSG_ERROR(zlib not found!)]) +#AC_CHECK_LIB(png, png_read_info, [AC_CHECK_HEADER(png.h,PNGLIBS="-lpng",)], AC_MSG_ERROR(PNG library not found!), -lz $LM) +#AC_CHECK_LIB(SDL_mixer, Mix_AllocateChannels, [AC_CHECK_HEADER(SDL_mixer.h,LIBS+="-lSDL_mixer",)], [AC_MSG_ERROR(libSDL_mixer not found!)], $SDL_MIXER_DEPS) + +AC_CHECK_LIB(X11, [XQueryTree,XMoveWindow],X11LIBS="-lX11",) + +AC_SUBST(COMMON_LDFLAGS) +AC_SUBST(COMMON_CFLAGS) +AC_SUBST(BGD_PATH) +AC_SUBST(ZLIBS) +AC_SUBST(PNGLIBS) +AC_SUBST(DESLIBS) +AC_SUBST(X11LIBS) + +AC_OUTPUT([ +Makefile +libgrbase/Makefile +libvideo/Makefile +libblit/Makefile +librender/Makefile +libdraw/Makefile +libfont/Makefile +libtext/Makefile +libsdlhandler/Makefile +libwm/Makefile +libkey/Makefile +libmouse/Makefile +libjoy/Makefile +libscroll/Makefile +libbgload/Makefile +mod_scroll/Makefile +mod_mouse/Makefile +mod_map/Makefile +mod_video/Makefile +mod_screen/Makefile +mod_blendop/Makefile +mod_text/Makefile +mod_draw/Makefile +mod_grproc/Makefile +mod_effects/Makefile +mod_key/Makefile +mod_cd/Makefile +mod_dir/Makefile +mod_file/Makefile +mod_crypt/Makefile +mod_joy/Makefile +mod_math/Makefile +mod_mathi/Makefile +mod_mem/Makefile +mod_proc/Makefile +mod_rand/Makefile +mod_regex/Makefile +mod_say/Makefile +mod_sort/Makefile +mod_sound/Makefile +mod_string/Makefile +mod_sys/Makefile +mod_time/Makefile +mod_timers/Makefile +mod_path/Makefile +mod_wm/Makefile +mod_debug/Makefile +mod_flic/Makefile +mod_m7/Makefile +]) + +echo +echo Bennu Modules $VERSION +echo +echo Debug Mode ....... : $enable_debug +echo Static build ..... : $enable_static +echo +echo configure complete, now type \'make\'. +echo -- cgit v1.2.3