~armagetronad-dev/armagetronad/0.4-armagetronad-fortress_ai

« back to all changes in this revision

Viewing changes to configure.ac

  • Committer: Manuel Moos
  • Date: 2010-08-07 21:08:56 UTC
  • mfrom: (2341.1.89 trunk)
  • Revision ID: z-man@users.sf.net-20100807210856-fcyd8v8a36nd9uoq
MergingĀ fromĀ mainline.

Show diffs side-by-side

added added

removed removed

Lines of Context:
650
650
CPPFLAGS="$CPPFLAGS `$XML2_CONFIG --cflags`"
651
651
LIBS="`$XML2_CONFIG --libs` $LIBS"
652
652
AC_DEFINE(HAVE_LIBXML2, 1, [Define if you have the xml2 library (-lxml2).]),
653
 
AC_MSG_ERROR([You need the library xml2 to compile Armagetron. Read the file doc/install_linux.html.])
 
653
AC_MSG_ERROR([You need the library xml2 to compile ${progtitle}. Read the file doc/install_linux.html.])
654
654
,`$XML2_CONFIG --libs`)
655
655
 
656
656
AC_CHECK_FUNC(xmlParserInputBufferCreateFilenameDefault,
699
699
AC_LANG([C])
700
700
 
701
701
dnl check for library
702
 
AC_CHECK_LIB([protobuf],main,,
 
702
AC_CHECK_LIB([protobuf],_ZN6google8protobuf7MessageD2Ev,,
 
703
[
 
704
        AC_CHECK_LIB([protobuf],_ZN6google8protobuf7ClosureD2Ev,
 
705
                AC_MSG_WARN([[The library protobuf (Google Protobuf Buffers) has a broken dependency on library pthread on your system.]])
 
706
                AC_DEFINE_UNQUOTED(HAVE_LIBPROTOBUF)
 
707
                LIBS="-lprotobuf -lpthread $LIBS"
 
708
        ,
703
709
AC_MSG_ERROR([[The library protobuf (Google Protocol Buffers, http://code.google.com/p/protobuf/) is required, but was not found.]])
 
710
        ,[-lpthread]
 
711
        )
 
712
]
704
713
)
705
714
 
706
715
AC_LANG([C++])
771
780
 
772
781
AC_CHECK_FUNC(SDL_Init,
773
782
AC_DEFINE(HAVE_LIBSDL,,[Define if you have the library SDL]),
774
 
AC_MSG_ERROR([You need the library SDL to compile Armagetron. Read the file doc/install_linux.html.])
 
783
AC_MSG_ERROR([You need the library SDL to compile ${progtitle}. Read the file doc/install_linux.html.])
775
784
,)
776
785
 
777
786
dnl ***************** OPTIONAL STUFF AFTER THIS POINT **********************
805
814
fi
806
815
 
807
816
dnl *************************************************
 
817
dnl Winsock linking for cross-compilation. Not really supported.
 
818
dnl *************************************************
 
819
 
 
820
if test "`${SDL_CONFIG} --libs | grep windows`" ; then
 
821
        AC_CHECK_LIB(wsock32, connect)
 
822
fi
 
823
 
 
824
dnl *************************************************
808
825
dnl         GL
809
826
dnl *************************************************
810
827
 
814
831
 
815
832
AC_CHECK_LIB($SYS_GL_LIB, glVertex3f,,
816
833
 AC_MSG_RESULT([OpenGL not found. Maybe it needs X11 to compile? Checking that...])
817
 
 AC_CHECK_LIB(X11,main,
 
834
 AC_CHECK_LIB(X11,XOpenDisplay,
818
835
  LIBS="-lX11 -L/usr/X11R6/lib $LIBS"
819
836
  AC_DEFINE(HAVE_LIBX11, 1, [Define if you have the X11 library (-lX11).])
820
837
  ,
821
838
  AC_MSG_WARN([
822
839
  Standard X11 library needed by OpenGL not found.
823
840
  ]),-L/usr/X11R6/lib)
824
 
 AC_CHECK_LIB(Xext,main,-L/usr/X11R6/lib)
825
 
  AC_CHECK_LIB(Xt,main,-L/usr/X11R6/lib)
826
 
 AC_CHECK_LIB(Xi,main,-L/usr/X11R6/lib)
827
 
 AC_CHECK_LIB(Xmu,main,-L/usr/X11R6/lib)
 
841
 AC_CHECK_LIB(Xext,XextFindDisplay,-L/usr/X11R6/lib)
 
842
  AC_CHECK_LIB(Xt,XtFree,-L/usr/X11R6/lib)
 
843
 AC_CHECK_LIB(Xi,XOpenDevice,-L/usr/X11R6/lib)
 
844
 AC_CHECK_LIB(Xmu,XmuDrawLogo,-L/usr/X11R6/lib)
828
845
AC_CHECK_LIB($SYS_GL_LIB, glBegin,,AC_MSG_ERROR([
829
 
  You need Mesa or an OpenGL-System to compile Armagetron.
 
846
  You need Mesa or an OpenGL-System to compile ${progtitle}.
830
847
  Maybe your libGL needs the X libraries and your system does not
831
848
  find them? Read the file doc/install_linux.html.]),-L/usr/X11R6/lib)
832
849
)
846
863
dnl AC_CHECK_LIB($SYS_GLU_LIB, gluBuild2DMipmaps,,
847
864
AC_CHECK_LIB($SYS_GLU_LIB, gluBuild3DMipmaps,,
848
865
AC_MSG_ERROR([
849
 
You need GLU to compile Armagetron; it SHOULD have come with OpenGL.
 
866
You need GLU to compile ${progtitle}; it SHOULD have come with OpenGL.
850
867
Read the file doc/install_linux.html.]))
851
868
 
852
869
dnl *************************************************
956
973
dnl         Other Stuff
957
974
dnl *************************************************
958
975
 
959
 
dnl AC_CHECK_LIB(g++, main,,
 
976
dnl AC_CHECK_LIB(g++, cin,,
960
977
dnl AC_MSG_WARN([C++ standard library not found. You can ignore this warning on non-GNU-systems.]))
961
978
 
962
979
AC_LANG([C])
963
980
 
964
 
AC_CHECK_LIB(z, main,,
965
 
AC_MSG_ERROR([You need libz to compile Armagetron.]))
 
981
AC_CHECK_LIB(z, gzread,,
 
982
AC_MSG_ERROR([You need libz to compile ${progtitle}.]))
966
983
 
967
984
AC_MSG_CHECKING(whether libpng is installed)
968
985
if PNGLIBS=`libpng-config --libs`; then
972
989
CPPFLAGS="$CPPFLAGS `libpng-config --cflags`"
973
990
LIBS="$LIBS $PNGLIBS"
974
991
 
975
 
AC_CHECK_FUNC(png_check_sig,
 
992
AC_CHECK_FUNC(png_sig_cmp,
976
993
,
977
 
AC_MSG_ERROR([You need libpng to compile Armagetron.]))
 
994
AC_MSG_ERROR([You need libpng to compile ${progtitle}.]))
978
995
 
979
 
AC_CHECK_LIB(jpeg, main,,
 
996
AC_CHECK_LIB(jpeg, jpeg_read_header,,
980
997
        AC_MSG_WARN([
981
998
        libjpeg not found. Expect small graphical errors ( missing moviepack title screen ).]
982
999
        )
984
1001
 
985
1002
AC_CHECK_LIB(SDL_image, IMG_Load,,
986
1003
dnl AC_CHECK_LIB(IMG, main,,
987
 
AC_MSG_ERROR([You need the library SDL_image to compile Armagetron.]
 
1004
AC_MSG_ERROR([You need the library SDL_image to compile ${progtitle}.]
988
1005
dnl )
989
1006
))
990
1007
 
1024
1041
 
1025
1042
 
1026
1043
 
1027
 
dnl Replace `main' with a function in -lpthread:
1028
 
 
1029
1044
dnl Checks for header files.
1030
1045
AC_HEADER_STDC
1031
1046
AC_CHECK_HEADERS(unistd.h)