source: m4/ax_check_gl.m4@ 9fe36b

Action_Thermostats Add_AtomRandomPerturbation Add_FitFragmentPartialChargesAction Add_RotateAroundBondAction Add_SelectAtomByNameAction Added_ParseSaveFragmentResults AddingActions_SaveParseParticleParameters Adding_Graph_to_ChangeBondActions Adding_MD_integration_tests Adding_ParticleName_to_Atom Adding_StructOpt_integration_tests AtomFragments Automaking_mpqc_open AutomationFragmentation_failures Candidate_v1.5.4 Candidate_v1.6.0 Candidate_v1.6.1 ChangeBugEmailaddress ChangingTestPorts ChemicalSpaceEvaluator CombiningParticlePotentialParsing Combining_Subpackages Debian_Package_split Debian_package_split_molecuildergui_only Disabling_MemDebug Docu_Python_wait EmpiricalPotential_contain_HomologyGraph EmpiricalPotential_contain_HomologyGraph_documentation Enable_parallel_make_install Enhance_userguide Enhanced_StructuralOptimization Enhanced_StructuralOptimization_continued Example_ManyWaysToTranslateAtom Exclude_Hydrogens_annealWithBondGraph FitPartialCharges_GlobalError Fix_BoundInBox_CenterInBox_MoleculeActions Fix_ChargeSampling_PBC Fix_ChronosMutex Fix_FitPartialCharges Fix_FitPotential_needs_atomicnumbers Fix_ForceAnnealing Fix_IndependentFragmentGrids Fix_ParseParticles Fix_ParseParticles_split_forward_backward_Actions Fix_PopActions Fix_QtFragmentList_sorted_selection Fix_Restrictedkeyset_FragmentMolecule Fix_StatusMsg Fix_StepWorldTime_single_argument Fix_Verbose_Codepatterns Fix_fitting_potentials Fixes ForceAnnealing_goodresults ForceAnnealing_oldresults ForceAnnealing_tocheck ForceAnnealing_with_BondGraph ForceAnnealing_with_BondGraph_continued ForceAnnealing_with_BondGraph_continued_betteresults ForceAnnealing_with_BondGraph_contraction-expansion FragmentAction_writes_AtomFragments FragmentMolecule_checks_bonddegrees GeometryObjects Gui_Fixes Gui_displays_atomic_force_velocity ImplicitCharges IndependentFragmentGrids IndependentFragmentGrids_IndividualZeroInstances IndependentFragmentGrids_IntegrationTest IndependentFragmentGrids_Sole_NN_Calculation JobMarket_RobustOnKillsSegFaults JobMarket_StableWorkerPool JobMarket_unresolvable_hostname_fix MoreRobust_FragmentAutomation ODR_violation_mpqc_open PartialCharges_OrthogonalSummation PdbParser_setsAtomName PythonUI_with_named_parameters QtGui_reactivate_TimeChanged_changes Recreated_GuiChecks Rewrite_FitPartialCharges RotateToPrincipalAxisSystem_UndoRedo SaturateAtoms_findBestMatching SaturateAtoms_singleDegree StoppableMakroAction Subpackage_CodePatterns Subpackage_JobMarket Subpackage_LinearAlgebra Subpackage_levmar Subpackage_mpqc_open Subpackage_vmg Switchable_LogView ThirdParty_MPQC_rebuilt_buildsystem TrajectoryDependenant_MaxOrder TremoloParser_IncreasedPrecision TremoloParser_MultipleTimesteps TremoloParser_setsAtomName Ubuntu_1604_changes stable
Last change on this file since 9fe36b was cef1d7, checked in by Tillmann Crueger <crueger@…>, 15 years ago

Added basic structure for a GL-Visualization of molecules.

  • Property mode set to 100644
