170 |
DEBUG=no |
DEBUG=no |
171 |
AC_ARG_ENABLE(debug, [ --enable-debug allows you to compile mlnet with debug symbols], [DEBUG="$enableval"]) |
AC_ARG_ENABLE(debug, [ --enable-debug allows you to compile mlnet with debug symbols], [DEBUG="$enableval"]) |
172 |
|
|
173 |
BUILD_GUI=yes |
GUI=no |
174 |
BUILD_NEWGUI=yes |
AC_ARG_ENABLE(gui, [ --disable-gui allows you to disable GUI build (default)], [GUI="$enableval"]) |
175 |
AC_ARG_ENABLE(newgui, [ --disable-newgui allows you to compile the old-gui], [BUILD_NEWGUI="$enableval"]) |
AC_ARG_ENABLE(gui, [ --enable-gui=oldgui|newgui1|newgui2 |
176 |
AC_ARG_ENABLE(gui, [ --disable-gui allows you to remove the GUI], [BUILD_GUI="$enableval"]) |
allows you to choose a GUI (default: newgui2 - is a GTK2 GUI, other GUIs use GTK1)], [GUI="$enableval"]) |
177 |
AC_ARG_ENABLE(gtk2, [ --enable-gtk2 allows you to compile using GTK2], [USE_GTK2="$enableval"]) |
if test "$GUI" = "yes"; then |
178 |
|
GUI=newgui2 |
179 |
|
fi |
180 |
|
if test ! "$GUI" = "newgui2"; then |
181 |
|
if test ! "$GUI" = "newgui1"; then |
182 |
|
if test ! "$GUI" = "oldgui"; then |
183 |
|
GUI=no |
184 |
|
fi |
185 |
|
fi |
186 |
|
fi |
187 |
|
|
188 |
PTHREAD_LIBS=yes |
PTHREAD_LIBS=yes |
189 |
AC_ARG_ENABLE(pthread, [ --disable-pthread allows you to disable pthread support in mldonkey], [PTHREAD_LIBS="$enableval"]) |
AC_ARG_ENABLE(pthread, [ --disable-pthread allows you to disable pthread support in mldonkey], [PTHREAD_LIBS="$enableval"]) |
192 |
if [ test "$SYSTEM" = "windows"]; then |
if [ test "$SYSTEM" = "windows"]; then |
193 |
ICONV=no |
ICONV=no |
194 |
else |
else |
195 |
ICONV=yes |
ICONV=yes |
196 |
fi |
fi |
197 |
AC_ARG_ENABLE(iconv, [ --disable-iconv disable the use of iconv for compiling on broken windows environments], [ICONV="$enableval"]) |
AC_ARG_ENABLE(iconv, [ --disable-iconv disable the use of iconv for compiling on broken windows environments], [ICONV="$enableval"]) |
198 |
|
|
784 |
|
|
785 |
|
|
786 |
# Check for GTK only if we want to build the GUI |
# Check for GTK only if we want to build the GUI |
787 |
if test "$BUILD_GUI" = "yes"; then |
if test ! "$GUI" = "no"; then |
788 |
echo "---------------------------------------------------------" |
echo "---------------------------------------------------------" |
789 |
echo "Checking the libraries required to build the GTK GUI." |
echo "Checking the libraries required to build the GTK GUI." |
790 |
echo "---------------------------------------------------------" |
echo "---------------------------------------------------------" |
791 |
if test "$USE_GTK2" = "yes"; then |
if test "$GUI" = "newgui2"; then |
792 |
AC_MSG_CHECKING(for Zlib) |
AC_MSG_CHECKING(for Zlib) |
793 |
if test "$ZLIB" = "yes"; then |
if test "$ZLIB" = "yes"; then |
794 |
AC_MSG_RESULT(yes) |
AC_MSG_RESULT(yes) |
802 |
AC_MSG_CHECKING(for librsvg - version >= $REQUIRED_RSVG) |
AC_MSG_CHECKING(for librsvg - version >= $REQUIRED_RSVG) |
803 |
if pkg-config --atleast-version $REQUIRED_RSVG $PKG_RSVG; then |
if pkg-config --atleast-version $REQUIRED_RSVG $PKG_RSVG; then |
804 |
GTK_CONFIG="pkg-config $PKG_GTK $PKG_RSVG" |
GTK_CONFIG="pkg-config $PKG_GTK $PKG_RSVG" |
|
BUILD_NEWGUI=no |
|
805 |
REQUIRED_LABLGTK=2.4.0 |
REQUIRED_LABLGTK=2.4.0 |
806 |
LABLGTK_NAME=lablgtk2 |
LABLGTK_NAME=lablgtk2 |
807 |
AC_MSG_RESULT(yes) |
AC_MSG_RESULT(yes) |
846 |
else |
else |
847 |
AC_MSG_CHECKING(for native code $LABLGTK_NAME) |
AC_MSG_CHECKING(for native code $LABLGTK_NAME) |
848 |
if test -f `$OCAMLC -where`/$LABLGTK_NAME/lablgtk.$OCAMLLIB_EXT; then |
if test -f `$OCAMLC -where`/$LABLGTK_NAME/lablgtk.$OCAMLLIB_EXT; then |
849 |
if test "$USE_GTK2" = "yes"; then |
if test "$GUI" = "newgui2"; then |
850 |
if test -f `$OCAMLC -where`/$LABLGTK_NAME/lablrsvg.$OCAMLLIB_EXT; then |
if test -f `$OCAMLC -where`/$LABLGTK_NAME/lablrsvg.$OCAMLLIB_EXT; then |
851 |
AC_MSG_RESULT(yes) |
AC_MSG_RESULT(yes) |
852 |
LABLGTK_CONFIG=yes |
LABLGTK_CONFIG=yes |
904 |
export PATH |
export PATH |
905 |
echo $PATH |
echo $PATH |
906 |
|
|
907 |
if test "$USE_GTK2" = "yes"; then |
if test "$GUI" = "newgui2"; then |
908 |
$GNU_MAKE configure --with-rsvg |
$GNU_MAKE configure --with-rsvg |
909 |
$GNU_MAKE world |
$GNU_MAKE world |
910 |
$GNU_MAKE install |
$GNU_MAKE install |
932 |
fi |
fi |
933 |
fi |
fi |
934 |
|
|
935 |
if test "$USE_GTK2" = "yes" ; then |
if test "$GUI" = "newgui2" ; then |
|
GTK=gtk2 |
|
936 |
GUIS="mldonkey_gui\$(EXE)" |
GUIS="mldonkey_gui\$(EXE)" |
937 |
GTKCFLAGS="`pkg-config --cflags-only-I gtk+-2.0`" |
GTKCFLAGS="`pkg-config --cflags-only-I gtk+-2.0`" |
938 |
GTKLLIBS="`pkg-config --libs-only-L gtk+-2.0`" |
GTKLLIBS="`pkg-config --libs-only-L gtk+-2.0`" |
939 |
GTKLFLAGS="`pkg-config --libs-only-l gtk+-2.0`" |
GTKLFLAGS="`pkg-config --libs-only-l gtk+-2.0`" |
940 |
else |
else |
|
GTK=gtk |
|
941 |
GUIS="mldonkey_gui\$(EXE) mldonkey_gui2\$(EXE) mlchat\$(EXE)" |
GUIS="mldonkey_gui\$(EXE) mldonkey_gui2\$(EXE) mlchat\$(EXE)" |
942 |
fi |
fi |
943 |
|
|
995 |
if test "$LABLGTK_CONFIG" = "no"; then |
if test "$LABLGTK_CONFIG" = "no"; then |
996 |
AC_MSG_RESULT(no) |
AC_MSG_RESULT(no) |
997 |
BAD_TARGETS="$BAD_TARGETS $GUIS" |
BAD_TARGETS="$BAD_TARGETS $GUIS" |
|
COMPILE_GUI=no |
|
998 |
RELEASENAME="$RELEASENAME-nogui" |
RELEASENAME="$RELEASENAME-nogui" |
999 |
|
GUI="no" |
1000 |
else |
else |
1001 |
MORE_TARGETS="$MORE_TARGETS $GUIS" |
MORE_TARGETS="$MORE_TARGETS $GUIS" |
|
COMPILE_GUI=yes |
|
1002 |
AC_MSG_RESULT(yes) |
AC_MSG_RESULT(yes) |
1003 |
if test "$BUILD_NEWGUI" = "yes"; then |
GTK=gtk |
1004 |
|
if test "$GUI" = "newgui1"; then |
1005 |
echo "compiling newgui" |
echo "compiling newgui" |
1006 |
else |
else |
1007 |
if test "$USE_GTK2" = "yes"; then |
if test "$GUI" = "newgui2"; then |
1008 |
echo "compiling gtk2 gui" |
echo "compiling gtk2 gui" |
1009 |
|
GTK=gtk2 |
1010 |
else |
else |
1011 |
echo "compiling oldgui" |
echo "compiling oldgui" |
1012 |
fi |
fi |
1198 |
|
|
1199 |
AC_SUBST(JABBR) |
AC_SUBST(JABBR) |
1200 |
|
|
|
AC_SUBST(BUILD_NEWGUI) |
|
|
|
|
1201 |
AC_SUBST(SUPERNODES) |
AC_SUBST(SUPERNODES) |
1202 |
|
|
1203 |
AC_SUBST(COMPILE_GUI) |
AC_SUBST(GUI) |
1204 |
AC_SUBST(REQUIRED_OCAML) |
AC_SUBST(REQUIRED_OCAML) |
1205 |
AC_SUBST(REQUIRED_LABLGTK) |
AC_SUBST(REQUIRED_LABLGTK) |
1206 |
AC_SUBST(ARCH) |
AC_SUBST(ARCH) |
1220 |
AC_SUBST(RPMBUILD) |
AC_SUBST(RPMBUILD) |
1221 |
|
|
1222 |
AC_SUBST(TMK) |
AC_SUBST(TMK) |
|
AC_SUBST(GTK) |
|
|
AC_SUBST(USE_GTK2) |
|
1223 |
AC_SUBST(GTKCFLAGS) |
AC_SUBST(GTKCFLAGS) |
1224 |
AC_SUBST(GTKLLIBS) |
AC_SUBST(GTKLLIBS) |
1225 |
AC_SUBST(GTKLFLAGS) |
AC_SUBST(GTKLFLAGS) |