File size: 2.4 KB
Line 
1dnl Available from the GNU Autoconf Macro Archive at:
2dnl http://www.gnu.org/software/ac-archive/htmldoc/ax_check_gl.html
3dnl
4AC_DEFUN([AX_CHECK_GL],
5[AC_REQUIRE([AC_PATH_X])dnl
6AC_REQUIRE([ACX_PTHREAD])dnl
7
8#
9# There isn't a reliable way to know we should use the Apple OpenGL framework
10# without a configure option. A Mac OS X user may have installed an
11# alternative GL implementation (e.g., Mesa), which may or may not depend on X.
12#
13AC_ARG_WITH([apple-opengl-framework],
14 [AC_HELP_STRING([--with-apple-opengl-framework],
15 [use Apple OpenGL framework (Mac OS X only)])])
16if test "X$with_apple_opengl_framework" = "Xyes"; then
17 AC_DEFINE([HAVE_APPLE_OPENGL_FRAMEWORK], [1],
18 [Use the Apple OpenGL framework.])
19 GL_LIBS="-framework OpenGL"
20else
21 AC_LANG_PUSH(C)
22
23 AX_LANG_COMPILER_MS
24 if test X$ax_compiler_ms = Xno; then
25 GL_CFLAGS="${PTHREAD_CFLAGS}"
26 GL_CXXFLAGS="${PTHREAD_CXXFLAGS}"
27 GL_LIBS="${PTHREAD_LIBS} -lm"
28 fi
29
30 #
31 # Use x_includes and x_libraries if they have been set (presumably by
32 # AC_PATH_X).
33 #
34 if test "X$no_x" != "Xyes"; then
35 if test -n "$x_includes"; then
36 GL_CFLAGS="-I${x_includes} ${GL_CFLAGS}"
37 GL_CXXFLAGS="-I${x_includes} ${GL_CXXFLAGS}"
38 fi
39 if test -n "$x_libraries"; then
40 GL_LIBS="-L${x_libraries} -lX11 ${GL_LIBS}"
41 fi
42 fi
43
44 AC_CHECK_HEADERS([windows.h])
45
46 AC_CACHE_CHECK([for OpenGL library], [ax_cv_check_gl_libgl],
47 [ax_cv_check_gl_libgl="no"
48 ax_save_CPPFLAGS="${CPPFLAGS}"
49 CPPFLAGS="${GL_CFLAGS} ${CPPFLAGS}"
50 CXXFLAGS="${GL_CXXFLAGS} ${CXXFLAGS}"
51 ax_save_LIBS="${LIBS}"
52 LIBS=""
53 ax_check_libs="-lopengl32 -lGL"
54 for ax_lib in ${ax_check_libs}; do
55 if test X$ax_compiler_ms = Xyes; then
56 ax_try_lib=`echo $ax_lib | sed -e 's/^-l//' -e 's/$/.lib/'`
57 else
58 ax_try_lib="${ax_lib}"
59 fi
60 LIBS="${ax_try_lib} ${GL_LIBS} ${ax_save_LIBS}"
61 AC_LINK_IFELSE(
62 [AC_LANG_PROGRAM([[
63# if HAVE_WINDOWS_H && defined(_WIN32)
64# include <windows.h>
65# endif
66# include <GL/gl.h>]],
67 [[glBegin(0)]])],
68 [ax_cv_check_gl_libgl="${ax_try_lib}"; break])
69 done
70 LIBS=${ax_save_LIBS}
71 CPPFLAGS=${ax_save_CPPFLAGS}])
72
73 if test "X${ax_cv_check_gl_libgl}" = "Xno"; then
74 no_gl="yes"
75 GL_CFLAGS=""
76 GL_CXXFLAGS=""
77 GL_LIBS=""
78 else
79 GL_LIBS="${ax_cv_check_gl_libgl} ${GL_LIBS}"
80 fi
81 AC_LANG_POP(C)
82fi
83
84AC_SUBST([GL_CFLAGS])
85AC_SUBST([GL_CXXFLAGS])
86AC_SUBST([GL_LIBS])
87])dnl
Note: See TracBrowser for help on using the repository browser.