From f364173fddc1c5ab68e2d642d720fb2e98fb0077 Mon Sep 17 00:00:00 2001 From: mark Date: Tue, 22 Apr 2014 21:11:02 +0000 Subject: [PATCH] [nggb] Activate!! Replace Unix build scripts with the 'nextgen' versions. Remove old build scripts. See doc/how-to-build.md for information on the new scripts. git-svn-id: https://valelab.ucsf.edu/svn/micromanager2/trunk@13210 d0ab736e-dc22-4aeb-8dc9-08def0aa14fd --- DeviceAdapters/AAAOTF/Makefile.am | 16 +- DeviceAdapters/AOTF/Makefile.am | 1 + DeviceAdapters/ASIFW1000/Makefile.am | 16 +- DeviceAdapters/ASIStage/Makefile.am | 16 +- DeviceAdapters/ASITiger/Makefile.am | 60 +-- DeviceAdapters/ASIWPTR/Makefile.am | 16 +- DeviceAdapters/Aladdin/Makefile.am | 2 +- DeviceAdapters/Andor/Makefile.am | 2 +- DeviceAdapters/AndorLaserCombiner/Makefile.am | 14 +- DeviceAdapters/AndorSDK3/Makefile.am | 16 +- DeviceAdapters/Aquinas/Makefile.am | 2 +- DeviceAdapters/Arduino/Makefile.am | 2 +- DeviceAdapters/CARVII/Makefile.am | 2 +- DeviceAdapters/CONEX/Makefile.am | 2 +- DeviceAdapters/CSUW1/Makefile.am | 16 +- DeviceAdapters/Cobolt/Makefile.am | 2 +- DeviceAdapters/CoherentCube/Makefile.am | 2 +- DeviceAdapters/Conix/Makefile.am | 2 +- DeviceAdapters/Corvus/Makefile.am | 2 +- DeviceAdapters/DTOpenLayer/Makefile.am | 1 + DeviceAdapters/DemoCamera/Makefile.am | 2 +- DeviceAdapters/FocalPoint/Makefile.am | 12 +- DeviceAdapters/FreeSerialPort/Makefile.am | 16 +- DeviceAdapters/HIDManager/Makefile.am | 14 +- DeviceAdapters/IDS_uEye/Makefile.am | 2 +- DeviceAdapters/IIDC/Makefile.am | 2 +- DeviceAdapters/ITC18/Makefile.am | 2 +- .../ImageProcessorChain/Makefile.am | 16 +- DeviceAdapters/K8055/Makefile.am | 2 +- DeviceAdapters/K8061/Makefile.am | 2 +- DeviceAdapters/LeicaDMI/Makefile.am | 2 +- DeviceAdapters/LeicaDMR/Makefile.am | 16 +- DeviceAdapters/LeicaDMSTC/Makefile.am | 2 +- DeviceAdapters/Ludl/Makefile.am | 2 +- DeviceAdapters/LudlLow/Makefile.am | 2 +- DeviceAdapters/LumencorSpectra/Makefile.am | 2 +- DeviceAdapters/MMDEVAPI.rules | 14 - DeviceAdapters/MP285/Makefile.am | 12 +- DeviceAdapters/MaestroServo/Makefile.am | 2 +- DeviceAdapters/Makefile.am | 101 +++- DeviceAdapters/Marzhauser-LStep/Makefile.am | 2 +- DeviceAdapters/Marzhauser/Makefile.am | 2 +- DeviceAdapters/MicroPoint/Makefile.am | 2 +- DeviceAdapters/Motic_mac/Makefile.am | 2 +- DeviceAdapters/Neos/Makefile.am | 2 +- DeviceAdapters/Nikon/Makefile.am | 2 +- DeviceAdapters/NikonTE2000/Makefile.am | 2 +- DeviceAdapters/Omicron/Makefile.am | 2 +- DeviceAdapters/OpenCVgrabber/Makefile.am | 14 +- DeviceAdapters/Oxxius/Makefile.am | 16 +- DeviceAdapters/PI/Makefile.am | 2 +- DeviceAdapters/PI_GCS/Makefile.am | 2 +- DeviceAdapters/PI_GCS_2/Makefile.am | 2 +- DeviceAdapters/PVCAM/Makefile.am | 18 +- DeviceAdapters/ParallelPort/Makefile.am | 1 + DeviceAdapters/Pecon/Makefile.am | 16 +- DeviceAdapters/Piezosystem_30DV50/Makefile.am | 2 +- .../Piezosystem_NV120_1/Makefile.am | 2 +- DeviceAdapters/Piezosystem_NV40_1/Makefile.am | 2 +- DeviceAdapters/Piezosystem_NV40_3/Makefile.am | 2 +- DeviceAdapters/Piezosystem_dDrive/Makefile.am | 2 +- DeviceAdapters/PrecisExcite/Makefile.am | 2 +- .../PrincetonInstruments/Makefile.am | 18 +- DeviceAdapters/Prior/Makefile.am | 2 +- DeviceAdapters/PriorLegacy/Makefile.am | 2 +- DeviceAdapters/QCam/Makefile.am | 18 +- DeviceAdapters/Sapphire/Makefile.am | 2 +- DeviceAdapters/Scientifica/Makefile.am | 2 +- DeviceAdapters/ScionCam/Makefile.am | 2 +- DeviceAdapters/Sensicam/Makefile.am | 2 +- DeviceAdapters/SerialManager/Makefile.am | 2 +- DeviceAdapters/SimpleAutofocus/Makefile.am | 12 +- DeviceAdapters/SimpleCam/Makefile.am | 78 +-- DeviceAdapters/SpectralLMM5/Makefile.am | 2 +- DeviceAdapters/Spot/Makefile.am | 14 +- DeviceAdapters/SutterLambda/Makefile.am | 2 +- DeviceAdapters/SutterStage/Makefile.am | 2 +- DeviceAdapters/Thorlabs/Makefile.am | 2 +- DeviceAdapters/ThorlabsDCxxxx/Makefile.am | 2 +- .../ThorlabsFilterWheel/Makefile.am | 2 +- DeviceAdapters/ThorlabsSC10/Makefile.am | 2 +- DeviceAdapters/Tofra/Makefile.am | 2 +- DeviceAdapters/USBManager/Makefile.am | 11 +- DeviceAdapters/Utilities/Makefile.am | 2 +- DeviceAdapters/VariLC/Makefile.am | 2 +- DeviceAdapters/Video4Linux/Makefile.am | 2 +- DeviceAdapters/Vincent/Makefile.am | 2 +- DeviceAdapters/Vortran/Makefile.am | 2 +- DeviceAdapters/XCite120PC_Exacte/Makefile.am | 2 +- DeviceAdapters/XCiteLed/Makefile.am | 2 +- DeviceAdapters/XLight/Makefile.am | 2 +- DeviceAdapters/Xcite/Makefile.am | 2 +- DeviceAdapters/Yokogawa/Makefile.am | 2 +- DeviceAdapters/Zaber/Makefile.am | 2 +- DeviceAdapters/ZeissCAN/Makefile.am | 2 +- DeviceAdapters/ZeissCAN29/Makefile.am | 2 +- DeviceAdapters/configure.ac | 466 +++++++++++++++++ DeviceAdapters/configure.in | 492 ------------------ DeviceAdapters/dc1394/Makefile.am | 10 +- DeviceAdapters/kdv/Makefile.am | 2 +- DeviceAdapters/nPoint/Makefile.am | 16 +- DeviceAdapters/pgFocus/Makefile.am | 2 +- DeviceKit/CoreTest/Makefile.am | 9 +- DeviceKit/DeviceTest/Makefile.am | 9 +- DeviceKit/LibraryTest/Makefile.am | 9 +- DeviceKit/configure.ac | 46 ++ DeviceKit/configure.in | 82 --- MMCore/Makefile.am | 77 ++- MMCoreJ_wrap/Makefile.am | 151 +++--- MMCorePy_wrap/Makefile.am | 87 ++-- MMCorePy_wrap/setup.py | 43 -- Makefile.am | 143 ++++- Test_Programs/configure.in | 51 -- acqEngine/Makefile.am | 14 +- autofocus/Makefile.am | 24 +- autogen.sh | 15 + bindist/Makefile.am | 3 + buildscripts/install_with_ImageJ_OSX.sh | 39 ++ buildscripts/launchers/micromanager.in | 45 ++ buildscripts/launchers/mmimagej.in | 21 + buildscripts/nightly/nightlybuild_OSX_mm.sh | 2 - configure.ac | 441 ++++++++++++++++ configure.common | 81 --- configure.in | 343 ------------ doc/how-to-build.md | 201 +++++++ m4/ax_opencv.m4 | 68 --- m4/mm_java.m4 | 141 +++++ m4/mm_lib_flags.m4 | 87 ++++ m4/mm_lib_ifelse.m4 | 145 ++++++ m4/mm_lib_set_flags_pkgconfig.m4 | 125 +++++ m4/mm_lib_simple.m4 | 118 +++++ m4/mm_libs.m4 | 96 ++++ m4/mm_optional_lib.m4 | 37 ++ m4/mm_python.m4 | 131 +++++ m4/mm_required_lib.m4 | 32 ++ mmUnixBuild.sh | 36 +- mmstudio/Makefile.am | 46 +- plugins/Makefile.am | 112 ++-- scripts/Makefile.am | 16 +- 139 files changed, 3046 insertions(+), 1791 deletions(-) mode change 100755 => 100644 DeviceAdapters/CSUW1/Makefile.am mode change 100755 => 100644 DeviceAdapters/HIDManager/Makefile.am delete mode 100644 DeviceAdapters/MMDEVAPI.rules mode change 100755 => 100644 DeviceAdapters/USBManager/Makefile.am create mode 100644 DeviceAdapters/configure.ac delete mode 100644 DeviceAdapters/configure.in mode change 100755 => 100644 DeviceAdapters/nPoint/Makefile.am create mode 100644 DeviceKit/configure.ac delete mode 100644 DeviceKit/configure.in delete mode 100644 MMCorePy_wrap/setup.py mode change 100755 => 100644 Makefile.am delete mode 100644 Test_Programs/configure.in create mode 100755 autogen.sh create mode 100644 bindist/Makefile.am create mode 100755 buildscripts/install_with_ImageJ_OSX.sh create mode 100644 buildscripts/launchers/micromanager.in create mode 100644 buildscripts/launchers/mmimagej.in create mode 100644 configure.ac delete mode 100644 configure.common delete mode 100755 configure.in create mode 100644 doc/how-to-build.md delete mode 100644 m4/ax_opencv.m4 create mode 100644 m4/mm_java.m4 create mode 100644 m4/mm_lib_flags.m4 create mode 100644 m4/mm_lib_ifelse.m4 create mode 100644 m4/mm_lib_set_flags_pkgconfig.m4 create mode 100644 m4/mm_lib_simple.m4 create mode 100644 m4/mm_libs.m4 create mode 100644 m4/mm_optional_lib.m4 create mode 100644 m4/mm_python.m4 create mode 100644 m4/mm_required_lib.m4 diff --git a/DeviceAdapters/AAAOTF/Makefile.am b/DeviceAdapters/AAAOTF/Makefile.am index eec0f4b569..4062b7454c 100644 --- a/DeviceAdapters/AAAOTF/Makefile.am +++ b/DeviceAdapters/AAAOTF/Makefile.am @@ -1,8 +1,8 @@ -pkglibdir = $(DEVICEADAPTERPATH) -AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive -pkglib_LTLIBRARIES = libmmgr_dal_AAAOTF.la -libmmgr_dal_AAAOTF_la_SOURCES = AAAOTF.cpp AAAOTF.h -libmmgr_dal_AAAOTF_la_LIBADD = $(MMDEVAPI_LIBADD) -libmmgr_dal_AAAOTF_la_LDFLAGS = $(MMDEVAPI_LDFLAGS) - -EXTRA_DIST = AAAOTF.vcproj license.txt + +AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive +pkglib_LTLIBRARIES = libmmgr_dal_AAAOTF.la +libmmgr_dal_AAAOTF_la_SOURCES = AAAOTF.cpp AAAOTF.h +libmmgr_dal_AAAOTF_la_LIBADD = $(MMDEVAPI_LIBADD) +libmmgr_dal_AAAOTF_la_LDFLAGS = $(MMDEVAPI_LDFLAGS) + +EXTRA_DIST = AAAOTF.vcproj license.txt diff --git a/DeviceAdapters/AOTF/Makefile.am b/DeviceAdapters/AOTF/Makefile.am index 7d6f7a8b0b..cfdb713824 100644 --- a/DeviceAdapters/AOTF/Makefile.am +++ b/DeviceAdapters/AOTF/Makefile.am @@ -1 +1,2 @@ + EXTRA_DIST = license.txt AOTF.vcproj AOTF.cpp AOTF.h diff --git a/DeviceAdapters/ASIFW1000/Makefile.am b/DeviceAdapters/ASIFW1000/Makefile.am index e09f29a0c8..74acf2a0dd 100644 --- a/DeviceAdapters/ASIFW1000/Makefile.am +++ b/DeviceAdapters/ASIFW1000/Makefile.am @@ -1,8 +1,8 @@ -pkglibdir = $(DEVICEADAPTERPATH) -AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive -pkglib_LTLIBRARIES = libmmgr_dal_ASIFW1000.la -libmmgr_dal_ASIFW1000_la_SOURCES = ASIFW1000.cpp ASIFW1000.h ASIFW1000Hub.cpp ASIFW1000Hub.h -libmmgr_dal_ASIFW1000_la_LIBADD = $(MMDEVAPI_LIBADD) -libmmgr_dal_ASIFW1000_la_LDFLAGS = $(MMDEVAPI_LDFLAGS) - -EXTRA_DIST = ASIFW1000.vcproj license.txt + +AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive +pkglib_LTLIBRARIES = libmmgr_dal_ASIFW1000.la +libmmgr_dal_ASIFW1000_la_SOURCES = ASIFW1000.cpp ASIFW1000.h ASIFW1000Hub.cpp ASIFW1000Hub.h +libmmgr_dal_ASIFW1000_la_LIBADD = $(MMDEVAPI_LIBADD) +libmmgr_dal_ASIFW1000_la_LDFLAGS = $(MMDEVAPI_LDFLAGS) + +EXTRA_DIST = ASIFW1000.vcproj license.txt diff --git a/DeviceAdapters/ASIStage/Makefile.am b/DeviceAdapters/ASIStage/Makefile.am index 700ee9db48..ef617377b1 100644 --- a/DeviceAdapters/ASIStage/Makefile.am +++ b/DeviceAdapters/ASIStage/Makefile.am @@ -1,8 +1,8 @@ -pkglibdir = $(DEVICEADAPTERPATH) -AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive -pkglib_LTLIBRARIES = libmmgr_dal_ASIStage.la -libmmgr_dal_ASIStage_la_SOURCES = ASIStage.cpp ASIStage.h h -libmmgr_dal_ASIStage_la_LIBADD = $(MMDEVAPI_LIBADD) -libmmgr_dal_ASIStage_la_LDFLAGS = $(MMDEVAPI_LDFLAGS) - -EXTRA_DIST = ASIStage.vcproj license.txt + +AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive +pkglib_LTLIBRARIES = libmmgr_dal_ASIStage.la +libmmgr_dal_ASIStage_la_SOURCES = ASIStage.cpp ASIStage.h h +libmmgr_dal_ASIStage_la_LIBADD = $(MMDEVAPI_LIBADD) +libmmgr_dal_ASIStage_la_LDFLAGS = $(MMDEVAPI_LDFLAGS) + +EXTRA_DIST = ASIStage.vcproj license.txt diff --git a/DeviceAdapters/ASITiger/Makefile.am b/DeviceAdapters/ASITiger/Makefile.am index 2af2982380..32e65c5ef8 100644 --- a/DeviceAdapters/ASITiger/Makefile.am +++ b/DeviceAdapters/ASITiger/Makefile.am @@ -1,30 +1,30 @@ -pkglibdir = $(DEVICEADAPTERPATH) -AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive -pkglib_LTLIBRARIES = libmmgr_dal_ASITiger.la -libmmgr_dal_ASITiger_la_SOURCES = \ - ASICRISP.cpp \ - ASICRISP.h \ - ASIClocked.cpp \ - ASIClocked.h \ - ASIDevice.cpp \ - ASIDevice.h \ - ASIFWheel.cpp \ - ASIFWheel.h \ - ASIHub.cpp \ - ASIHub.h \ - ASIPiezo.cpp \ - ASIPiezo.h \ - ASIScanner.cpp \ - ASIScanner.h \ - ASITiger.cpp \ - ASITiger.h \ - ASITigerComm.cpp \ - ASITigerComm.h \ - ASIXYStage.cpp \ - ASIXYStage.h \ - ASIZStage.cpp \ - ASIZStage.h -libmmgr_dal_ASITiger_la_LIBADD = $(MMDEVAPI_LIBADD) -libmmgr_dal_ASITiger_la_LDFLAGS = $(MMDEVAPI_LDFLAGS) - -EXTRA_DIST = ASITiger.vcproj license.txt + +AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive +pkglib_LTLIBRARIES = libmmgr_dal_ASITiger.la +libmmgr_dal_ASITiger_la_SOURCES = \ + ASICRISP.cpp \ + ASICRISP.h \ + ASIClocked.cpp \ + ASIClocked.h \ + ASIDevice.cpp \ + ASIDevice.h \ + ASIFWheel.cpp \ + ASIFWheel.h \ + ASIHub.cpp \ + ASIHub.h \ + ASIPiezo.cpp \ + ASIPiezo.h \ + ASIScanner.cpp \ + ASIScanner.h \ + ASITiger.cpp \ + ASITiger.h \ + ASITigerComm.cpp \ + ASITigerComm.h \ + ASIXYStage.cpp \ + ASIXYStage.h \ + ASIZStage.cpp \ + ASIZStage.h +libmmgr_dal_ASITiger_la_LIBADD = $(MMDEVAPI_LIBADD) +libmmgr_dal_ASITiger_la_LDFLAGS = $(MMDEVAPI_LDFLAGS) + +EXTRA_DIST = ASITiger.vcproj license.txt diff --git a/DeviceAdapters/ASIWPTR/Makefile.am b/DeviceAdapters/ASIWPTR/Makefile.am index 590d6e3e73..f73cd21116 100644 --- a/DeviceAdapters/ASIWPTR/Makefile.am +++ b/DeviceAdapters/ASIWPTR/Makefile.am @@ -1,8 +1,8 @@ -pkglibdir = $(DEVICEADAPTERPATH) -AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive -pkglib_LTLIBRARIES = libmmgr_dal_ASIWPTR.la -libmmgr_dal_ASIWPTR_la_SOURCES = wptr.cpp wptr.h h -libmmgr_dal_ASIWPTR_la_LIBADD = $(MMDEVAPI_LIBADD) -libmmgr_dal_ASIWPTR_la_LDFLAGS = $(MMDEVAPI_LDFLAGS) - -EXTRA_DIST = ASIWPTR.vcproj license.txt + +AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive +pkglib_LTLIBRARIES = libmmgr_dal_ASIWPTR.la +libmmgr_dal_ASIWPTR_la_SOURCES = wptr.cpp wptr.h h +libmmgr_dal_ASIWPTR_la_LIBADD = $(MMDEVAPI_LIBADD) +libmmgr_dal_ASIWPTR_la_LDFLAGS = $(MMDEVAPI_LDFLAGS) + +EXTRA_DIST = ASIWPTR.vcproj license.txt diff --git a/DeviceAdapters/Aladdin/Makefile.am b/DeviceAdapters/Aladdin/Makefile.am index 7400e0ecab..bd66273bdf 100644 --- a/DeviceAdapters/Aladdin/Makefile.am +++ b/DeviceAdapters/Aladdin/Makefile.am @@ -1,4 +1,4 @@ -pkglibdir = $(DEVICEADAPTERPATH) + AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive pkglib_LTLIBRARIES = libmmgr_dal_Aladdin.la libmmgr_dal_Aladdin_la_SOURCES = Aladdin.cpp Aladdin.h diff --git a/DeviceAdapters/Andor/Makefile.am b/DeviceAdapters/Andor/Makefile.am index 886481ea55..4055b66283 100644 --- a/DeviceAdapters/Andor/Makefile.am +++ b/DeviceAdapters/Andor/Makefile.am @@ -1,4 +1,4 @@ -pkglibdir = $(DEVICEADAPTERPATH) + AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive pkglib_LTLIBRARIES = libmmgr_dal_Andor.la libmmgr_dal_Andor_la_SOURCES = Andor.cpp Andor.h diff --git a/DeviceAdapters/AndorLaserCombiner/Makefile.am b/DeviceAdapters/AndorLaserCombiner/Makefile.am index 3de509749c..ee8e2c41a8 100644 --- a/DeviceAdapters/AndorLaserCombiner/Makefile.am +++ b/DeviceAdapters/AndorLaserCombiner/Makefile.am @@ -1,7 +1,7 @@ -pkglibdir = $(DEVICEADAPTERPATH) -AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive -pkglib_LTLIBRARIES = libmmgr_dal_AndorLaserCombiner.la -libmmgr_dal_AndorLaserCombiner_la_SOURCES = AndorLaserCombiner.cpp AndorLaserCombiner.h \ - ../../MMDevice/MMDevice.h ../../MMDevice/DeviceBase.h -libmmgr_dal_AndorLaserCombiner_la_LIBADD = $(MMDEVAPI_LIBADD) -libmmgr_dal_AndorLaserCombiner_la_LDFLAGS = $(MMDEVAPI_LDFLAGS) + +AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive +pkglib_LTLIBRARIES = libmmgr_dal_AndorLaserCombiner.la +libmmgr_dal_AndorLaserCombiner_la_SOURCES = AndorLaserCombiner.cpp AndorLaserCombiner.h \ + ../../MMDevice/MMDevice.h ../../MMDevice/DeviceBase.h +libmmgr_dal_AndorLaserCombiner_la_LIBADD = $(MMDEVAPI_LIBADD) +libmmgr_dal_AndorLaserCombiner_la_LDFLAGS = $(MMDEVAPI_LDFLAGS) diff --git a/DeviceAdapters/AndorSDK3/Makefile.am b/DeviceAdapters/AndorSDK3/Makefile.am index 1e19b8245f..62619a793e 100644 --- a/DeviceAdapters/AndorSDK3/Makefile.am +++ b/DeviceAdapters/AndorSDK3/Makefile.am @@ -1,8 +1,8 @@ -pkglibdir = $(DEVICEADAPTERPATH) -AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive $(BOOST_CPPFLAGS) -pkglib_LTLIBRARIES = libmmgr_dal_DemoCamera.la -libmmgr_dal_DemoCamera_la_SOURCES = DemoCamera.cpp DemoCamera.h ../../MMDevice/MMDevice.h -libmmgr_dal_DemoCamera_la_LDFLAGS = $(MMDEVAPI_LDFLAGS) -libmmgr_dal_DemoCamera_la_LIBADD = $(MMDEVAPI_LIBADD) - -EXTRA_DIST = DemoCamera.vcproj license.txt + +AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive $(BOOST_CPPFLAGS) +pkglib_LTLIBRARIES = libmmgr_dal_DemoCamera.la +libmmgr_dal_DemoCamera_la_SOURCES = DemoCamera.cpp DemoCamera.h ../../MMDevice/MMDevice.h +libmmgr_dal_DemoCamera_la_LDFLAGS = $(MMDEVAPI_LDFLAGS) +libmmgr_dal_DemoCamera_la_LIBADD = $(MMDEVAPI_LIBADD) + +EXTRA_DIST = DemoCamera.vcproj license.txt diff --git a/DeviceAdapters/Aquinas/Makefile.am b/DeviceAdapters/Aquinas/Makefile.am index 4a8cf304cf..adb78463e8 100644 --- a/DeviceAdapters/Aquinas/Makefile.am +++ b/DeviceAdapters/Aquinas/Makefile.am @@ -1,4 +1,4 @@ -pkglibdir = $(DEVICEADAPTERPATH) + AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive pkglib_LTLIBRARIES = libmmgr_dal_Aquinas.la libmmgr_dal_Aquinas_la_SOURCES = Aquinas.cpp Aquinas.h \ diff --git a/DeviceAdapters/Arduino/Makefile.am b/DeviceAdapters/Arduino/Makefile.am index 9bf7e1c74c..2a070e4a0e 100644 --- a/DeviceAdapters/Arduino/Makefile.am +++ b/DeviceAdapters/Arduino/Makefile.am @@ -1,4 +1,4 @@ -pkglibdir = $(DEVICEADAPTERPATH) + AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive pkglib_LTLIBRARIES = libmmgr_dal_Arduino.la libmmgr_dal_Arduino_la_SOURCES = Arduino.cpp Arduino.h \ diff --git a/DeviceAdapters/CARVII/Makefile.am b/DeviceAdapters/CARVII/Makefile.am index 23b8b9ad95..fd501b6eaa 100644 --- a/DeviceAdapters/CARVII/Makefile.am +++ b/DeviceAdapters/CARVII/Makefile.am @@ -1,4 +1,4 @@ -pkglibdir = $(DEVICEADAPTERPATH) + AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive pkglib_LTLIBRARIES = libmmgr_dal_CARVII.la libmmgr_dal_CARVII_la_SOURCES = CARVII.cpp CARVII.h CARVIIHub.h CARVIIHub.cpp ../../MMDevice/MMDevice.h ../../MMDevice/DeviceBase.h ../../MMDevice/ModuleInterface.h diff --git a/DeviceAdapters/CONEX/Makefile.am b/DeviceAdapters/CONEX/Makefile.am index 2977ba3f0a..98f0f6a68e 100644 --- a/DeviceAdapters/CONEX/Makefile.am +++ b/DeviceAdapters/CONEX/Makefile.am @@ -1,4 +1,4 @@ -pkglibdir = $(DEVICEADAPTERPATH) + AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive pkglib_LTLIBRARIES = libmmgr_dal_CONEX.la libmmgr_dal_CONEX_la_SOURCES = Conex_Axis.h Conex_Axis.cpp diff --git a/DeviceAdapters/CSUW1/Makefile.am b/DeviceAdapters/CSUW1/Makefile.am old mode 100755 new mode 100644 index 15d234ea93..b944101ad1 --- a/DeviceAdapters/CSUW1/Makefile.am +++ b/DeviceAdapters/CSUW1/Makefile.am @@ -1,8 +1,8 @@ -pkglibdir = $(DEVICEADAPTERPATH) -AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive -pkglib_LTLIBRARIES = libmmgr_dal_CSUW1.la -libmmgr_dal_CSUW1_la_SOURCES = CSUW1.cpp CSUW1.h CSUW1Hub.cpp CSUW1Hub.h -libmmgr_dal_CSUW1_la_LIBADD = $(MMDEVAPI_LIBADD) -libmmgr_dal_CSUW1_la_LDFLAGS = $(MMDEVAPI_LDFLAGS) - -EXTRA_DIST = CSUW1.vcproj license.txt + +AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive +pkglib_LTLIBRARIES = libmmgr_dal_CSUW1.la +libmmgr_dal_CSUW1_la_SOURCES = CSUW1.cpp CSUW1.h CSUW1Hub.cpp CSUW1Hub.h +libmmgr_dal_CSUW1_la_LIBADD = $(MMDEVAPI_LIBADD) +libmmgr_dal_CSUW1_la_LDFLAGS = $(MMDEVAPI_LDFLAGS) + +EXTRA_DIST = CSUW1.vcproj license.txt diff --git a/DeviceAdapters/Cobolt/Makefile.am b/DeviceAdapters/Cobolt/Makefile.am index c864ad1f87..d2975138f6 100644 --- a/DeviceAdapters/Cobolt/Makefile.am +++ b/DeviceAdapters/Cobolt/Makefile.am @@ -1,4 +1,4 @@ -pkglibdir = $(DEVICEADAPTERPATH) + AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive pkglib_LTLIBRARIES = libmmgr_dal_Cobolt.la libmmgr_dal_Cobolt_la_SOURCES = Cobolt.cpp Cobolt.h \ diff --git a/DeviceAdapters/CoherentCube/Makefile.am b/DeviceAdapters/CoherentCube/Makefile.am index 1e84c3c429..b71cffa0cf 100644 --- a/DeviceAdapters/CoherentCube/Makefile.am +++ b/DeviceAdapters/CoherentCube/Makefile.am @@ -1,4 +1,4 @@ -pkglibdir = $(DEVICEADAPTERPATH) + AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive pkglib_LTLIBRARIES = libmmgr_dal_CoherentCube.la libmmgr_dal_CoherentCube_la_SOURCES = CoherentCube.cpp CoherentCube.h \ diff --git a/DeviceAdapters/Conix/Makefile.am b/DeviceAdapters/Conix/Makefile.am index e4ab3d651b..54db4707fc 100644 --- a/DeviceAdapters/Conix/Makefile.am +++ b/DeviceAdapters/Conix/Makefile.am @@ -1,4 +1,4 @@ -pkglibdir = $(DEVICEADAPTERPATH) + AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive pkglib_LTLIBRARIES = libmmgr_dal_Conix.la libmmgr_dal_Conix_la_SOURCES = Conix.cpp Conix.h diff --git a/DeviceAdapters/Corvus/Makefile.am b/DeviceAdapters/Corvus/Makefile.am index 0a79548a5d..800050c49e 100644 --- a/DeviceAdapters/Corvus/Makefile.am +++ b/DeviceAdapters/Corvus/Makefile.am @@ -1,4 +1,4 @@ -pkglibdir = $(DEVICEADAPTERPATH) + AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive pkglib_LTLIBRARIES = libmmgr_dal_Corvus.la libmmgr_dal_Corvus_la_SOURCES = Corvus.cpp Corvus.h diff --git a/DeviceAdapters/DTOpenLayer/Makefile.am b/DeviceAdapters/DTOpenLayer/Makefile.am index 0657caabfe..e62440483c 100644 --- a/DeviceAdapters/DTOpenLayer/Makefile.am +++ b/DeviceAdapters/DTOpenLayer/Makefile.am @@ -1 +1,2 @@ + EXTRA_DIST = DTOpenLayer.vcproj license.txt DTOpenLayer.cpp DTOpenLayer.h diff --git a/DeviceAdapters/DemoCamera/Makefile.am b/DeviceAdapters/DemoCamera/Makefile.am index 710d4aadef..62619a793e 100644 --- a/DeviceAdapters/DemoCamera/Makefile.am +++ b/DeviceAdapters/DemoCamera/Makefile.am @@ -1,4 +1,4 @@ -pkglibdir = $(DEVICEADAPTERPATH) + AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive $(BOOST_CPPFLAGS) pkglib_LTLIBRARIES = libmmgr_dal_DemoCamera.la libmmgr_dal_DemoCamera_la_SOURCES = DemoCamera.cpp DemoCamera.h ../../MMDevice/MMDevice.h diff --git a/DeviceAdapters/FocalPoint/Makefile.am b/DeviceAdapters/FocalPoint/Makefile.am index 5f3dc4139c..0f899b128d 100644 --- a/DeviceAdapters/FocalPoint/Makefile.am +++ b/DeviceAdapters/FocalPoint/Makefile.am @@ -1,6 +1,6 @@ -pkglibdir = $(DEVICEADAPTERPATH) -AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive -pkglib_LTLIBRARIES = libmmgr_dal_FocalPoint.la -libmmgr_dal_FocalPoint_la_SOURCES = FocalPoint.cpp FocalPoint.h h -libmmgr_dal_FocalPoint_la_LIBADD = $(MMDEVAPI_LIBADD) -libmmgr_dal_FocalPoint_la_LDFLAGS = $(MMDEVAPI_LDFLAGS) + +AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive +pkglib_LTLIBRARIES = libmmgr_dal_FocalPoint.la +libmmgr_dal_FocalPoint_la_SOURCES = FocalPoint.cpp FocalPoint.h h +libmmgr_dal_FocalPoint_la_LIBADD = $(MMDEVAPI_LIBADD) +libmmgr_dal_FocalPoint_la_LDFLAGS = $(MMDEVAPI_LDFLAGS) diff --git a/DeviceAdapters/FreeSerialPort/Makefile.am b/DeviceAdapters/FreeSerialPort/Makefile.am index c86db015ed..a27ca31e50 100644 --- a/DeviceAdapters/FreeSerialPort/Makefile.am +++ b/DeviceAdapters/FreeSerialPort/Makefile.am @@ -1,8 +1,8 @@ -pkglibdir = $(DEVICEADAPTERPATH) -AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive $(BOOST_CPPFLAGS) -pkglib_LTLIBRARIES = libmmgr_dal_FreeSerialPort.la -libmmgr_dal_FreeSerialPort_la_SOURCES = FreeSerialPort.cpp FreeSerialPort.h -libmmgr_dal_FreeSerialPort_la_LIBADD = $(MMDEVAPI_LIBADD) -libmmgr_dal_FreeSerialPort_la_LDFLAGS = $(MMDEVAPI_LDFLAGS) - -EXTRA_DIST = license.txt + +AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive $(BOOST_CPPFLAGS) +pkglib_LTLIBRARIES = libmmgr_dal_FreeSerialPort.la +libmmgr_dal_FreeSerialPort_la_SOURCES = FreeSerialPort.cpp FreeSerialPort.h +libmmgr_dal_FreeSerialPort_la_LIBADD = $(MMDEVAPI_LIBADD) +libmmgr_dal_FreeSerialPort_la_LDFLAGS = $(MMDEVAPI_LDFLAGS) + +EXTRA_DIST = license.txt diff --git a/DeviceAdapters/HIDManager/Makefile.am b/DeviceAdapters/HIDManager/Makefile.am old mode 100755 new mode 100644 index 9d63afcbb2..80ee9151f0 --- a/DeviceAdapters/HIDManager/Makefile.am +++ b/DeviceAdapters/HIDManager/Makefile.am @@ -1,9 +1,11 @@ -pkglibdir = $(DEVICEADAPTERPATH) -AM_CFLAGS = -I$(HIDAPIINCDIR)/hidapi -AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -I$(HIDAPIINCDIR) -fpermissive + + +AM_CPPFLAGS = $(HIDAPI_CPPFLAGS) +AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) $(HIDAPI_CFLAGS) +AM_LDFLAGS = $(MMDEVAPI_LDFLAGS) $(HIDAPI_LDFLAGS) + pkglib_LTLIBRARIES = libmmgr_dal_HIDManager.la -libmmgr_dal_HIDManager_la_SOURCES = HIDManager.cpp HIDManager.h $(HIDAPICDIR)/hid.c -libmmgr_dal_HIDManager_la_LIBADD = $(MMDEVAPI_LIBADD) $(SERIALFRAMEWORKS) -libmmgr_dal_HIDManager_la_LDFLAGS = $(MMDEVAPI_LDFLAGS) +libmmgr_dal_HIDManager_la_SOURCES = HIDManager.cpp HIDManager.h +libmmgr_dal_HIDManager_la_LIBADD = $(MMDEVAPI_LIBADD) $(HIDAPI_LIBS) EXTRA_DIST = license.txt diff --git a/DeviceAdapters/IDS_uEye/Makefile.am b/DeviceAdapters/IDS_uEye/Makefile.am index 9af6817621..452c1a354a 100644 --- a/DeviceAdapters/IDS_uEye/Makefile.am +++ b/DeviceAdapters/IDS_uEye/Makefile.am @@ -1,4 +1,4 @@ -pkglibdir = $(DEVICEADAPTERPATH) + AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive UEYELIB = -lueye_api pkglib_LTLIBRARIES = libmmgr_dal_IDS_uEye.la diff --git a/DeviceAdapters/IIDC/Makefile.am b/DeviceAdapters/IIDC/Makefile.am index 65ac48084b..4c1cdc6652 100644 --- a/DeviceAdapters/IIDC/Makefile.am +++ b/DeviceAdapters/IIDC/Makefile.am @@ -1,4 +1,4 @@ -pkglibdir = $(DEVICEADAPTERPATH) + # To allow building with outdated versions of Boost (present by default on many # Linux distributions), use the older Boost.Thread interface, even though it diff --git a/DeviceAdapters/ITC18/Makefile.am b/DeviceAdapters/ITC18/Makefile.am index 60b3437a26..874d7ad0db 100644 --- a/DeviceAdapters/ITC18/Makefile.am +++ b/DeviceAdapters/ITC18/Makefile.am @@ -1,4 +1,4 @@ -pkglibdir = $(DEVICEADAPTERPATH) + AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive pkglib_LTLIBRARIES = libmmgr_dal_MMITC18.la libmmgr_dal_MMITC18_la_SOURCES = MMITC18.cpp MMITC18.h \ diff --git a/DeviceAdapters/ImageProcessorChain/Makefile.am b/DeviceAdapters/ImageProcessorChain/Makefile.am index f15f70c0bb..287799e52c 100644 --- a/DeviceAdapters/ImageProcessorChain/Makefile.am +++ b/DeviceAdapters/ImageProcessorChain/Makefile.am @@ -1,8 +1,8 @@ -pkglibdir = $(DEVICEADAPTERPATH) -AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive $(BOOST_CPPFLAGS) -pkglib_LTLIBRARIES = libmmgr_dal_ImageProcessorChain.la -libmmgr_dal_ImageProcessorChain_la_SOURCES = ImageProcessorChain.cpp ImageProcessorChain.h ../../MMDevice/MMDevice.h -libmmgr_dal_ImageProcessorChain_la_LDFLAGS = $(MMDEVAPI_LDFLAGS) -libmmgr_dal_ImageProcessorChain_la_LIBADD = $(MMDEVAPI_LIBADD) - -EXTRA_DIST = ImageProcessorChain.vcproj license.txt + +AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive $(BOOST_CPPFLAGS) +pkglib_LTLIBRARIES = libmmgr_dal_ImageProcessorChain.la +libmmgr_dal_ImageProcessorChain_la_SOURCES = ImageProcessorChain.cpp ImageProcessorChain.h ../../MMDevice/MMDevice.h +libmmgr_dal_ImageProcessorChain_la_LDFLAGS = $(MMDEVAPI_LDFLAGS) +libmmgr_dal_ImageProcessorChain_la_LIBADD = $(MMDEVAPI_LIBADD) + +EXTRA_DIST = ImageProcessorChain.vcproj license.txt diff --git a/DeviceAdapters/K8055/Makefile.am b/DeviceAdapters/K8055/Makefile.am index 40b0f67aa8..b3d5096f87 100644 --- a/DeviceAdapters/K8055/Makefile.am +++ b/DeviceAdapters/K8055/Makefile.am @@ -1,4 +1,4 @@ -pkglibdir = $(DEVICEADAPTERPATH) + AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive pkglib_LTLIBRARIES = libmmgr_dal_K8055.la libmmgr_dal_K8055_la_SOURCES = K8055.cpp K8055.h K8055Interface.h K8055Interface.cpp diff --git a/DeviceAdapters/K8061/Makefile.am b/DeviceAdapters/K8061/Makefile.am index a273c0b34b..65c1f8a5f7 100644 --- a/DeviceAdapters/K8061/Makefile.am +++ b/DeviceAdapters/K8061/Makefile.am @@ -1,4 +1,4 @@ -pkglibdir = $(DEVICEADAPTERPATH) + AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive pkglib_LTLIBRARIES = libmmgr_dal_K8061.la libmmgr_dal_K8061_la_SOURCES = K8061.cpp K8061.h K8061Interface.h K8061Interface.cpp \ diff --git a/DeviceAdapters/LeicaDMI/Makefile.am b/DeviceAdapters/LeicaDMI/Makefile.am index 1f32cb1cdd..69f1d8a96c 100644 --- a/DeviceAdapters/LeicaDMI/Makefile.am +++ b/DeviceAdapters/LeicaDMI/Makefile.am @@ -1,4 +1,4 @@ -pkglibdir = $(DEVICEADAPTERPATH) + AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive pkglib_LTLIBRARIES = libmmgr_dal_LeicaDMI.la libmmgr_dal_LeicaDMI_la_SOURCES = LeicaDMI.cpp LeicaDMI.h LeicaDMIModel.cpp LeicaDMIModel.h LeicaDMIScopeInterface.cpp LeicaDMIScopeInterface.h diff --git a/DeviceAdapters/LeicaDMR/Makefile.am b/DeviceAdapters/LeicaDMR/Makefile.am index b5c4bda1c3..7d4c44eaed 100644 --- a/DeviceAdapters/LeicaDMR/Makefile.am +++ b/DeviceAdapters/LeicaDMR/Makefile.am @@ -1,8 +1,8 @@ -pkglibdir = $(DEVICEADAPTERPATH) -AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive -pkglib_LTLIBRARIES = libmmgr_dal_LeicaDMR.la -libmmgr_dal_LeicaDMR_la_SOURCES = LeicaDMR.cpp LeicaDMR.h LeicaDMRHub.cpp LeicaDMRHub.h -libmmgr_dal_LeicaDMR_la_LIBADD = $(MMDEVAPI_LIBADD) -libmmgr_dal_LeicaDMR_la_LDFLAGS = $(MMDEVAPI_LDFLAGS) - -EXTRA_DIST = LeicaDMR.vcproj license.txt + +AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive +pkglib_LTLIBRARIES = libmmgr_dal_LeicaDMR.la +libmmgr_dal_LeicaDMR_la_SOURCES = LeicaDMR.cpp LeicaDMR.h LeicaDMRHub.cpp LeicaDMRHub.h +libmmgr_dal_LeicaDMR_la_LIBADD = $(MMDEVAPI_LIBADD) +libmmgr_dal_LeicaDMR_la_LDFLAGS = $(MMDEVAPI_LDFLAGS) + +EXTRA_DIST = LeicaDMR.vcproj license.txt diff --git a/DeviceAdapters/LeicaDMSTC/Makefile.am b/DeviceAdapters/LeicaDMSTC/Makefile.am index 075c869ae1..d5680233e4 100644 --- a/DeviceAdapters/LeicaDMSTC/Makefile.am +++ b/DeviceAdapters/LeicaDMSTC/Makefile.am @@ -1,4 +1,4 @@ -pkglibdir = $(DEVICEADAPTERPATH) + AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive pkglib_LTLIBRARIES = libmmgr_dal_LeicaDMSTC.la libmmgr_dal_LeicaDMSTC_la_SOURCES = LeicaDMSTC.cpp LeicaDMSTC.h LeicaDMSTCHub.cpp LeicaDMSTCHub.h diff --git a/DeviceAdapters/Ludl/Makefile.am b/DeviceAdapters/Ludl/Makefile.am index ceced33e02..0693755a4d 100644 --- a/DeviceAdapters/Ludl/Makefile.am +++ b/DeviceAdapters/Ludl/Makefile.am @@ -1,4 +1,4 @@ -pkglibdir = $(DEVICEADAPTERPATH) + AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive pkglib_LTLIBRARIES = libmmgr_dal_Ludl.la libmmgr_dal_Ludl_la_SOURCES = Ludl.cpp Ludl.h diff --git a/DeviceAdapters/LudlLow/Makefile.am b/DeviceAdapters/LudlLow/Makefile.am index f17b6e283b..14bd3f8754 100644 --- a/DeviceAdapters/LudlLow/Makefile.am +++ b/DeviceAdapters/LudlLow/Makefile.am @@ -1,4 +1,4 @@ -pkglibdir = $(DEVICEADAPTERPATH) + AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive pkglib_LTLIBRARIES = libmmgr_dal_LudlLow.la libmmgr_dal_LudlLow_la_SOURCES = Ludl.cpp Ludl.h diff --git a/DeviceAdapters/LumencorSpectra/Makefile.am b/DeviceAdapters/LumencorSpectra/Makefile.am index d82b25c2c7..654a2cb03f 100644 --- a/DeviceAdapters/LumencorSpectra/Makefile.am +++ b/DeviceAdapters/LumencorSpectra/Makefile.am @@ -1,4 +1,4 @@ -pkglibdir = $(DEVICEADAPTERPATH) + AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive pkglib_LTLIBRARIES = libmmgr_dal_LumencorSpectra.la libmmgr_dal_LumencorSpectra_la_SOURCES = Spectra.cpp prior.h diff --git a/DeviceAdapters/MMDEVAPI.rules b/DeviceAdapters/MMDEVAPI.rules deleted file mode 100644 index 43d2efcecf..0000000000 --- a/DeviceAdapters/MMDEVAPI.rules +++ /dev/null @@ -1,14 +0,0 @@ -# Remove the libtool pseudo-library (not needed for non-interdepedent modules) -install-exec-am: - test -z "$(pkglib_LTLIBRARIES)" || (cd $(DESTDIR)$(pkglibdir); rm $(pkglib_LTLIBRARIES)) - -# Fix the uninstall procedure to properly handle the absence of the libtool pseudo-library -uninstall-am: - @$(NORMAL_UNINSTALL) - @list='$(pkglib_LTLIBRARIES)'; \ - for p in $$list; do \ - f=`echo $$p | sed -e 's|^.*/||' | sed -e 's|\.la|$(MMSUFFIX)|'`; \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ - done - diff --git a/DeviceAdapters/MP285/Makefile.am b/DeviceAdapters/MP285/Makefile.am index c709e9bb10..cd4285c0a5 100644 --- a/DeviceAdapters/MP285/Makefile.am +++ b/DeviceAdapters/MP285/Makefile.am @@ -1,6 +1,6 @@ -pkglibdir = $(DEVICEADAPTERPATH) -AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive -pkglib_LTLIBRARIES = libmmgr_dal_MP285.la -libmmgr_dal_MP285_la_SOURCES = MP285.cpp MP285.h MP285Ctrl.cpp MP285Ctrl.h MP285XYStage.cpp MP285XYStage.h MP285ZStage.cpp MP285ZStage.h MP285Error.cpp MP285Error.h -libmmgr_dal_MP285_la_LIBADD = $(MMDEVAPI_LIBADD) -libmmgr_dal_MP285_la_LDFLAGS = $(MMDEVAPI_LDFLAGS) + +AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive +pkglib_LTLIBRARIES = libmmgr_dal_MP285.la +libmmgr_dal_MP285_la_SOURCES = MP285.cpp MP285.h MP285Ctrl.cpp MP285Ctrl.h MP285XYStage.cpp MP285XYStage.h MP285ZStage.cpp MP285ZStage.h MP285Error.cpp MP285Error.h +libmmgr_dal_MP285_la_LIBADD = $(MMDEVAPI_LIBADD) +libmmgr_dal_MP285_la_LDFLAGS = $(MMDEVAPI_LDFLAGS) diff --git a/DeviceAdapters/MaestroServo/Makefile.am b/DeviceAdapters/MaestroServo/Makefile.am index 9558f08383..edf1b2c3a3 100644 --- a/DeviceAdapters/MaestroServo/Makefile.am +++ b/DeviceAdapters/MaestroServo/Makefile.am @@ -1,4 +1,4 @@ -pkglibdir = $(DEVICEADAPTERPATH) + AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive pkglib_LTLIBRARIES = libmmgr_dal_MaestroServo.la libmmgr_dal_MaestroServo_la_SOURCES = MaestroServo.cpp MaestroServo.h diff --git a/DeviceAdapters/Makefile.am b/DeviceAdapters/Makefile.am index 3e612c1dd3..46949af316 100644 --- a/DeviceAdapters/Makefile.am +++ b/DeviceAdapters/Makefile.am @@ -1,3 +1,4 @@ + AUTOMAKE_OPTIONS = foreign ACLOCAL_AMFLAGS = -I ../m4 @@ -50,4 +51,102 @@ if BUILD_V4L2 V4L = Video4Linux endif -SUBDIRS = AAAOTF Aladdin AOTF $(ANDOR) $(ANDORLASERCOMBINER) Aquinas Arduino ASIFW1000 ASIStage ASITiger ASIWPTR CARVII Cobolt CoherentCube CONEX Conix CSUW1 $(DC1394) DTOpenLayer DemoCamera Corvus $(IDSUEYE) ImageProcessorChain $(ITC) FreeSerialPort FocalPoint $(HIDMANAGER) $(IIDC) kdv K8055 K8061 LeicaDMI LeicaDMR LeicaDMSTC Ludl LudlLow LumencorSpectra MaestroServo Marzhauser Marzhauser-LStep MicroPoint MP285 Neos $(NIDAQ) Nikon NikonTE2000 Motic_mac nPoint Omicron $(OPENCVGRABBER) Oxxius pgFocus PI PI_GCS PI_GCS_2 Piezosystem_30DV50 Piezosystem_dDrive Piezosystem_NV120_1 Piezosystem_NV40_1 Piezosystem_NV40_3 Prior PriorLegacy ParallelPort Pecon PrecisExcite $(PVCAM) $(QCAM) Sapphire $(SCION) Scientifica $(SIMPLECAM) $(SENSICAM) SerialManager SimpleAutofocus $(SPOT) SpectralLMM5 SutterLambda SutterStage Thorlabs ThorlabsDCxxxx ThorlabsFilterWheel ThorlabsSC10 Tofra $(USBMANAGER) Utilities VariLC Vincent Vortran $(V4L) XCite120PC_Exacte XCiteLed Xcite XLight Yokogawa Zaber ZeissCAN ZeissCAN29 +# Please keep these ASCII-lexically sorted (pass through sort(1)). +SUBDIRS = \ + $(ANDOR) \ + $(ANDORLASERCOMBINER) \ + $(DC1394) \ + $(HIDMANAGER) \ + $(IDSUEYE) \ + $(IIDC) \ + $(ITC) \ + $(NIDAQ) \ + $(OPENCVGRABBER) \ + $(PVCAM) \ + $(QCAM) \ + $(SCION) \ + $(SENSICAM) \ + $(SIMPLECAM) \ + $(SPOT) \ + $(USBMANAGER) \ + $(V4L) \ + AAAOTF \ + AOTF \ + ASIFW1000 \ + ASIStage \ + ASITiger \ + ASIWPTR \ + Aladdin \ + Aquinas \ + Arduino \ + CARVII \ + CONEX \ + CSUW1 \ + Cobolt \ + CoherentCube \ + Conix \ + Corvus \ + DTOpenLayer \ + DemoCamera \ + FocalPoint \ + FreeSerialPort \ + ImageProcessorChain \ + K8055 \ + K8061 \ + LeicaDMI \ + LeicaDMR \ + LeicaDMSTC \ + Ludl \ + LudlLow \ + LumencorSpectra \ + MP285 \ + MaestroServo \ + Marzhauser \ + Marzhauser-LStep \ + MicroPoint \ + Motic_mac \ + Neos \ + Nikon \ + NikonTE2000 \ + Omicron \ + Oxxius \ + PI \ + PI_GCS \ + PI_GCS_2 \ + ParallelPort \ + Pecon \ + Piezosystem_30DV50 \ + Piezosystem_NV120_1 \ + Piezosystem_NV40_1 \ + Piezosystem_NV40_3 \ + Piezosystem_dDrive \ + PrecisExcite \ + Prior \ + PriorLegacy \ + Sapphire \ + Scientifica \ + SerialManager \ + SimpleAutofocus \ + SpectralLMM5 \ + SutterLambda \ + SutterStage \ + Thorlabs \ + ThorlabsDCxxxx \ + ThorlabsFilterWheel \ + ThorlabsSC10 \ + Tofra \ + Utilities \ + VariLC \ + Vincent \ + Vortran \ + XCite120PC_Exacte \ + XCiteLed \ + XLight \ + Xcite \ + Yokogawa \ + Zaber \ + ZeissCAN \ + ZeissCAN29 \ + kdv \ + nPoint \ + pgFocus diff --git a/DeviceAdapters/Marzhauser-LStep/Makefile.am b/DeviceAdapters/Marzhauser-LStep/Makefile.am index c83cf48c27..3b71d7c36f 100644 --- a/DeviceAdapters/Marzhauser-LStep/Makefile.am +++ b/DeviceAdapters/Marzhauser-LStep/Makefile.am @@ -1,4 +1,4 @@ -pkglibdir = $(DEVICEADAPTERPATH) + AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive pkglib_LTLIBRARIES = libmmgr_dal_MarzhauserLStep.la libmmgr_dal_MarzhauserLStep_la_SOURCES = LStep.cpp LStep.h diff --git a/DeviceAdapters/Marzhauser/Makefile.am b/DeviceAdapters/Marzhauser/Makefile.am index 346538be73..92998e4947 100644 --- a/DeviceAdapters/Marzhauser/Makefile.am +++ b/DeviceAdapters/Marzhauser/Makefile.am @@ -1,4 +1,4 @@ -pkglibdir = $(DEVICEADAPTERPATH) + AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive pkglib_LTLIBRARIES = libmmgr_dal_Marzhauser.la libmmgr_dal_Marzhauser_la_SOURCES = Marzhauser.cpp Marzhauser.h diff --git a/DeviceAdapters/MicroPoint/Makefile.am b/DeviceAdapters/MicroPoint/Makefile.am index def68622c8..dc74e50edd 100644 --- a/DeviceAdapters/MicroPoint/Makefile.am +++ b/DeviceAdapters/MicroPoint/Makefile.am @@ -1,4 +1,4 @@ -pkglibdir = $(DEVICEADAPTERPATH) + AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive pkglib_LTLIBRARIES = libmmgr_dal_MicroPoint.la libmmgr_dal_MicroPoint_la_SOURCES = MicroPoint.cpp MicroPoint.h diff --git a/DeviceAdapters/Motic_mac/Makefile.am b/DeviceAdapters/Motic_mac/Makefile.am index dbb4faf21c..519f6faa6b 100644 --- a/DeviceAdapters/Motic_mac/Makefile.am +++ b/DeviceAdapters/Motic_mac/Makefile.am @@ -1,4 +1,4 @@ -pkglibdir = $(DEVICEADAPTERPATH) + AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive $(BOOST_CPPFLAGS) pkglib_LTLIBRARIES = libmmgr_dal_MoticUCam.la libmmgr_dal_MoticUCam_la_SOURCES = MUCamSource.cpp MUCamSource.h MoticUCam.h diff --git a/DeviceAdapters/Neos/Makefile.am b/DeviceAdapters/Neos/Makefile.am index a5638c82b3..1c450dcedf 100644 --- a/DeviceAdapters/Neos/Makefile.am +++ b/DeviceAdapters/Neos/Makefile.am @@ -1,4 +1,4 @@ -pkglibdir = $(DEVICEADAPTERPATH) + AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive pkglib_LTLIBRARIES = libmmgr_dal_Neos.la libmmgr_dal_Neos_la_SOURCES = Neos.cpp Neos.h diff --git a/DeviceAdapters/Nikon/Makefile.am b/DeviceAdapters/Nikon/Makefile.am index ec254ff166..65cd395122 100644 --- a/DeviceAdapters/Nikon/Makefile.am +++ b/DeviceAdapters/Nikon/Makefile.am @@ -1,4 +1,4 @@ -pkglibdir = $(DEVICEADAPTERPATH) + AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive pkglib_LTLIBRARIES = libmmgr_dal_Nikon.la libmmgr_dal_Nikon_la_SOURCES = Nikon.cpp Nikon.h diff --git a/DeviceAdapters/NikonTE2000/Makefile.am b/DeviceAdapters/NikonTE2000/Makefile.am index 815f811b70..a6dd03a1a9 100644 --- a/DeviceAdapters/NikonTE2000/Makefile.am +++ b/DeviceAdapters/NikonTE2000/Makefile.am @@ -1,4 +1,4 @@ -pkglibdir = $(DEVICEADAPTERPATH) + AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive pkglib_LTLIBRARIES = libmmgr_dal_NikonTE2000.la libmmgr_dal_NikonTE2000_la_SOURCES = NikonTE2000.cpp NikonTE2000.h TEHub.cpp TEHub.h diff --git a/DeviceAdapters/Omicron/Makefile.am b/DeviceAdapters/Omicron/Makefile.am index 99c3d862c4..3bd72718b8 100644 --- a/DeviceAdapters/Omicron/Makefile.am +++ b/DeviceAdapters/Omicron/Makefile.am @@ -1,4 +1,4 @@ -pkglibdir = $(DEVICEADAPTERPATH) + AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive pkglib_LTLIBRARIES = libmmgr_dal_Omicron.la libmmgr_dal_Omicron_la_SOURCES = Omicron.cpp Omicron.h \ diff --git a/DeviceAdapters/OpenCVgrabber/Makefile.am b/DeviceAdapters/OpenCVgrabber/Makefile.am index 5afe01f9fa..07f3d2f40f 100644 --- a/DeviceAdapters/OpenCVgrabber/Makefile.am +++ b/DeviceAdapters/OpenCVgrabber/Makefile.am @@ -1,8 +1,10 @@ -pkglibdir = $(DEVICEADAPTERPATH) -AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive $(OPENCV_CPPFLAGS) + + +AM_CPPFLAGS = $(OPENCV_CPPFLAGS) +AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) $(OPENCV_CFLAGS) +AM_LDFLAGS = $(MMDEVAPI_LDFLAGS) $(OPENCV_LDFLAGS) + pkglib_LTLIBRARIES = libmmgr_dal_OpenCVgrabber.la -libmmgr_dal_OpenCVgrabber_la_SOURCES = OpenCVgrabber.cpp OpenCVgrabber.h ../../MMDevice/MMDevice.h -libmmgr_dal_OpenCVgrabber_la_LIBADD = $(MMDEVAPI_LIBADD) $(LIBDC1394) -libmmgr_dal_OpenCVgrabber_la_LDFLAGS = $(MMDEVAPI_LDFLAGS) $(OPENCV_LDFLAGS) \ - $(QUICKTIMEFRAMEWORKS) -pthread +libmmgr_dal_OpenCVgrabber_la_SOURCES = OpenCVgrabber.cpp OpenCVgrabber.h +libmmgr_dal_OpenCVgrabber_la_LIBADD = $(MMDEVAPI_LIBADD) $(OPENCV_LIBS) diff --git a/DeviceAdapters/Oxxius/Makefile.am b/DeviceAdapters/Oxxius/Makefile.am index 7dbbd265d9..dba55ba729 100644 --- a/DeviceAdapters/Oxxius/Makefile.am +++ b/DeviceAdapters/Oxxius/Makefile.am @@ -1,8 +1,8 @@ -pkglibdir = $(DEVICEADAPTERPATH) -AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive -pkglib_LTLIBRARIES = libmmgr_dal_Oxxius.la -libmmgr_dal_Oxxius_la_SOURCES = Oxxius.cpp Oxxius.h -libmmgr_dal_Oxxius_la_LIBADD = $(MMDEVAPI_LIBADD) -libmmgr_dal_Oxxius_la_LDFLAGS = $(MMDEVAPI_LDFLAGS) - -EXTRA_DIST = Oxxius.vcproj + +AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive +pkglib_LTLIBRARIES = libmmgr_dal_Oxxius.la +libmmgr_dal_Oxxius_la_SOURCES = Oxxius.cpp Oxxius.h +libmmgr_dal_Oxxius_la_LIBADD = $(MMDEVAPI_LIBADD) +libmmgr_dal_Oxxius_la_LDFLAGS = $(MMDEVAPI_LDFLAGS) + +EXTRA_DIST = Oxxius.vcproj diff --git a/DeviceAdapters/PI/Makefile.am b/DeviceAdapters/PI/Makefile.am index 300ac1a8dd..65431ffd47 100644 --- a/DeviceAdapters/PI/Makefile.am +++ b/DeviceAdapters/PI/Makefile.am @@ -1,4 +1,4 @@ -pkglibdir = $(DEVICEADAPTERPATH) + AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive pkglib_LTLIBRARIES = libmmgr_dal_PI.la libmmgr_dal_PI_la_SOURCES = PI.cpp PI.h diff --git a/DeviceAdapters/PI_GCS/Makefile.am b/DeviceAdapters/PI_GCS/Makefile.am index 1697c0f0df..dde6a024d0 100644 --- a/DeviceAdapters/PI_GCS/Makefile.am +++ b/DeviceAdapters/PI_GCS/Makefile.am @@ -1,4 +1,4 @@ -pkglibdir = $(DEVICEADAPTERPATH) + AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive pkglib_LTLIBRARIES = libmmgr_dal_PIGCS.la libmmgr_dal_PIGCS_la_SOURCES = PI_GCS.cpp PI_GCS.h diff --git a/DeviceAdapters/PI_GCS_2/Makefile.am b/DeviceAdapters/PI_GCS_2/Makefile.am index 5bb1fe93c5..55850c37e8 100644 --- a/DeviceAdapters/PI_GCS_2/Makefile.am +++ b/DeviceAdapters/PI_GCS_2/Makefile.am @@ -1,4 +1,4 @@ -pkglibdir = $(DEVICEADAPTERPATH) + AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive pkglib_LTLIBRARIES = libmmgr_dal_PIGCS2.la libmmgr_dal_PIGCS2_la_SOURCES = Controller.cpp Controller.h \ diff --git a/DeviceAdapters/PVCAM/Makefile.am b/DeviceAdapters/PVCAM/Makefile.am index 62e89b7901..8d9cc8857f 100644 --- a/DeviceAdapters/PVCAM/Makefile.am +++ b/DeviceAdapters/PVCAM/Makefile.am @@ -1,9 +1,9 @@ -pkglibdir = $(DEVICEADAPTERPATH) -AM_CPPFLAGS = -F/Library/Frameworks -AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive -pkglib_LTLIBRARIES = libmmgr_dal_PVCAM.la -libmmgr_dal_PVCAM_la_SOURCES = PVCAMAdapter.cpp PVCAMAdapter.h PVCAMUniversal.cpp PVCAMParam.cpp -libmmgr_dal_PVCAM_la_LIBADD = $(MMDEVAPI_LIBADD) -libmmgr_dal_PVCAM_la_LDFLAGS = $(MMDEVAPI_LDFLAGS) $(PVCAMFRAMEWORKS) - -EXTRA_DIST = PVCAM.vcproj license.txt + +AM_CPPFLAGS = -F/Library/Frameworks +AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive +pkglib_LTLIBRARIES = libmmgr_dal_PVCAM.la +libmmgr_dal_PVCAM_la_SOURCES = PVCAMAdapter.cpp PVCAMAdapter.h PVCAMUniversal.cpp PVCAMParam.cpp +libmmgr_dal_PVCAM_la_LIBADD = $(MMDEVAPI_LIBADD) +libmmgr_dal_PVCAM_la_LDFLAGS = $(MMDEVAPI_LDFLAGS) $(PVCAMFRAMEWORKS) + +EXTRA_DIST = PVCAM.vcproj license.txt diff --git a/DeviceAdapters/ParallelPort/Makefile.am b/DeviceAdapters/ParallelPort/Makefile.am index 8b1d35a829..523d7caf05 100644 --- a/DeviceAdapters/ParallelPort/Makefile.am +++ b/DeviceAdapters/ParallelPort/Makefile.am @@ -1 +1,2 @@ + EXTRA_DIST = ParallelPort.vcproj license.txt ParallelPort.h ParallelPort.cpp diff --git a/DeviceAdapters/Pecon/Makefile.am b/DeviceAdapters/Pecon/Makefile.am index 5489ead772..c2fc0dbc7b 100644 --- a/DeviceAdapters/Pecon/Makefile.am +++ b/DeviceAdapters/Pecon/Makefile.am @@ -1,8 +1,8 @@ -pkglibdir = $(DEVICEADAPTERPATH) -AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive -pkglib_LTLIBRARIES = libmmgr_dal_Pecon.la -libmmgr_dal_Pecon_la_SOURCES = Pecon.cpp Pecon.h h -libmmgr_dal_Pecon_la_LIBADD = $(MMDEVAPI_LIBADD) -libmmgr_dal_Pecon_la_LDFLAGS = $(MMDEVAPI_LDFLAGS) - -EXTRA_DIST = Pecon.vcproj license.txt + +AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive +pkglib_LTLIBRARIES = libmmgr_dal_Pecon.la +libmmgr_dal_Pecon_la_SOURCES = Pecon.cpp Pecon.h h +libmmgr_dal_Pecon_la_LIBADD = $(MMDEVAPI_LIBADD) +libmmgr_dal_Pecon_la_LDFLAGS = $(MMDEVAPI_LDFLAGS) + +EXTRA_DIST = Pecon.vcproj license.txt diff --git a/DeviceAdapters/Piezosystem_30DV50/Makefile.am b/DeviceAdapters/Piezosystem_30DV50/Makefile.am index a746fe5bd5..451f6b3949 100644 --- a/DeviceAdapters/Piezosystem_30DV50/Makefile.am +++ b/DeviceAdapters/Piezosystem_30DV50/Makefile.am @@ -1,4 +1,4 @@ -pkglibdir = $(DEVICEADAPTERPATH) + AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive pkglib_LTLIBRARIES = libmmgr_dal_Piezosystem_30DV50.la libmmgr_dal_Piezosystem_30DV50_la_SOURCES = Piezosystem_30DV50.cpp \ diff --git a/DeviceAdapters/Piezosystem_NV120_1/Makefile.am b/DeviceAdapters/Piezosystem_NV120_1/Makefile.am index 061b7ebf94..6fcb907851 100644 --- a/DeviceAdapters/Piezosystem_NV120_1/Makefile.am +++ b/DeviceAdapters/Piezosystem_NV120_1/Makefile.am @@ -1,4 +1,4 @@ -pkglibdir = $(DEVICEADAPTERPATH) + AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive pkglib_LTLIBRARIES = libmmgr_dal_Piezosystem_NV120_1.la libmmgr_dal_Piezosystem_NV120_1_la_SOURCES = Piezosystem_NV120_1.cpp Piezosystem_NV120_1.h diff --git a/DeviceAdapters/Piezosystem_NV40_1/Makefile.am b/DeviceAdapters/Piezosystem_NV40_1/Makefile.am index 633272d250..e6fe7523da 100644 --- a/DeviceAdapters/Piezosystem_NV40_1/Makefile.am +++ b/DeviceAdapters/Piezosystem_NV40_1/Makefile.am @@ -1,4 +1,4 @@ -pkglibdir = $(DEVICEADAPTERPATH) + AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive pkglib_LTLIBRARIES = libmmgr_dal_Piezosystem_NV40_1.la libmmgr_dal_Piezosystem_NV40_1_la_SOURCES = Piezosystem_NV40_1.cpp Piezosystem_NV40_1.h diff --git a/DeviceAdapters/Piezosystem_NV40_3/Makefile.am b/DeviceAdapters/Piezosystem_NV40_3/Makefile.am index e2dc978112..7a4c7949e7 100644 --- a/DeviceAdapters/Piezosystem_NV40_3/Makefile.am +++ b/DeviceAdapters/Piezosystem_NV40_3/Makefile.am @@ -1,4 +1,4 @@ -pkglibdir = $(DEVICEADAPTERPATH) + AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive pkglib_LTLIBRARIES = libmmgr_dal_Piezosystem_NV40_3.la libmmgr_dal_Piezosystem_NV40_3_la_SOURCES = Piezosystem_NV40_3.cpp Piezosystem_NV40_3.h diff --git a/DeviceAdapters/Piezosystem_dDrive/Makefile.am b/DeviceAdapters/Piezosystem_dDrive/Makefile.am index 4fa053dd5a..f77f69638c 100644 --- a/DeviceAdapters/Piezosystem_dDrive/Makefile.am +++ b/DeviceAdapters/Piezosystem_dDrive/Makefile.am @@ -1,4 +1,4 @@ -pkglibdir = $(DEVICEADAPTERPATH) + AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive pkglib_LTLIBRARIES = libmmgr_dal_Piezosystem_dDrive.la libmmgr_dal_Piezosystem_dDrive_la_SOURCES = Piezosystem_dDrive.cpp \ diff --git a/DeviceAdapters/PrecisExcite/Makefile.am b/DeviceAdapters/PrecisExcite/Makefile.am index f00ab1c5dc..4d654a3837 100644 --- a/DeviceAdapters/PrecisExcite/Makefile.am +++ b/DeviceAdapters/PrecisExcite/Makefile.am @@ -1,4 +1,4 @@ -pkglibdir = $(DEVICEADAPTERPATH) + AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive pkglib_LTLIBRARIES = libmmgr_dal_PrecisExcite.la libmmgr_dal_PrecisExcite_la_SOURCES = PrecisExcite.cpp PrecisExcite.h diff --git a/DeviceAdapters/PrincetonInstruments/Makefile.am b/DeviceAdapters/PrincetonInstruments/Makefile.am index 4b2f082b66..26c25e7ad8 100644 --- a/DeviceAdapters/PrincetonInstruments/Makefile.am +++ b/DeviceAdapters/PrincetonInstruments/Makefile.am @@ -1,9 +1,9 @@ -pkglibdir = $(DEVICEADAPTERPATH) -AM_CPPFLAGS = -F/Library/Frameworks -AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive -pkglib_LTLIBRARIES = libmmgr_dal_PrincetonInstruments.la -libmmgr_dal_PrincetonInstruments_la_SOURCES = PVCAM.cpp PVCAM.h PVCAMUtils.cpp PVCAMUtils.h PVCAMUniversal.cpp -libmmgr_dal_PrincetonInstruments_la_LIBADD = $(MMDEVAPI_LIBADD) $(LIBACE) -libmmgr_dal_PrincetonInstruments_la_LDFLAGS = $(MMDEVAPI_LDFLAGS) $(PVCAMFRAMEWORKS) - -EXTRA_DIST = PVCAM.vcproj license.txt + +AM_CPPFLAGS = -F/Library/Frameworks +AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive +pkglib_LTLIBRARIES = libmmgr_dal_PrincetonInstruments.la +libmmgr_dal_PrincetonInstruments_la_SOURCES = PVCAM.cpp PVCAM.h PVCAMUtils.cpp PVCAMUtils.h PVCAMUniversal.cpp +libmmgr_dal_PrincetonInstruments_la_LIBADD = $(MMDEVAPI_LIBADD) $(LIBACE) +libmmgr_dal_PrincetonInstruments_la_LDFLAGS = $(MMDEVAPI_LDFLAGS) $(PVCAMFRAMEWORKS) + +EXTRA_DIST = PVCAM.vcproj license.txt diff --git a/DeviceAdapters/Prior/Makefile.am b/DeviceAdapters/Prior/Makefile.am index 7ffcf9b66c..ab9f097c40 100644 --- a/DeviceAdapters/Prior/Makefile.am +++ b/DeviceAdapters/Prior/Makefile.am @@ -1,4 +1,4 @@ -pkglibdir = $(DEVICEADAPTERPATH) + AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive pkglib_LTLIBRARIES = libmmgr_dal_Prior.la libmmgr_dal_Prior_la_SOURCES = Prior.cpp prior.h diff --git a/DeviceAdapters/PriorLegacy/Makefile.am b/DeviceAdapters/PriorLegacy/Makefile.am index 209b916667..fa8e4e4b6f 100644 --- a/DeviceAdapters/PriorLegacy/Makefile.am +++ b/DeviceAdapters/PriorLegacy/Makefile.am @@ -1,4 +1,4 @@ -pkglibdir = $(DEVICEADAPTERPATH) + AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive pkglib_LTLIBRARIES = libmmgr_dal_PriorLegacy.la libmmgr_dal_PriorLegacy_la_SOURCES = PriorLegacy.cpp PriorLegacy.h diff --git a/DeviceAdapters/QCam/Makefile.am b/DeviceAdapters/QCam/Makefile.am index 78ac454f03..0b54e585ca 100644 --- a/DeviceAdapters/QCam/Makefile.am +++ b/DeviceAdapters/QCam/Makefile.am @@ -1,9 +1,9 @@ -pkglibdir = $(DEVICEADAPTERPATH) -AM_CPPFLAGS = -F/Library/Frameworks -AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive -pkglib_LTLIBRARIES = libmmgr_dal_QCam.la -libmmgr_dal_QCam_la_SOURCES = QICamera.cpp QICamera.h DeviceEvents.h -libmmgr_dal_QCam_la_LIBADD = $(MMDEVAPI_LIBADD) -libmmgr_dal_QCam_la_LDFLAGS = $(MMDEVAPI_LDFLAGS) -framework QCam - -EXTRA_DIST = QCam.vcproj + +AM_CPPFLAGS = -F/Library/Frameworks +AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive +pkglib_LTLIBRARIES = libmmgr_dal_QCam.la +libmmgr_dal_QCam_la_SOURCES = QICamera.cpp QICamera.h DeviceEvents.h +libmmgr_dal_QCam_la_LIBADD = $(MMDEVAPI_LIBADD) +libmmgr_dal_QCam_la_LDFLAGS = $(MMDEVAPI_LDFLAGS) -framework QCam + +EXTRA_DIST = QCam.vcproj diff --git a/DeviceAdapters/Sapphire/Makefile.am b/DeviceAdapters/Sapphire/Makefile.am index e851f63703..8241570e0f 100644 --- a/DeviceAdapters/Sapphire/Makefile.am +++ b/DeviceAdapters/Sapphire/Makefile.am @@ -1,4 +1,4 @@ -pkglibdir = $(DEVICEADAPTERPATH) + AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive pkglib_LTLIBRARIES = libmmgr_dal_Sapphire.la libmmgr_dal_Sapphire_la_SOURCES = Sapphire.cpp Sapphire.h \ diff --git a/DeviceAdapters/Scientifica/Makefile.am b/DeviceAdapters/Scientifica/Makefile.am index 6c72bd7f32..ff4a91de37 100644 --- a/DeviceAdapters/Scientifica/Makefile.am +++ b/DeviceAdapters/Scientifica/Makefile.am @@ -1,4 +1,4 @@ -pkglibdir = $(DEVICEADAPTERPATH) + AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive pkglib_LTLIBRARIES = libmmgr_dal_Scientifica.la libmmgr_dal_Scientifica_la_SOURCES = Scientifica.cpp Scientifica.h diff --git a/DeviceAdapters/ScionCam/Makefile.am b/DeviceAdapters/ScionCam/Makefile.am index 8775191968..d030d5b176 100644 --- a/DeviceAdapters/ScionCam/Makefile.am +++ b/DeviceAdapters/ScionCam/Makefile.am @@ -1,4 +1,4 @@ -pkglibdir = $(DEVICEADAPTERPATH) + AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -F/Library/Frameworks pkglib_LTLIBRARIES = libmmgr_dal_ScionCam.la libmmgr_dal_ScionCam_la_SOURCES = ScionCamera.cpp ScionCamera.h capture.cpp utilities.cpp diff --git a/DeviceAdapters/Sensicam/Makefile.am b/DeviceAdapters/Sensicam/Makefile.am index fc6371632c..ae1477f289 100644 --- a/DeviceAdapters/Sensicam/Makefile.am +++ b/DeviceAdapters/Sensicam/Makefile.am @@ -1,4 +1,4 @@ -pkglibdir = $(DEVICEADAPTERPATH) + AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive pkglib_LTLIBRARIES = libmmgr_dal_Sensicam.la libmmgr_dal_Sensicam_la_SOURCES = Sensicam.cpp Sensicam.h diff --git a/DeviceAdapters/SerialManager/Makefile.am b/DeviceAdapters/SerialManager/Makefile.am index 91c837f988..70d133bae5 100644 --- a/DeviceAdapters/SerialManager/Makefile.am +++ b/DeviceAdapters/SerialManager/Makefile.am @@ -1,4 +1,4 @@ -pkglibdir = $(DEVICEADAPTERPATH) + AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive $(BOOST_CPPFLAGS) pkglib_LTLIBRARIES = libmmgr_dal_SerialManager.la libmmgr_dal_SerialManager_la_SOURCES = SerialManager.cpp SerialManager.h \ diff --git a/DeviceAdapters/SimpleAutofocus/Makefile.am b/DeviceAdapters/SimpleAutofocus/Makefile.am index 1ddd347809..46920629c5 100644 --- a/DeviceAdapters/SimpleAutofocus/Makefile.am +++ b/DeviceAdapters/SimpleAutofocus/Makefile.am @@ -1,6 +1,6 @@ -pkglibdir = $(DEVICEADAPTERPATH) -AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive -pkglib_LTLIBRARIES = libmmgr_dal_SimpleAutofocus.la -libmmgr_dal_SimpleAutofocus_la_SOURCES = SimpleAutofocus.cpp SimpleAutofocus.h FocusMonitor.cpp ThreePointAF.cpp score.cpp -libmmgr_dal_SimpleAutofocus_la_LIBADD = $(MMDEVAPI_LIBADD) -libmmgr_dal_SimpleAutofocus_la_LDFLAGS = $(MMDEVAPI_LDFLAGS) + +AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive +pkglib_LTLIBRARIES = libmmgr_dal_SimpleAutofocus.la +libmmgr_dal_SimpleAutofocus_la_SOURCES = SimpleAutofocus.cpp SimpleAutofocus.h FocusMonitor.cpp ThreePointAF.cpp score.cpp +libmmgr_dal_SimpleAutofocus_la_LIBADD = $(MMDEVAPI_LIBADD) +libmmgr_dal_SimpleAutofocus_la_LDFLAGS = $(MMDEVAPI_LDFLAGS) diff --git a/DeviceAdapters/SimpleCam/Makefile.am b/DeviceAdapters/SimpleCam/Makefile.am index aeaa545964..d7bad466e7 100644 --- a/DeviceAdapters/SimpleCam/Makefile.am +++ b/DeviceAdapters/SimpleCam/Makefile.am @@ -1,56 +1,22 @@ -pkglibdir = $(DEVICEADAPTERPATH) -AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive $(LIBFREEIMAGE_CXXFLAGS) \ - $(LIBFREEIMAGEPLUS_CXXFLAGS) -pkglib_LTLIBRARIES = libmmgr_dal_GPhoto.la -libmmgr_dal_GPhoto_la_SOURCES = CameraFrontend.cpp CameraFrontend.h -libmmgr_dal_GPhoto_la_LIBADD = $(MMDEVAPI_LIBADD) -libmmgr_dal_GPhoto_la_LDFLAGS = $(MMDEVAPI_LDFLAGS) - -# FreeImage library -libmmgr_dal_GPhoto_la_LIBADD += $(LIBFREEIMAGE) $(LIBFREEIMAGEPLUS) - -# gphoto2 library -AM_CXXFLAGS += -Igphoto -libmmgr_dal_GPhoto_la_SOURCES += gphoto/SimpleCam.cpp gphoto/SimpleCam.h -libmmgr_dal_GPhoto_la_LIBADD += $(LIBGPHOTO2) - -install: $(INSTALL_LIBGPHOTO) - -install_linux: - cp .libs/libmmgr_dal_GPhoto$(MMSUFFIX) $(DESTDIR)$(DEVICEADAPTERPATH)/libmmgr_dal_GPhoto$(MMSUFFIX) - -# The libltdl situation is miserable. Chase it all over the place to point to the copy we provide -install_macos: - cp .libs/libmmgr_dal_GPhoto$(MMSUFFIX) $(DESTDIR)$(DEVICEADAPTERPATH)/libmmgr_dal_GPhoto$(MMSUFFIX) - install_name_tool -change $(GPHOTO2_LIBDIR)/libgphoto2.6.dylib @loader_path/libgphoto2/libgphoto2.6.dylib $(DEVICEADAPTERPATH)/libmmgr_dal_GPhoto$(MMSUFFIX) - install_name_tool -change $(GPHOTO2_LIBDIR)/libgphoto2_port.10.dylib @loader_path/libgphoto2/libgphoto2_port.10.dylib $(DEVICEADAPTERPATH)/libmmgr_dal_GPhoto$(MMSUFFIX) - install_name_tool -change $(LIBLTDL) @loader_path/libgphoto2/libltdl.dylib $(DEVICEADAPTERPATH)/libmmgr_dal_GPhoto$(MMSUFFIX) - install_name_tool -change /usr/local/x86_64/lib/libltdl.7.dylib @loader_path/libgphoto2/libltdl.dylib $(DEVICEADAPTERPATH)/libmmgr_dal_GPhoto$(MMSUFFIX) - test -d $(DEVICEADAPTERPATH)/libgphoto2 || mkdir $(DESTDIR)$(DEVICEADAPTERPATH)/libgphoto2 - test -d $(DEVICEADAPTERPATH)/libgphoto2/libgphoto2 || mkdir $(DESTDIR)$(DEVICEADAPTERPATH)/libgphoto2/libgphoto2 - test -d $(DEVICEADAPTERPATH)/libgphoto2/libgphoto2_port || mkdir $(DESTDIR)$(DEVICEADAPTERPATH)/libgphoto2/libgphoto2_port - rm -rf $(DEVICEADAPTERPATH)/libgphoto2/libgphoto2/* - rm -rf $(DEVICEADAPTERPATH)/libgphoto2/libgphoto2_port/* - cp $(GPHOTO2_LIBDIR)/libgphoto2.6.dylib $(DEVICEADAPTERPATH)/libgphoto2/ - install_name_tool -id @loader_path/libgphoto2/libgphoto2.6.dylib $(DEVICEADAPTERPATH)/libgphoto2/libgphoto2.6.dylib - install_name_tool -change $(GPHOTO2_LIBDIR)/libgphoto2_port.10.dylib @loader_path/libgphoto2_port.10.dylib $(DEVICEADAPTERPATH)/libgphoto2/libgphoto2.6.dylib - cp $(GPHOTO2_LIBDIR)/libgphoto2_port.10.dylib $(DEVICEADAPTERPATH)/libgphoto2/ - install_name_tool -id @loader_path/libgphoto2/libgphoto2_port.10.dylib $(DEVICEADAPTERPATH)/libgphoto2/libgphoto2_port.10.dylib - cp $(LIBLTDL) $(DEVICEADAPTERPATH)/libgphoto2/ - install_name_tool -id @loader_path/libgphoto2/libltdl.dylib $(DEVICEADAPTERPATH)/libgphoto2/libltdl.dylib - install_name_tool -change $(LIBLTDL) @loader_path/libltdl.dylib $(DEVICEADAPTERPATH)/libgphoto2/libgphoto2.6.dylib - install_name_tool -change /usr/lib/libltdl.7.dylib @loader_path/libltdl.dylib $(DEVICEADAPTERPATH)/libgphoto2/libgphoto2.6.dylib - install_name_tool -change /usr/lib/libltdl.3.dylib @loader_path/libltdl.dylib $(DEVICEADAPTERPATH)/libgphoto2/libgphoto2.6.dylib - install_name_tool -change $(LIBLTDL) @loader_path/libltdl.dylib $(DEVICEADAPTERPATH)/libgphoto2/libgphoto2_port.10.dylib - install_name_tool -change /usr/lib/libltdl.7.dylib @loader_path/libltdl.dylib $(DEVICEADAPTERPATH)/libgphoto2/libgphoto2_port.10.dylib - install_name_tool -change /usr/lib/libltdl.3.dylib @loader_path/libltdl.dylib $(DEVICEADAPTERPATH)/libgphoto2/libgphoto2_port.10.dylib - cp $(GPHOTO2_LIBDIR)/libgphoto2/$(GPHOTO2_VERSION)/*.so $(DEVICEADAPTERPATH)/libgphoto2/libgphoto2/ - cp $(GPHOTO2_LIBDIR)/libgphoto2_port/$(GPHOTO2_PORT_VERSION)/*.so $(DEVICEADAPTERPATH)/libgphoto2/libgphoto2_port/ - ls $(DEVICEADAPTERPATH)/libgphoto2/libgphoto2/*.so $(DESTDIR)$(DEVICEADAPTERPATH)/libgphoto2/libgphoto2_port/*.so | xargs -n 1 install_name_tool -change $(GPHOTO2_LIBDIR)/libgphoto2.6.dylib @loader_path/../libgphoto2.6.dylib - ls $(DEVICEADAPTERPATH)/libgphoto2/libgphoto2/*.so $(DESTDIR)$(DEVICEADAPTERPATH)/libgphoto2/libgphoto2_port/*.so | xargs -n 1 install_name_tool -change $(GPHOTO2_LIBDIR)/libgphoto2_port.10.dylib @loader_path/../libgphoto2_port.10.dylib - ls $(DEVICEADAPTERPATH)/libgphoto2/libgphoto2/*.so $(DESTDIR)$(DEVICEADAPTERPATH)/libgphoto2/libgphoto2_port/*.so | xargs -n 1 install_name_tool -change $(LIBLTDL) @loader_path/libltdl.dylib - ls $(DEVICEADAPTERPATH)/libgphoto2/libgphoto2/*.so $(DESTDIR)$(DEVICEADAPTERPATH)/libgphoto2/libgphoto2_port/*.so | xargs -n 1 install_name_tool -change /usr/lib/libltdl.3.dylib @loader_path/libltdl.dylib - ls $(DEVICEADAPTERPATH)/libgphoto2/libgphoto2/*.so $(DESTDIR)$(DEVICEADAPTERPATH)/libgphoto2/libgphoto2_port/*.so | xargs -n 1 install_name_tool -change /usr/lib/libltdl.7.dylib @loader_path/libltdl.dylib - osacompile -e 'tell application "PTPCamera" to quit' -o $(DEVICEADAPTERPATH)/libgphoto2/KillPtpCamera.app - -EXTRA_DIST = license.txt + +AUTOMAKE_OPTIONS = foreign subdir-objects + +AM_CPPFLAGS = $(GPHOTO2_CPPFLAGS) $(FREEIMAGEPLUS_CPPFLAGS) +AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) $(GPHOTO2_CFLAGS) $(FREEIMAGEPLUS_CXXFLAGS) -fpermissive +# TODO -framework CoreFoundation (used by gphoto/SimpleCam.cpp) should be Apple-only +AM_LDFLAGS = $(MMDEVAPI_LDFLAGS) $(GPHOTO2_LDFLAGS) $(FREEIMAGEPLUS_LDFLAGS) -framework CoreFoundation + +pkglib_LTLIBRARIES = libmmgr_dal_GPhoto.la +libmmgr_dal_GPhoto_la_CPPFLAGS = $(AM_CPPFLAGS) -I$(srcdir)/gphoto +libmmgr_dal_GPhoto_la_SOURCES = \ + CameraFrontend.cpp \ + CameraFrontend.h \ + gphoto/SimpleCam.cpp \ + gphoto/SimpleCam.h +libmmgr_dal_GPhoto_la_LIBADD = $(MMDEVAPI_LIBADD) $(GPHOTO2_LIBS) $(FREEIMAGEPLUS_LIBS) + +EXTRA_DIST = license.txt + +# TODO On Mac OS X, create an AppleScript app to quit PTPCamera. +# This used to be done as part of the 'install' target. +# osacompile -e 'tell application "PTPCamera" to quit' -o $(DEVICEADAPTERPATH)/libgphoto2/KillPtpCamera.app diff --git a/DeviceAdapters/SpectralLMM5/Makefile.am b/DeviceAdapters/SpectralLMM5/Makefile.am index 7419164c4d..eab49730c6 100644 --- a/DeviceAdapters/SpectralLMM5/Makefile.am +++ b/DeviceAdapters/SpectralLMM5/Makefile.am @@ -1,4 +1,4 @@ -pkglibdir = $(DEVICEADAPTERPATH) + AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive pkglib_LTLIBRARIES = libmmgr_dal_SpectralLMM5.la libmmgr_dal_SpectralLMM5_la_SOURCES = SpectralLMM5.cpp SpectralLMM5.h SpectralLMM5Interface.cpp SpectralLMM5Interface.h diff --git a/DeviceAdapters/Spot/Makefile.am b/DeviceAdapters/Spot/Makefile.am index 87ab6f0d3a..835d2b2efd 100644 --- a/DeviceAdapters/Spot/Makefile.am +++ b/DeviceAdapters/Spot/Makefile.am @@ -1,7 +1,7 @@ -pkglibdir = $(DEVICEADAPTERPATH) -AM_CPPFLAGS = -F/Library/Frameworks -AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive -pkglib_LTLIBRARIES = libmmgr_dal_Spot.la -libmmgr_dal_Spot_la_SOURCES = SpotCamera.cpp SpotDevice.cpp CodeUtility.h CodeUtility.cpp SpotCamera.h SpotDevice.h -libmmgr_dal_Spot_la_LIBADD = $(MMDEVAPI_LIBADD) -libmmgr_dal_Spot_la_LDFLAGS = $(MMDEVAPI_LDFLAGS) $(SPOTFRAMEWORKS) + +AM_CPPFLAGS = -F/Library/Frameworks +AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive +pkglib_LTLIBRARIES = libmmgr_dal_Spot.la +libmmgr_dal_Spot_la_SOURCES = SpotCamera.cpp SpotDevice.cpp CodeUtility.h CodeUtility.cpp SpotCamera.h SpotDevice.h +libmmgr_dal_Spot_la_LIBADD = $(MMDEVAPI_LIBADD) +libmmgr_dal_Spot_la_LDFLAGS = $(MMDEVAPI_LDFLAGS) $(SPOTFRAMEWORKS) diff --git a/DeviceAdapters/SutterLambda/Makefile.am b/DeviceAdapters/SutterLambda/Makefile.am index c3b294f424..ab8d5e1505 100644 --- a/DeviceAdapters/SutterLambda/Makefile.am +++ b/DeviceAdapters/SutterLambda/Makefile.am @@ -1,4 +1,4 @@ -pkglibdir = $(DEVICEADAPTERPATH) + AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive pkglib_LTLIBRARIES = libmmgr_dal_SutterLambda.la libmmgr_dal_SutterLambda_la_SOURCES = SutterLambda.cpp SutterLambda.h diff --git a/DeviceAdapters/SutterStage/Makefile.am b/DeviceAdapters/SutterStage/Makefile.am index 758759719c..7ddac22e21 100644 --- a/DeviceAdapters/SutterStage/Makefile.am +++ b/DeviceAdapters/SutterStage/Makefile.am @@ -1,4 +1,4 @@ -pkglibdir = $(DEVICEADAPTERPATH) + AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive pkglib_LTLIBRARIES = libmmgr_dal_SutterStage.la libmmgr_dal_SutterStage_la_SOURCES = SutterStage.cpp SutterStage.h diff --git a/DeviceAdapters/Thorlabs/Makefile.am b/DeviceAdapters/Thorlabs/Makefile.am index 9c8ccaac6b..655c70d7f5 100644 --- a/DeviceAdapters/Thorlabs/Makefile.am +++ b/DeviceAdapters/Thorlabs/Makefile.am @@ -1,4 +1,4 @@ -pkglibdir = $(DEVICEADAPTERPATH) + AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive pkglib_LTLIBRARIES = libmmgr_dal_ThorLabs.la libmmgr_dal_ThorLabs_la_SOURCES = \ diff --git a/DeviceAdapters/ThorlabsDCxxxx/Makefile.am b/DeviceAdapters/ThorlabsDCxxxx/Makefile.am index dc98f34beb..f55589bf4b 100644 --- a/DeviceAdapters/ThorlabsDCxxxx/Makefile.am +++ b/DeviceAdapters/ThorlabsDCxxxx/Makefile.am @@ -1,4 +1,4 @@ -pkglibdir = $(DEVICEADAPTERPATH) + AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive pkglib_LTLIBRARIES = libmmgr_dal_ThorlabsDCxxxx.la libmmgr_dal_ThorlabsDCxxxx_la_SOURCES = DCxxxx_Plugin.cpp DCxxxx_Plugin.h diff --git a/DeviceAdapters/ThorlabsFilterWheel/Makefile.am b/DeviceAdapters/ThorlabsFilterWheel/Makefile.am index 5a33d68f9d..b5060bb1a4 100644 --- a/DeviceAdapters/ThorlabsFilterWheel/Makefile.am +++ b/DeviceAdapters/ThorlabsFilterWheel/Makefile.am @@ -1,4 +1,4 @@ -pkglibdir = $(DEVICEADAPTERPATH) + AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive pkglib_LTLIBRARIES = libmmgr_dal_ThorlabsFilterWheel.la libmmgr_dal_ThorlabsFilterWheel_la_SOURCES = FilterWheel.cpp FilterWheel.h diff --git a/DeviceAdapters/ThorlabsSC10/Makefile.am b/DeviceAdapters/ThorlabsSC10/Makefile.am index 2e4b9a8d32..50039a7e63 100644 --- a/DeviceAdapters/ThorlabsSC10/Makefile.am +++ b/DeviceAdapters/ThorlabsSC10/Makefile.am @@ -1,4 +1,4 @@ -pkglibdir = $(DEVICEADAPTERPATH) + AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive pkglib_LTLIBRARIES = libmmgr_dal_ThorLabsSC10.la libmmgr_dal_ThorLabsSC10_la_SOURCES = SC10.cpp SC10.h diff --git a/DeviceAdapters/Tofra/Makefile.am b/DeviceAdapters/Tofra/Makefile.am index e9555abe27..f9c50d68b1 100644 --- a/DeviceAdapters/Tofra/Makefile.am +++ b/DeviceAdapters/Tofra/Makefile.am @@ -1,4 +1,4 @@ -pkglibdir = $(DEVICEADAPTERPATH) + AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive pkglib_LTLIBRARIES = libmmgr_dal_Tofra.la libmmgr_dal_Tofra_la_SOURCES = Tofra.cpp Tofra.h diff --git a/DeviceAdapters/USBManager/Makefile.am b/DeviceAdapters/USBManager/Makefile.am old mode 100755 new mode 100644 index 3a3726fbce..4dc1c054db --- a/DeviceAdapters/USBManager/Makefile.am +++ b/DeviceAdapters/USBManager/Makefile.am @@ -1,8 +1,11 @@ -pkglibdir = $(DEVICEADAPTERPATH) -AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive + + +AM_CPPFLAGS = $(LIBUSB_0_1_CPPFLAGS) +AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) $(LIBUSB_0_1_CFLAGS) +AM_LDFLAGS = $(MMDEVAPI_LDFLAGS) $(LIBUSB_0_1_LDFLAGS) + pkglib_LTLIBRARIES = libmmgr_dal_USBManager.la libmmgr_dal_USBManager_la_SOURCES = USBManager.cpp USBManager.h -libmmgr_dal_USBManager_la_LIBADD = $(MMDEVAPI_LIBADD) $(LIBUSB) -libmmgr_dal_USBManager_la_LDFLAGS = $(MMDEVAPI_LDFLAGS) +libmmgr_dal_USBManager_la_LIBADD = $(MMDEVAPI_LIBADD) $(LIBUSB_0_1_LIBS) EXTRA_DIST = license.txt diff --git a/DeviceAdapters/Utilities/Makefile.am b/DeviceAdapters/Utilities/Makefile.am index 7de232ea9e..13fea690aa 100644 --- a/DeviceAdapters/Utilities/Makefile.am +++ b/DeviceAdapters/Utilities/Makefile.am @@ -1,4 +1,4 @@ -pkglibdir = $(DEVICEADAPTERPATH) + AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive pkglib_LTLIBRARIES = libmmgr_dal_Utilities.la libmmgr_dal_Utilities_la_SOURCES = Utilities.h Utilities.cpp diff --git a/DeviceAdapters/VariLC/Makefile.am b/DeviceAdapters/VariLC/Makefile.am index 095bb44435..f0488f6639 100644 --- a/DeviceAdapters/VariLC/Makefile.am +++ b/DeviceAdapters/VariLC/Makefile.am @@ -1,4 +1,4 @@ -pkglibdir = $(DEVICEADAPTERPATH) + AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive pkglib_LTLIBRARIES = libmmgr_dal_VariLC.la libmmgr_dal_VariLC_la_SOURCES = VariLC.cpp VariLC.h diff --git a/DeviceAdapters/Video4Linux/Makefile.am b/DeviceAdapters/Video4Linux/Makefile.am index 199ffe5604..81558462cc 100644 --- a/DeviceAdapters/Video4Linux/Makefile.am +++ b/DeviceAdapters/Video4Linux/Makefile.am @@ -1,4 +1,4 @@ -pkglibdir = $(DEVICEADAPTERPATH) + AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive pkglib_LTLIBRARIES = libmmgr_dal_video4linux2.la libmmgr_dal_video4linux2_la_SOURCES = video4linux2.cpp video4linux2.h diff --git a/DeviceAdapters/Vincent/Makefile.am b/DeviceAdapters/Vincent/Makefile.am index ae5ad18112..6ed8f8e876 100644 --- a/DeviceAdapters/Vincent/Makefile.am +++ b/DeviceAdapters/Vincent/Makefile.am @@ -1,4 +1,4 @@ -pkglibdir = $(DEVICEADAPTERPATH) + AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive pkglib_LTLIBRARIES = libmmgr_dal_Vincent.la libmmgr_dal_Vincent_la_SOURCES = Vincent.cpp Vincent.h diff --git a/DeviceAdapters/Vortran/Makefile.am b/DeviceAdapters/Vortran/Makefile.am index 5c458dfa58..23c7cb5e4a 100644 --- a/DeviceAdapters/Vortran/Makefile.am +++ b/DeviceAdapters/Vortran/Makefile.am @@ -1,4 +1,4 @@ -pkglibdir = $(DEVICEADAPTERPATH) + AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive pkglib_LTLIBRARIES = libmmgr_dal_Stradus.la libmmgr_dal_VersaLase.la libmmgr_dal_Stradus_la_SOURCES = Stradus.cpp Stradus.h diff --git a/DeviceAdapters/XCite120PC_Exacte/Makefile.am b/DeviceAdapters/XCite120PC_Exacte/Makefile.am index 14d8a5390c..8de16e89cf 100644 --- a/DeviceAdapters/XCite120PC_Exacte/Makefile.am +++ b/DeviceAdapters/XCite120PC_Exacte/Makefile.am @@ -1,4 +1,4 @@ -pkglibdir = $(DEVICEADAPTERPATH) + AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive pkglib_LTLIBRARIES = libmmgr_dal_XCite120PCExacte.la libmmgr_dal_XCite120PCExacte_la_SOURCES = XCite.cpp XCite120PC_Exacte.h XCite120PC.h XCite120PC.cpp XCiteExacte.h XCiteExacte.cpp diff --git a/DeviceAdapters/XCiteLed/Makefile.am b/DeviceAdapters/XCiteLed/Makefile.am index 11c621c180..bc548bf0a7 100644 --- a/DeviceAdapters/XCiteLed/Makefile.am +++ b/DeviceAdapters/XCiteLed/Makefile.am @@ -1,4 +1,4 @@ -pkglibdir = $(DEVICEADAPTERPATH) + AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive pkglib_LTLIBRARIES = libmmgr_dal_XCiteLed.la libmmgr_dal_XCiteLed_la_SOURCES = XLed.cpp XLed.h XLedCtrl.cpp XLedCtrl.h XLedDev.cpp XLedDev.h diff --git a/DeviceAdapters/XLight/Makefile.am b/DeviceAdapters/XLight/Makefile.am index 002a9881ba..6b3a4e3b45 100644 --- a/DeviceAdapters/XLight/Makefile.am +++ b/DeviceAdapters/XLight/Makefile.am @@ -1,4 +1,4 @@ -pkglibdir = $(DEVICEADAPTERPATH) + AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) pkglib_LTLIBRARIES = libmmgr_dal_XLight.la libmmgr_dal_XLight_la_SOURCES = XLight.cpp XLight.h XLIGHTHub.h XLIGHTHub.cpp diff --git a/DeviceAdapters/Xcite/Makefile.am b/DeviceAdapters/Xcite/Makefile.am index d3de50cade..97a34b028f 100644 --- a/DeviceAdapters/Xcite/Makefile.am +++ b/DeviceAdapters/Xcite/Makefile.am @@ -1,4 +1,4 @@ -pkglibdir = $(DEVICEADAPTERPATH) + AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive pkglib_LTLIBRARIES = libmmgr_dal_Xcite.la libmmgr_dal_Xcite_la_SOURCES = Xcite.cpp Xcite.h diff --git a/DeviceAdapters/Yokogawa/Makefile.am b/DeviceAdapters/Yokogawa/Makefile.am index 9e637095fc..a2f63212c8 100644 --- a/DeviceAdapters/Yokogawa/Makefile.am +++ b/DeviceAdapters/Yokogawa/Makefile.am @@ -1,4 +1,4 @@ -pkglibdir = $(DEVICEADAPTERPATH) + AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive pkglib_LTLIBRARIES = libmmgr_dal_CSU22.la libmmgr_dal_CSUX.la libmmgr_dal_CSU22_la_SOURCES = CSU22.cpp CSU22.h CSU22Hub.h CSU22Hub.cpp diff --git a/DeviceAdapters/Zaber/Makefile.am b/DeviceAdapters/Zaber/Makefile.am index 83892faa60..24d977dd75 100644 --- a/DeviceAdapters/Zaber/Makefile.am +++ b/DeviceAdapters/Zaber/Makefile.am @@ -1,4 +1,4 @@ -pkglibdir = $(DEVICEADAPTERPATH) + AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) pkglib_LTLIBRARIES = libmmgr_dal_Zaber.la libmmgr_dal_Zaber_la_SOURCES = \ diff --git a/DeviceAdapters/ZeissCAN/Makefile.am b/DeviceAdapters/ZeissCAN/Makefile.am index f44380b338..37cbe149d1 100644 --- a/DeviceAdapters/ZeissCAN/Makefile.am +++ b/DeviceAdapters/ZeissCAN/Makefile.am @@ -1,4 +1,4 @@ -pkglibdir = $(DEVICEADAPTERPATH) + AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive pkglib_LTLIBRARIES = libmmgr_dal_ZeissCAN.la libmmgr_dal_ZeissCAN_la_SOURCES = ZeissCAN.cpp mcu28.cpp ZStage.cpp ZeissCAN.h diff --git a/DeviceAdapters/ZeissCAN29/Makefile.am b/DeviceAdapters/ZeissCAN29/Makefile.am index 2407d39c79..884fe6b64d 100644 --- a/DeviceAdapters/ZeissCAN29/Makefile.am +++ b/DeviceAdapters/ZeissCAN29/Makefile.am @@ -1,4 +1,4 @@ -pkglibdir = $(DEVICEADAPTERPATH) + AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive pkglib_LTLIBRARIES = libmmgr_dal_ZeissCAN29.la libmmgr_dal_ZeissCAN29_la_SOURCES = ZeissCAN29.cpp ZeissCAN29.h ZeissHub.cpp ZeissMonitor.cpp \ diff --git a/DeviceAdapters/configure.ac b/DeviceAdapters/configure.ac new file mode 100644 index 0000000000..1f7a3e4f51 --- /dev/null +++ b/DeviceAdapters/configure.ac @@ -0,0 +1,466 @@ + +AC_PREREQ([2.64]) +AC_INIT([Micro-Manager], [1.4], [info@micro-manager.org]) +AC_CONFIG_MACRO_DIR([../m4]) +AC_CONFIG_SRCDIR([DemoCamera/DemoCamera.cpp]) +AC_CANONICAL_HOST +AM_INIT_AUTOMAKE +LT_INIT([disable-static]) + +AC_PROG_CXX([clang++ llvm-g++ g++ c++]) +AC_PROG_CC([clang llvm-gcc gcc cc]) + +# TODO: Following should decide whether adapters depending on BOOST get build +AX_BOOST_BASE([1.40.0]) +AX_BOOST_THREAD +AX_BOOST_ASIO +AX_BOOST_SYSTEM +AX_BOOST_CHRONO +AX_BOOST_DATE_TIME + +# Find Micro-Manager headers +micromanager_path=${ac_pwd}/.. +MMDEVAPI_CXXFLAGS="-I${micromanager_path}/MMDevice ${BOOST_CPPFLAGS}" +AC_SUBST(MMDEVAPI_CXXFLAGS) + +# Find Micro-Manager static device library +MMDEVAPI_LIBADD="${micromanager_path}/MMDevice/libMMDevice.la" +AC_SUBST(MMDEVAPI_LIBADD) + +# Apply appropriate libtool options for the Micro-Manager device API +MMDEVAPI_LDFLAGS="-module -avoid-version -shrext \"\$(MMSUFFIX)\"" +AC_SUBST(MMDEVAPI_LDFLAGS) + +# Location of third party public files +thirdpartypublic="${micromanager_path}/../3rdpartypublic" + + +# libusb 0.1 or libusb-compat +MM_ARG_WITH_OPTIONAL_LIB([libusb 0.1 or libusb-compat], [libusb-0-1], [LIBUSB_0_1]) +AS_IF([test "x$want_libusb_0_1" != xno], +[ + MM_LIB_USB_0_1([$LIBUSB_0_1_PREFIX], + [ + use_libusb_0_1=yes + ], + [ + use_libusb_0_1=no + AS_IF([test "x$want_libusb_0_1" = xyes], + [MM_MSG_OPTIONAL_LIB_FAILURE([libusb 0.1 or libusb-compat], [libusb-0-1])]) + ]) +], +[use_libusb_0_1=no]) + + +AM_CONDITIONAL([BUILD_USBMANAGER], [test "x$use_libusb_0_1" = xyes]) + + +# HIDAPI +MM_ARG_WITH_OPTIONAL_LIB([HIDAPI], [hidapi], [HIDAPI]) +AS_IF([test "x$want_hidapi" != xno], +[ + MM_LIB_HIDAPI([$HIDAPI_PREFIX], + [ + use_hidapi=yes + ], + [ + use_hidapi=no + AS_IF([test "x$want_hidapi" = xyes], + [MM_MSG_OPTIONAL_LIB_FAILURE([HIDAPI], [hidapi])]) + ]) +], +[use_hidapi=no]) + + +AM_CONDITIONAL([BUILD_HID], [test "x$use_hidapi" = xyes]) + + +# Only build PVCAM if header files present. +AC_MSG_CHECKING(for Pvcam) +AC_FIND_FILE([pvcam.h], [/usr/include/pvcam /Library/Frameworks/PVCAM.framework/Headers], PVCAMINCDIR) +if test x$PVCAMINCDIR = xNO; then + AC_MSG_RESULT([not found]) +fi +AM_CONDITIONAL([BUILD_PVCAM], [test -f "$PVCAMINCDIR/pvcam.h"]) +if test -f "$PVCAMINCDIR/pvcam.h" ; then + AC_MSG_RESULT([found]) +else + AC_MSG_RESULT([not found]) +fi + +# Same for QCam +AC_MSG_CHECKING(for QCam) +AM_CONDITIONAL([BUILD_QCAM],[test -f "/Library/Frameworks/QCam.framework/Headers/QCamApi.h"]) +if test -f "/Library/Frameworks/QCam.framework/Headers/QCamApi.h" ; then + AC_MSG_RESULT([found]) +else + AC_MSG_RESULT([not found]) +fi + + +# Same for Scion +AC_MSG_CHECKING(for Scion) +AM_CONDITIONAL([BUILD_SCION],[test -f "/Library/Frameworks/sfwlib.framework/Headers/sfwlib.h"]) +if test -f "/Library/Frameworks/sfwlib.framework/Headers/sfwlib.h"; then + AC_MSG_RESULT([found]) +else + AC_MSG_RESULT([not found]) +fi + +# Same for Diagnostic Spot +AC_MSG_CHECKING(for Diagnostic Spot) +AM_CONDITIONAL([BUILD_SPOT],[test -f "/Library/Frameworks/SpotCam.framework/Headers/SpotCam.h"]) +if test -f "/Library/Frameworks/SpotCam.framework/Headers/SpotCam.h"; then + AC_MSG_RESULT([found]) +else + AC_MSG_RESULT([not found]) +fi + + +# libdc1394 2.x +MM_ARG_WITH_OPTIONAL_LIB([libdc1394], [libdc1394], [LIBDC1394]) +AS_IF([test "x$want_libdc1394" != xno], +[ + MM_LIB_DC1394([$LIBDC1394_PREFIX], + [ + use_libdc1394=yes + ], + [ + use_libdc1394=no + AS_IF([test "x$want_libdc1394" = xyes], + [MM_MSG_OPTIONAL_LIB_FAILURE([libdc1394], [libdc1394])]) + ]) +], +[use_libdc1394=no]) + + +# TODO These BUILD_x conditionals should not be associated with particular +# libraries; they might depend on multiple libraries. Should collect them at +# the end of this file +AM_CONDITIONAL([BUILD_DC1394], [test "x$use_libdc1394" = xyes]) +# TODO BUILD_IIDC should also check for Boost libraries +AM_CONDITIONAL([BUILD_IIDC], [test "x$use_libdc1394" = xyes]) + + +# Andor cameras on linux +AC_MSG_CHECKING(for Andor cameras) +AM_CONDITIONAL([BUILD_ANDOR],[test -f "/usr/local/include/atmcdLXd.h"]) +if test -f "/usr/local/include/atmcdLXd.h" ; then + AC_MSG_RESULT([found]) +else + AC_MSG_RESULT([not found]) +fi + +# Andor laser combiner on linux +AC_MSG_CHECKING(for Andor laser combiner) +AM_CONDITIONAL([BUILD_ANDORLASERCOMBINER],[test -f "/usr/local/include/ALC_REV.h"]) +if test -f "/usr/local/include/ALC_REV.h" ; then + AC_MSG_RESULT([found]) +else + AC_MSG_RESULT([not found]) +fi + +# Sensicam on linux +AC_MSG_CHECKING(for Sensicam) +AM_CONDITIONAL([BUILD_SENSICAM],[test -f "/usr/local/include/sensicam.h"]) +if test -f "/usr/local/include/sensicam.h"; then + AC_MSG_RESULT([found]) +else + AC_MSG_RESULT([not found]) +fi + + + +# check for IDS_uEye header file and library +AC_MSG_CHECKING(for IDS_uEye header file and library) +AC_CHECK_HEADERS(ueye.h, + [AC_CHECK_LIB(ueye_api,is_GetDLLVersion,IDSUEYE_PRESENT=true,IDSUEYE_PRESENT=false)], + IDSUEYE_PRESENT=false) +AM_CONDITIONAL(BUILD_IDSUEYE, $IDSUEYE_PRESENT) + +if [$IDSUEYE_PRESENT]; then + AC_MSG_NOTICE([IDS_uEye present]) +else + AC_MSG_NOTICE([IDS_uEye not present]) +fi + + +MM_ARG_WITH_OPTIONAL_LIB([libgphoto2], [gphoto2], [GPHOTO2]) +AS_IF([test "x$want_gphoto2" != xno], +[ + MM_LIB_GPHOTO2([$GPHOTO2_PREFIX], + [ + use_gphoto2=yes + ], + [ + use_gphoto2=no + AS_IF([test "x$want_gphoto2" = xyes], + [MM_MSG_OPTIONAL_LIB_FAILURE([libgphoto2], [gphoto2])]) + ]) +], +[use_gphoto2=no]) + + +MM_ARG_WITH_OPTIONAL_LIB([FreeImagePlus], [freeimageplus], [FREEIMAGEPLUS]) +AS_IF([test "x$want_freeimageplus" != xno], +[ + MM_LIB_FREEIMAGEPLUS([$FREEIMAGEPLUS_PREFIX], + [ + use_freeimageplus=yes + ], + [ + use_freeimageplus=no + AS_IF([test "x$want_freeimageplus" = xyes], + [MM_MSG_OPTIONAL_LIB_FAILURE([FreeImagePlus], [freeimageplus])]) + ]) +], +[use_freeimageplus=no]) + + +build_simplecam=no +test "x$use_gphoto2" = xyes && { + test "x$use_freeimageplus" = xyes && build_simplecam=yes; } +AM_CONDITIONAL([BUILD_SIMPLECAM], [test "x$build_simplecam" = xyes]) + + +# Video4linux +AC_MSG_CHECKING(for Video4linux2) +AM_CONDITIONAL([BUILD_V4L2],[test -f "/usr/include/linux/videodev2.h"]) +if test -f "/usr/include/linux/videodev2.h"; then + AC_MSG_RESULT([found]) +else + AC_MSG_RESULT([not found]) +fi + +# ITC on linux +AC_MSG_CHECKING(for ITC) +AM_CONDITIONAL([BUILD_ITC],[test -f "/usr/local/include/ITC18.h"]) +if test -f "/usr/local/include/ITC18.h" ; then + AC_MSG_RESULT([found]) +else + AC_MSG_RESULT([not found]) +fi + + +# OpenCV +MM_ARG_WITH_OPTIONAL_LIB([OpenCV], [opencv], [OPENCV]) +AS_IF([test "x$want_opencv" != xno], +[ + MM_LIB_OPENCV([$OPENCV_PREFIX], + [ + use_opencv=yes + ], + [ + use_opencv=no + AS_IF([test "x$want_opencv" = xyes], + [MM_MSG_OPTIONAL_LIB_FAILURE([OpenCV], [opencv])]) + ]) +], +[use_opencv=no]) + + +AM_CONDITIONAL([BUILD_OPENCV], [test "x$use_opencv" = xyes]) + + +# Only build ... when the code is there +AM_CONDITIONAL([BUILD_TEST],[test -f "Test/Test.h"]) +if test -f "Test/Test.h"; then + TEST=Test + TESTMAKEFILE="Test/Makefile" +else + TEST= + TESTMAKEFILE= +fi +AC_SUBST(TEST) + +# Checks for typedefs, structures, and compiler characteristics. +AC_HEADER_STDBOOL +AC_C_CONST +AC_C_INLINE + + +# On the Mac we need some frameworks that can be in the way on Linux +case $host in + *apple-darwin*) + AC_MSG_CHECKING(pvcam linker flags) + PVCAMFRAMEWORKS="-framework PVCAM" + AC_MSG_RESULT($PVCAMFRAMEWORKS) + AC_MSG_CHECKING(diagnostic spot linker flags) + SPOTFRAMEWORKS="-framework SpotCam" + AC_MSG_RESULT($SPOTFRAMEWORKS) + AC_MSG_CHECKING(Serial adapter linker flags) + SERIALFRAMEWORKS="-framework CoreFoundation -framework IOKit" + AC_MSG_RESULT($SERIALFRAMEWORKS) + AC_MSG_CHECKING(QuickTime linker flags) + QUICKTIMEFRAMEWORKS="-framework QuickTime -framework QTKit" + AC_MSG_RESULT($QUICKTIMEFRAMEWORKS) + ;; + *linux*) + AC_MSG_CHECKING(pvcam linker flags) + PVCAMFRAMEWORKS="-lpvcam" + ;; +esac +AC_SUBST(PVCAMFRAMEWORKS) +AC_SUBST(SPOTFRAMEWORKS) +AC_SUBST(SERIALFRAMEWORKS) +AC_SUBST(QUICKTIMEFRAMEWORKS) + +# Micro-Manager libraries have a prefix & suffix to make them unique. These are defined here: +case $host in + *-*-linux*) + MMSUFFIX=".so.0" + MMPREFIX="libmmgr_dal_" + ;; +esac +if test -z "$MMSUFFIX"; then + MMSUFFIX="" +fi +if test -z "$MMPREFIX"; then + MMPREFIX="mmgr_dal_" +fi + +AC_MSG_CHECKING(library suffix) +AC_MSG_RESULT($MMSUFFIX) +AC_SUBST(MMSUFFIX) +AC_MSG_CHECKING(library prefix) +AC_MSG_RESULT($MMPREFIX) +AC_SUBST(MMPREFIX) + + +# Checks for library functions. +AC_HEADER_STDC +AC_CHECK_FUNCS([memset]) + + +# Please keep the list of device adapter directories in ASCII-lexical order, +# with an indent of 3 spaces (no tabs)! (Just pass through sort(1).) +m4_define([device_adapter_dirs], [m4_strip([ + AAAOTF + AOTF + ASIFW1000 + ASIStage + ASITiger + ASIWPTR + Aladdin + Andor + AndorLaserCombiner + Aquinas + Arduino + CARVII + CONEX + CSUW1 + Cobolt + CoherentCube + Conix + Corvus + DTOpenLayer + DemoCamera + FocalPoint + FreeSerialPort + HIDManager + IDS_uEye + IIDC + ITC18 + ImageProcessorChain + K8055 + K8061 + LeicaDMI + LeicaDMR + LeicaDMSTC + Ludl + LudlLow + LumencorSpectra + MP285 + MaestroServo + Marzhauser-LStep + Marzhauser + MicroPoint + Motic_mac + Neos + Nikon + NikonTE2000 + Omicron + OpenCVgrabber + Oxxius + PI + PI_GCS + PI_GCS_2 + PVCAM + ParallelPort + Pecon + Piezosystem_30DV50 + Piezosystem_NV120_1 + Piezosystem_NV40_1 + Piezosystem_NV40_3 + Piezosystem_dDrive + PrecisExcite + PrincetonInstruments + Prior + PriorLegacy + QCam + Sapphire + Scientifica + ScionCam + Sensicam + SerialManager + SimpleAutofocus + SimpleCam + SpectralLMM5 + Spot + SutterLambda + SutterStage + Thorlabs + ThorlabsDCxxxx + ThorlabsFilterWheel + ThorlabsSC10 + Tofra + USBManager + Utilities + VariLC + Video4Linux + Vincent + Vortran + XCite120PC_Exacte + XCiteLed + XLight + Xcite + Yokogawa + Zaber + ZeissCAN + ZeissCAN29 + dc1394 + kdv + nPoint + pgFocus +])]) + +AC_CONFIG_FILES(Makefile m4_map_args_w(device_adapter_dirs, [], [/Makefile], [ ])) + +AC_OUTPUT + + +# Show a summary of the configuration +echo "" +echo "m4_text_box([DeviceAdapters configuration])" +echo "" +echo "Note: This is an incomplete list currently under development." +echo "" +echo "m4_text_wrap([$use_freeimageplus], + [ ], + [ Build with FreeImagePlus: ])" +echo "m4_text_wrap([$use_hidapi], + [ ], + [ Build with HIDAPI: ])" +echo "m4_text_wrap([$use_libdc1394], + [ ], + [ Build with libdc1394: ])" +echo "m4_text_wrap([$use_gphoto2], + [ ], + [ Build with libgphoto2: ])" +echo "m4_text_wrap([$use_libusb_0_1], + [ ], + [ Build with libusb 0.1 (libusb-compat): ])" +echo "m4_text_wrap([$use_opencv], + [ ], + [ Build with OpenCV: ])" +echo "" diff --git a/DeviceAdapters/configure.in b/DeviceAdapters/configure.in deleted file mode 100644 index a6447f330f..0000000000 --- a/DeviceAdapters/configure.in +++ /dev/null @@ -1,492 +0,0 @@ -# -*- Autoconf -*- -# Process this file with autoconf to produce a configure script. - -AC_PREREQ(2.57) -AC_INIT(FULL-PACKAGE-NAME, VERSION, BUG-REPORT-ADDRESS) -AC_CONFIG_MACRO_DIR([../m4]) -AC_CONFIG_SRCDIR([DemoCamera/DemoCamera.cpp]) -AC_CANONICAL_HOST -AM_INIT_AUTOMAKE -AC_DISABLE_STATIC -AC_PROG_LIBTOOL - -m4_include([../configure.common]) - -# TODO: Following should decide whether adapters depending on BOOST get build -AX_BOOST_BASE([1.40.0]) -AX_BOOST_THREAD -AX_BOOST_ASIO -AX_BOOST_SYSTEM -AX_BOOST_CHRONO -AX_BOOST_DATE_TIME - -# Find Micro-Manager headers -micromanager_path=${ac_pwd}/.. -MMDEVAPI_CXXFLAGS="-I${micromanager_path}/MMDevice ${BOOST_CPPFLAGS}" -AC_SUBST(MMDEVAPI_CXXFLAGS) - -# Find Micro-Manager static device library -## Note: adding the libtool library gives problems on OS X 10.4, adding the static lib works -MMDEVAPI_LIBADD="${micromanager_path}/MMDevice/.libs/libMMDevice.a" -AC_SUBST(MMDEVAPI_LIBADD) - -# Apply appropriate libtool options for the Micro-Manager device API -MMDEVAPI_LDFLAGS="-module -shared -shrext \"\$(MMSUFFIX)\" -avoid-version" -AC_SUBST(MMDEVAPI_LDFLAGS) - -# Location of third party public files -thirdpartypublic="${micromanager_path}/../3rdpartypublic" - - -# Checkfor libUSB -AC_MSG_CHECKING(for libusb) -AC_FIND_FILE([usb.h], [/usr/include /usr/local/$ARCH/include], USBINCDIR) -if test x$USBINCDIR = xNO; then - AC_MSG_RESULT([not found]) -else - AC_CHECK_HEADERS([$USBINCDIR/usb.h]) - if test -z "$LIBUSB" ; then - case $host in - *-*-linux*) - LIBUSB="-lusb" - ;; - *) - AC_FIND_FILE([libusb.a], [/usr/lib /usr/lib64 /usr/local/$ARCH/lib], USBLIBDIR) - if test x$USBLIBDIR = xNO; then - AC_MSG_RESULT(["libusb not found"]) - else - AC_MSG_RESULT(["libusb.a" found]) - LIBUSB="$USBLIBDIR/libusb.a" - fi - ;; - esac - fi -fi -AC_SUBST(LIBUSB) -AM_CONDITIONAL([BUILD_USBMANAGER], [test -n "$LIBUSB"]) - -# Check for HIDAPI -case $host in - *apple-darwin*) - AC_MSG_CHECKING(for hidapi) - AC_FIND_FILE([hidapi/hidapi.h], [${thirdpartypublic}/hidapi/hidapi-0.7.0], HIDAPIINCDIR) - if test x$HIDAPIINCDIR = xNO; then - AC_MSG_RESULT([not found]) - else - AC_FIND_FILE([hid.c], [${thirdpartypublic}/hidapi/hidapi-0.7.0/mac], HIDAPICDIR) - if test x$HIDAPCDIR = xNO; then - AC_MSG_RESULT([not found]) - fi - fi - ;; -esac - -AM_CONDITIONAL([BUILD_HID], [test -f "$HIDAPIINCDIR/hidapi/hidapi.h"]) -if test -f "$HIDAPIINCDIR/hidapi/hidapi.h" ; then - AC_MSG_RESULT([found]) -fi -AC_SUBST(HIDAPICDIR) -AC_SUBST(HIDAPIINCDIR) - -# Only build PVCAM if header files present. -AC_MSG_CHECKING(for Pvcam) -AC_FIND_FILE([pvcam.h], [/usr/include/pvcam /Library/Frameworks/PVCAM.framework/Headers], PVCAMINCDIR) -if test x$PVCAMINCDIR = xNO; then - AC_MSG_RESULT([not found]) -fi -AM_CONDITIONAL([BUILD_PVCAM], [test -f "$PVCAMINCDIR/pvcam.h"]) -if test -f "$PVCAMINCDIR/pvcam.h" ; then - AC_MSG_RESULT([found]) -else - AC_MSG_RESULT([not found]) -fi - -# Same for QCam -AC_MSG_CHECKING(for QCam) -AM_CONDITIONAL([BUILD_QCAM],[test -f "/Library/Frameworks/QCam.framework/Headers/QCamApi.h"]) -if test -f "/Library/Frameworks/QCam.framework/Headers/QCamApi.h" ; then - AC_MSG_RESULT([found]) -else - AC_MSG_RESULT([not found]) -fi - - -# Same for Scion -AC_MSG_CHECKING(for Scion) -AM_CONDITIONAL([BUILD_SCION],[test -f "/Library/Frameworks/sfwlib.framework/Headers/sfwlib.h"]) -if test -f "/Library/Frameworks/sfwlib.framework/Headers/sfwlib.h"; then - AC_MSG_RESULT([found]) -else - AC_MSG_RESULT([not found]) -fi - -# Same for Diagnostic Spot -AC_MSG_CHECKING(for Diagnostic Spot) -AM_CONDITIONAL([BUILD_SPOT],[test -f "/Library/Frameworks/SpotCam.framework/Headers/SpotCam.h"]) -if test -f "/Library/Frameworks/SpotCam.framework/Headers/SpotCam.h"; then - AC_MSG_RESULT([found]) -else - AC_MSG_RESULT([not found]) -fi - -# and for Firewire cameras (libdc1394) -AC_MSG_CHECKING(for libdc1394) -AC_FIND_FILE([dc1394], [/usr/include /usr/local/$ARCH/include], DC1394INCDIR) -if test x$DC1394INCDIR = xNO; then - AC_MSG_RESULT([not found]) -else - AC_CHECK_HEADERS([$DC1394INCDIR/dc1394/dc1394.h]) - if test -z "$LIBDC1394" ; then - case $host in - *-*-linux*) - LIBDC1394="-ldc1394" - ;; - *) - AC_FIND_FILE([libdc1394.a], [/usr/lib /usr/lib64 /usr/local/$ARCH/lib], DC1394LIBDIR) - if test x$DC1394LIBDIR = xNO; then - AC_MSG_RESULT(["libdc1394 not found"]) - else - AC_MSG_RESULT(["libdc1394.a" found]) - LIBDC1394="$DC1394LIBDIR/libdc1394.a" - fi - ;; - esac - fi -fi -AC_SUBST(LIBDC1394) -AM_CONDITIONAL([BUILD_DC1394], [test -n "$LIBDC1394"]) -AM_CONDITIONAL([BUILD_IIDC], [test -n "$LIBDC1394"]) - -# Andor cameras on linux -AC_MSG_CHECKING(for Andor cameras) -AM_CONDITIONAL([BUILD_ANDOR],[test -f "/usr/local/include/atmcdLXd.h"]) -if test -f "/usr/local/include/atmcdLXd.h" ; then - AC_MSG_RESULT([found]) -else - AC_MSG_RESULT([not found]) -fi - -# Andor laser combiner on linux -AC_MSG_CHECKING(for Andor laser combiner) -AM_CONDITIONAL([BUILD_ANDORLASERCOMBINER],[test -f "/usr/local/include/ALC_REV.h"]) -if test -f "/usr/local/include/ALC_REV.h" ; then - AC_MSG_RESULT([found]) -else - AC_MSG_RESULT([not found]) -fi - -# Sensicam on linux -AC_MSG_CHECKING(for Sensicam) -AM_CONDITIONAL([BUILD_SENSICAM],[test -f "/usr/local/include/sensicam.h"]) -if test -f "/usr/local/include/sensicam.h"; then - AC_MSG_RESULT([found]) -else - AC_MSG_RESULT([not found]) -fi - - - -# check for IDS_uEye header file and library -AC_MSG_CHECKING(for IDS_uEye header file and library) -AC_CHECK_HEADERS(ueye.h, - [AC_CHECK_LIB(ueye_api,is_GetDLLVersion,IDSUEYE_PRESENT=true,IDSUEYE_PRESENT=false)], - IDSUEYE_PRESENT=false) -AM_CONDITIONAL(BUILD_IDSUEYE, $IDSUEYE_PRESENT) - -if [$IDSUEYE_PRESENT]; then - AC_MSG_NOTICE([IDS_uEye present]) -else - AC_MSG_NOTICE([IDS_uEye not present]) -fi - - - -PKG_PROG_PKG_CONFIG -PKG_CHECK_MODULES([GPHOTO2], [libgphoto2 >= 2.5.1], [have_libgphoto2=yes], [have_libgphoto2=no]) - -# Libtool library -AC_MSG_CHECKING(for ltdl) -AC_FIND_FILE([libltdl.dylib], [/usr/local/$ARCH/lib /usr/lib /usr/lib64], LIBLTDLPATH) -if test x$LIBLTDLPATH = xNO; then - AC_MSG_RESULT(["libltdl not found, can not build GPhoto adapter"]) -else - AC_MSG_RESULT(["libltdl" found]) - LIBLTDL="$LIBLTDLPATH/libltdl.dylib" - - # SimpleCam - GPhoto - if test x$have_libgphoto2 = xno; then - buildsc=false - AC_MSG_RESULT([not found]) - else - AC_MSG_RESULT([found]) - GPHOTO2_VERSION=`$PKG_CONFIG --modversion libgphoto2` - GPHOTO2_PORT_VERSION=`$PKG_CONFIG --modversion libgphoto2_port` - GPHOTO2_LIBDIR=`$PKG_CONFIG --variable=libdir libgphoto2` - LIBGPHOTO2LIBDIR=`$PKG_CONFIG --variable=libdir libgphoto2` - buildsc=false - if test -f "$LIBGPHOTO2LIBDIR/libgphoto2.la"; then - LIBGPHOTO2="$LIBGPHOTO2LIBDIR/libgphoto2.la $LIBLTDL" - buildsc=true - else - if test -f "$LIBGPHOTO2LIBDIR/libgphoto2.so"; then - LIBGPHOTO2="-lgphoto2" - buildsc=true - fi - fi - fi -fi - - -# On mac, install dynamic gphoto2 libraries -case $host in - *apple-darwin*) - AC_SUBST([INSTALL_LIBGPHOTO], [install_macos]) - ;; - *) - AC_SUBST([INSTALL_LIBGPHOTO], [install_linux]) - ;; -esac -AC_SUBST(GPHOTO2_CFLAGS) -AC_SUBST(GPHOTO2_LIBS) -AC_SUBST(GPHOTO2_LIBDIR) -AC_SUBST(GPHOTO2_VERSION) -AC_SUBST(GPHOTO2_PORT_VERSION) -AC_SUBST(LIBGPHOTO2) -AC_SUBST(LIBLTDL) - -# LibFreeImage -AC_MSG_CHECKING(for libFreeImage headers) -AC_FIND_FILE([FreeImage.h], [/usr/local/include /usr/include ${thirdpartypublic}/FreeImage/Dist], FREEIMAGEINCDIR) -AM_CONDITIONAL([LIBFREEIMAGEFOUND], [test -f "$FREEIMAGEINCDIR/FreeImage.h"]) -if test -f "$FREEIMAGEINCDIR/FreeImage.h"; then - AC_MSG_RESULT([found]) - - AC_FIND_FILE([libfreeimage.a], [/usr/lib /usr/lib64 /usr/local/$ARCH/lib], FREEIMAGELIBDIR) - if test x$FREEIMAGELIBDIR = xNO; then - buildsc=false - AC_MSG_RESULT(["libfreeimage.a" not found...]) - else - AC_MSG_RESULT(["libfreeimage.a" found]) - AC_SUBST(LIBFREEIMAGE, "$FREEIMAGELIBDIR/libfreeimage.a") - AC_SUBST(LIBFREEIMAGE_CXXFLAGS, "-I$FREEIMAGEINCDIR") - fi - - AC_MSG_CHECKING(for libFreeImagePlus headers) - AC_FIND_FILE([FreeImagePlus.h], [/usr/local/include /usr/include ${thirdpartypublic}/FreeImage/Wrapper/FreeImagePlus], FREEIMAGEPLUSINCDIR) - if test -f "$FREEIMAGEPLUSINCDIR/FreeImagePlus.h"; then - AC_MSG_RESULT([found]) - AC_SUBST(LIBFREEIMAGEPLUS_CXXFLAGS, "-I$FREEIMAGEPLUSINCDIR") - AC_FIND_FILE([libfreeimageplus.a], [/usr/lib /usr/lib64 /usr/local/$ARCH/lib], FREEIMAGEPLUSLIBDIR) - if test x$FREEIMAGEPLUSLIBDIR = xNO; then - AC_MSG_RESULT(["libfreeimageplus.a" not found (can be ok)]) - else - AC_MSG_RESULT(["libfreeimageplus.a" found]) - AC_SUBST(LIBFREEIMAGEPLUS, "$FREEIMAGEPLUSLIBDIR/libfreeimageplus.a") - fi - else - AC_MSG_RESULT([not found]) - fi -fi -if test x$FREEIMAGELIBDIR = xNO; then - buildsc=false - AC_MSG_RESULT([not found: To build the GPhoto device adapter download and install FreeImage in ../../3rdpartypublic/FreeImage]) -fi -AM_CONDITIONAL([BUILD_SIMPLECAM], [test x$buildsc = xtrue]) - -# Video4linux -AC_MSG_CHECKING(for Video4linux2) -AM_CONDITIONAL([BUILD_V4L2],[test -f "/usr/include/libv4l2.h"]) -if test -f "/usr/include/libv4l2.h"; then - AC_MSG_RESULT([found]) -else - AC_MSG_RESULT([not found]) -fi - -# ITC on linux -AC_MSG_CHECKING(for ITC) -AM_CONDITIONAL([BUILD_ITC],[test -f "/usr/local/include/ITC18.h"]) -if test -f "/usr/local/include/ITC18.h" ; then - AC_MSG_RESULT([found]) -else - AC_MSG_RESULT([not found]) -fi - -# OpenCV -AX_OPENCV -AM_CONDITIONAL(BUILD_OPENCV,test x$hasopencv = xtrue) - -# Only build ... when the code is there -AM_CONDITIONAL([BUILD_TEST],[test -f "Test/Test.h"]) -if test -f "Test/Test.h"; then - TEST=Test - TESTMAKEFILE="Test/Makefile" -else - TEST= - TESTMAKEFILE= -fi -AC_SUBST(TEST) - -# Checks for typedefs, structures, and compiler characteristics. -AC_HEADER_STDBOOL -AC_C_CONST -AC_C_INLINE - - -# On the Mac we need some frameworks that can be in the way on Linux -case $host in - *apple-darwin*) - AC_MSG_CHECKING(pvcam linker flags) - PVCAMFRAMEWORKS="-framework PVCAM" - AC_MSG_RESULT($PVCAMFRAMEWORKS) - AC_MSG_CHECKING(diagnostic spot linker flags) - SPOTFRAMEWORKS="-framework SpotCam" - AC_MSG_RESULT($SPOTFRAMEWORKS) - AC_MSG_CHECKING(Serial adapter linker flags) - SERIALFRAMEWORKS="-framework CoreFoundation -framework IOKit" - AC_MSG_RESULT($SERIALFRAMEWORKS) - AC_MSG_CHECKING(QuickTime linker flags) - QUICKTIMEFRAMEWORKS="-framework QuickTime -framework QTKit" - AC_MSG_RESULT($QUICKTIMEFRAMEWORKS) - AC_MSG_CHECKING(OpenCV linker flags) - OPENCV_XLDFLAGS="-lopencv_imgproc" - AC_MSG_RESULT($OPENCV_XLDFLAGS) - ;; - *linux*) - AC_MSG_CHECKING(pvcam linker flags) - PVCAMFRAMEWORKS="-lpvcam" - ;; -esac -AC_SUBST(PVCAMFRAMEWORKS) -AC_SUBST(SPOTFRAMEWORKS) -AC_SUBST(SERIALFRAMEWORKS) -AC_SUBST(QUICKTIMEFRAMEWORKS) -AC_SUBST(OPENCV_XLDFLAGS) - -# Micro-Manager libraries have a prefix & suffix to make them unique. These are defined here: -case $host in - *-*-linux*) - MMSUFFIX=".so.0" - MMPREFIX="libmmgr_dal_" - ;; -esac -if test -z "$MMSUFFIX"; then - MMSUFFIX="" -fi -if test -z "$MMPREFIX"; then - MMPREFIX="mmgr_dal_" -fi - -AC_MSG_CHECKING(library suffix) -AC_MSG_RESULT($MMSUFFIX) -AC_SUBST(MMSUFFIX) -AC_MSG_CHECKING(library prefix) -AC_MSG_RESULT($MMPREFIX) -AC_SUBST(MMPREFIX) - - -# Checks for library functions. -AC_HEADER_STDC -AC_CHECK_FUNCS([memset]) - -AC_CONFIG_FILES( - [Makefile] - [AAAOTF/Makefile:AAAOTF/Makefile.in:MMDEVAPI.rules] - [AOTF/Makefile:AOTF/Makefile.in:MMDEVAPI.rules] - [Aladdin/Makefile:Aladdin/Makefile.in:MMDEVAPI.rules] - [Andor/Makefile:Andor/Makefile.in:MMDEVAPI.rules] - [AndorLaserCombiner/Makefile:AndorLaserCombiner/Makefile.in:MMDEVAPI.rules] - [Aquinas/Makefile:Aquinas/Makefile.in:MMDEVAPI.rules] - [Arduino/Makefile:Arduino/Makefile.in:MMDEVAPI.rules] - [ASIFW1000/Makefile:ASIFW1000/Makefile.in:MMDEVAPI.rules] - [ASIStage/Makefile:ASIStage/Makefile.in:MMDEVAPI.rules] - [ASITiger/Makefile:ASITiger/Makefile.in:MMDEVAPI.rules] - [ASIWPTR/Makefile:ASIWPTR/Makefile.in:MMDEVAPI.rules] - [CARVII/Makefile:CARVII/Makefile.in:MMDEVAPI.rules] - [Cobolt/Makefile:Cobolt/Makefile.in:MMDEVAPI.rules] - [CoherentCube/Makefile:CoherentCube/Makefile.in:MMDEVAPI.rules] - [CONEX/Makefile:CONEX/Makefile.in:MMDEVAPI.rules] - [Conix/Makefile:Conix/Makefile.in:MMDEVAPI.rules] - [Corvus/Makefile:Corvus/Makefile.in:MMDEVAPI.rules] - [CSUW1/Makefile:CSUW1/Makefile.in:MMDEVAPI.rules] - [DTOpenLayer/Makefile:DTOpenLayer/Makefile.in:MMDEVAPI.rules] - [DemoCamera/Makefile:DemoCamera/Makefile.in:MMDEVAPI.rules] - [FreeSerialPort/Makefile:FreeSerialPort/Makefile.in:MMDEVAPI.rules] - [FocalPoint/Makefile:FocalPoint/Makefile.in:MMDEVAPI.rules] - [IDS_uEye/Makefile:IDS_uEye/Makefile.in:MMDEVAPI.rules] - [IIDC/Makefile:IIDC/Makefile.in:MMDEVAPI.rules] - [ITC18/Makefile:ITC18/Makefile.in:MMDEVAPI.rules] - [ImageProcessorChain/Makefile:ImageProcessorChain/Makefile.in:MMDEVAPI.rules] - [K8055/Makefile:K8055/Makefile.in:MMDEVAPI.rules] - [K8061/Makefile:K8061/Makefile.in:MMDEVAPI.rules] - [LeicaDMI/Makefile:LeicaDMI/Makefile.in:MMDEVAPI.rules] - [LeicaDMR/Makefile:LeicaDMR/Makefile.in:MMDEVAPI.rules] - [LeicaDMSTC/Makefile:LeicaDMSTC/Makefile.in:MMDEVAPI.rules] - [Ludl/Makefile:Ludl/Makefile.in:MMDEVAPI.rules] - [LudlLow/Makefile:LudlLow/Makefile.in:MMDEVAPI.rules] - [LumencorSpectra/Makefile:LumencorSpectra/Makefile.in:MMDEVAPI.rules] - [MaestroServo/Makefile:MaestroServo/Makefile.in:MMDEVAPI.rules] - [Marzhauser/Makefile:Marzhauser/Makefile.in:MMDEVAPI.rules] - [Marzhauser-LStep/Makefile:Marzhauser-LStep/Makefile.in:MMDEVAPI.rules] - [MicroPoint/Makefile:MicroPoint/Makefile.in:MMDEVAPI.rules] - [Motic_mac/Makefile:Motic_mac/Makefile.in:MMDEVAPI.rules] - [MP285/Makefile:MP285/Makefile.in:MMDEVAPI.rules] - [Neos/Makefile:Neos/Makefile.in:MMDEVAPI.rules] - [Nikon/Makefile:Nikon/Makefile.in:MMDEVAPI.rules] - [NikonTE2000/Makefile:NikonTE2000/Makefile.in:MMDEVAPI.rules] - [nPoint/Makefile:nPoint/Makefile.in:MMDEVAPI.rules] - [OpenCVgrabber/Makefile:OpenCVgrabber/Makefile.in:MMDEVAPI.rules] - [Omicron/Makefile:Omicron/Makefile.in:MMDEVAPI.rules] - [Oxxius/Makefile:Oxxius/Makefile.in:MMDEVAPI.rules] - [ParallelPort/Makefile:ParallelPort/Makefile.in:MMDEVAPI.rules] - [Pecon/Makefile:Pecon/Makefile.in:MMDEVAPI.rules] - [pgFocus/Makefile:pgFocus/Makefile.in:MMDEVAPI.rules] - [PI/Makefile:PI/Makefile.in:MMDEVAPI.rules] - [PI_GCS/Makefile:PI_GCS/Makefile.in:MMDEVAPI.rules] - [PI_GCS_2/Makefile:PI_GCS_2/Makefile.in:MMDEVAPI.rules] - [Piezosystem_30DV50/Makefile:Piezosystem_30DV50/Makefile.in:MMDEVAPI.rules] - [Piezosystem_dDrive/Makefile:Piezosystem_dDrive/Makefile.in:MMDEVAPI.rules] - [Piezosystem_NV120_1/Makefile:Piezosystem_NV120_1/Makefile.in:MMDEVAPI.rules] - [Piezosystem_NV40_1/Makefile:Piezosystem_NV40_1/Makefile.in:MMDEVAPI.rules] - [Piezosystem_NV40_3/Makefile:Piezosystem_NV40_3/Makefile.in:MMDEVAPI.rules] - [PVCAM/Makefile:PVCAM/Makefile.in:MMDEVAPI.rules] - [PrecisExcite/Makefile:PrecisExcite/Makefile.in:MMDEVAPI.rules] - [PrincetonInstruments/Makefile:PrincetonInstruments/Makefile.in:MMDEVAPI.rules] - [Prior/Makefile:Prior/Makefile.in:MMDEVAPI.rules] - [PriorLegacy/Makefile:PriorLegacy/Makefile.in:MMDEVAPI.rules] - [QCam/Makefile:QCam/Makefile.in:MMDEVAPI.rules] - [Scientifica/Makefile:Scientifica/Makefile.in:MMDEVAPI.rules] - [Sapphire/Makefile:Sapphire/Makefile.in:MMDEVAPI.rules] - [ScionCam/Makefile:ScionCam/Makefile.in:MMDEVAPI.rules] - [Sensicam/Makefile:Sensicam/Makefile.in:MMDEVAPI.rules] - [SimpleCam/Makefile:SimpleCam/Makefile.in:MMDEVAPI.rules] - [SpectralLMM5/Makefile:SpectralLMM5/Makefile.in:MMDEVAPI.rules] - [Spot/Makefile:Spot/Makefile.in:MMDEVAPI.rules] - [SutterLambda/Makefile:SutterLambda/Makefile.in:MMDEVAPI.rules] - [SutterStage/Makefile:SutterStage/Makefile.in:MMDEVAPI.rules] - [SerialManager/Makefile:SerialManager/Makefile.in:MMDEVAPI.rules] - [SimpleAutofocus/Makefile:SimpleAutofocus/Makefile.in:MMDEVAPI.rules] - [Thorlabs/Makefile:Thorlabs/Makefile.in:MMDEVAPI.rules] - [ThorlabsDCxxxx/Makefile:ThorlabsDCxxxx/Makefile.in:MMDEVAPI.rules] - [ThorlabsFilterWheel/Makefile:ThorlabsFilterWheel/Makefile.in:MMDEVAPI.rules] - [ThorlabsSC10/Makefile:ThorlabsSC10/Makefile.in:MMDEVAPI.rules] - [Tofra/Makefile:Tofra/Makefile.in:MMDEVAPI.rules] - [USBManager/Makefile:USBManager/Makefile.in:MMDEVAPI.rules] - [HIDManager/Makefile:HIDManager/Makefile.in:MMDEVAPI.rules] - [Utilities/Makefile:Utilities/Makefile.in:MMDEVAPI.rules] - [VariLC/Makefile:VariLC/Makefile.in:MMDEVAPI.rules] - [Video4Linux/Makefile:Video4Linux/Makefile.in:MMDEVAPI.rules] - [Vincent/Makefile:Vincent/Makefile.in:MMDEVAPI.rules] - [Vortran/Makefile:Vortran/Makefile.in:MMDEVAPI.rules] - [XCite120PC_Exacte/Makefile:XCite120PC_Exacte/Makefile.in:MMDEVAPI.rules] - [XCiteLed/Makefile:XCiteLed/Makefile.in:MMDEVAPI.rules] - [Xcite/Makefile:Xcite/Makefile.in:MMDEVAPI.rules] - [XLight/Makefile:XLight/Makefile.in:MMDEVAPI.rules] - [Yokogawa/Makefile:Yokogawa/Makefile.in:MMDEVAPI.rules] - [Zaber/Makefile:Zaber/Makefile.in:MMDEVAPI.rules] - [ZeissCAN/Makefile:ZeissCAN/Makefile.in:MMDEVAPI.rules] - [ZeissCAN29/Makefile:ZeissCAN29/Makefile.in:MMDEVAPI.rules] - [dc1394/Makefile:dc1394/Makefile.in:MMDEVAPI.rules] - [kdv/Makefile:kdv/Makefile.in:MMDEVAPI.rules] -) - -AC_OUTPUT diff --git a/DeviceAdapters/dc1394/Makefile.am b/DeviceAdapters/dc1394/Makefile.am index 0ecf18c009..8e836f4f45 100644 --- a/DeviceAdapters/dc1394/Makefile.am +++ b/DeviceAdapters/dc1394/Makefile.am @@ -1,9 +1,11 @@ -pkglibdir = $(DEVICEADAPTERPATH) + AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive pkglib_LTLIBRARIES = libmmgr_dal_dc1394.la libmmgr_dal_dc1394_la_SOURCES = dc1394.cpp dc1394.h -##TODO: find the library in configure -libmmgr_dal_dc1394_la_LIBADD = $(MMDEVAPI_LIBADD) $(LIBDC1394) -libmmgr_dal_dc1394_la_LDFLAGS = $(MMDEVAPI_LDFLAGS) + +libmmgr_dal_dc1394_la_CPPFLAGS=$(LIBDC1394_CPPFLAGS) +libmmgr_dal_dc1394_la_CXXFLAGS=$(AM_CXXFLAGS) $(LIBDC1394_CFLAGS) +libmmgr_dal_dc1394_la_LDFLAGS=$(MMDEVAPI_LDFLAGS) $(LIBDC1394_LDFLAGS) +libmmgr_dal_dc1394_la_LIBADD=$(MMDEVAPI_LIBADD) $(LIBDC1394_LIBS) EXTRA_DIST = license.txt diff --git a/DeviceAdapters/kdv/Makefile.am b/DeviceAdapters/kdv/Makefile.am index 9da3715286..d30dbbef8c 100644 --- a/DeviceAdapters/kdv/Makefile.am +++ b/DeviceAdapters/kdv/Makefile.am @@ -1,4 +1,4 @@ -pkglibdir = $(DEVICEADAPTERPATH) + AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive pkglib_LTLIBRARIES = libmmgr_dal_KDV.la libmmgr_dal_KDV_la_SOURCES = KDV.cpp KDV.h diff --git a/DeviceAdapters/nPoint/Makefile.am b/DeviceAdapters/nPoint/Makefile.am old mode 100755 new mode 100644 index 48025617d7..51a6acc3f5 --- a/DeviceAdapters/nPoint/Makefile.am +++ b/DeviceAdapters/nPoint/Makefile.am @@ -1,8 +1,8 @@ -pkglibdir = $(DEVICEADAPTERPATH) -AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive -pkglib_LTLIBRARIES = libmmgr_dal_nPoint.la -libmmgr_dal_nPoint_la_SOURCES = nPC400.cpp nPC400.h nPC400Ctrl.cpp nPC400Ctrl.h nPC400Channel.cpp nPC400Channel.h -libmmgr_dal_nPoint_la_LIBADD = $(MMDEVAPI_LIBADD) -libmmgr_dal_nPoint_la_LDFLAGS = $(MMDEVAPI_LDFLAGS) - -EXTRA_DIST = nPC400.vcproj nPC400.sln + +AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive +pkglib_LTLIBRARIES = libmmgr_dal_nPoint.la +libmmgr_dal_nPoint_la_SOURCES = nPC400.cpp nPC400.h nPC400Ctrl.cpp nPC400Ctrl.h nPC400Channel.cpp nPC400Channel.h +libmmgr_dal_nPoint_la_LIBADD = $(MMDEVAPI_LIBADD) +libmmgr_dal_nPoint_la_LDFLAGS = $(MMDEVAPI_LDFLAGS) + +EXTRA_DIST = nPC400.vcproj nPC400.sln diff --git a/DeviceAdapters/pgFocus/Makefile.am b/DeviceAdapters/pgFocus/Makefile.am index 36e9936bdb..830d0efa83 100644 --- a/DeviceAdapters/pgFocus/Makefile.am +++ b/DeviceAdapters/pgFocus/Makefile.am @@ -1,4 +1,4 @@ -pkglibdir = $(DEVICEADAPTERPATH) + AM_CXXFLAGS = $(MMDEVAPI_CXXFLAGS) -fpermissive pkglib_LTLIBRARIES = libmmgr_dal_pgFocus.la libmmgr_dal_pgFocus_la_SOURCES = \ diff --git a/DeviceKit/CoreTest/Makefile.am b/DeviceKit/CoreTest/Makefile.am index b406f4b08c..293b636ee3 100644 --- a/DeviceKit/CoreTest/Makefile.am +++ b/DeviceKit/CoreTest/Makefile.am @@ -1,7 +1,12 @@ + +AUTOMAKE_OPTIONS = foreign subdir-objects + bin_PROGRAMS = mm_coretest mm_coretest_SOURCES = MMCoreTest.cpp ../../MMCore/PluginManager.cpp -mm_coretest_LDADD = ../../MMCore/libMMCore.a ../../MMDevice/libMMDevice.la $(LPTHREAD) $(LIBZLIB) -mm_coretest_LDFLAGS = $(SERIALFRAMEWORKS) +mm_coretest_CPPFLAGS = $(ZLIB_CPPFLAGS) +mm_coretest_CXXFLAGS = $(ZLIB_CFLAGS) +mm_coretest_LDFLAGS = $(SERIALFRAMEWORKS) $(ZLIB_LDFLAGS) +mm_coretest_LDADD = ../../MMCore/libMMCore.la ../../MMDevice/libMMDevice.la $(ZLIB_LIBS) install: echo "Nothing to do" diff --git a/DeviceKit/DeviceTest/Makefile.am b/DeviceKit/DeviceTest/Makefile.am index 5c6edba031..314d38804e 100644 --- a/DeviceKit/DeviceTest/Makefile.am +++ b/DeviceKit/DeviceTest/Makefile.am @@ -1,4 +1,9 @@ + +AUTOMAKE_OPTIONS = foreign subdir-objects + bin_PROGRAMS = mm_devicetest mm_devicetest_SOURCES = DeviceTest.cpp ../../MMCore/PluginManager.cpp -mm_devicetest_LDADD = ../../MMCore/libMMCore.a ../../MMDevice/libMMDevice.la $(LPTHREAD) $(LIBZLIB) -mm_devicetest_LDFLAGS = $(SERIALFRAMEWORKS) +mm_devicetest_CPPFLAGS = $(ZLIB_CPPFLAGS) +mm_devicetest_CXXFLAGS = $(ZLIB_CFLAGS) +mm_devicetest_LDFLAGS = $(SERIALFRAMEWORKS) $(ZLIB_LDFLAGS) +mm_devicetest_LDADD = ../../MMCore/libMMCore.la ../../MMDevice/libMMDevice.la $(ZLIB_LIBS) diff --git a/DeviceKit/LibraryTest/Makefile.am b/DeviceKit/LibraryTest/Makefile.am index 3756408956..82ed7d472b 100644 --- a/DeviceKit/LibraryTest/Makefile.am +++ b/DeviceKit/LibraryTest/Makefile.am @@ -1,7 +1,12 @@ + +AUTOMAKE_OPTIONS = foreign subdir-objects + bin_PROGRAMS = mm_librarytest mm_librarytest_SOURCES = LibraryTest.cpp ../../MMCore/PluginManager.cpp -mm_librarytest_LDADD = ../../MMCore/libMMCore.a ../../MMDevice/libMMDevice.la $(LPTHREAD) $(LIBZLIB) -mm_librarytest_LDFLAGS = $(SERIALFRAMEWORKS) +mm_librarytest_CPPFLAGS = $(ZLIB_CPPFLAGS) +mm_librarytest_CXXFLAGS = $(ZLIB_CFLAGS) +mm_librarytest_LDFLAGS = $(SERIALFRAMEWORKS) $(ZLIB_LDFLAGS) +mm_librarytest_LDADD = ../../MMCore/libMMCore.la ../../MMDevice/libMMDevice.la $(ZLIB_LIBS) install: echo "Nothing to do" diff --git a/DeviceKit/configure.ac b/DeviceKit/configure.ac new file mode 100644 index 0000000000..a62b9c5a87 --- /dev/null +++ b/DeviceKit/configure.ac @@ -0,0 +1,46 @@ + +AC_PREREQ([2.64]) +AC_INIT([Micro-Manager], [1.4], [info@micro-manager.org]) +AC_CONFIG_MACRO_DIR([../m4]) +AC_CANONICAL_HOST +AM_INIT_AUTOMAKE +LT_INIT([disable-static]) + +AC_PROG_CXX([clang++ llvm-g++ g++ c++]) +AC_PROG_CC([clang llvm-gcc gcc cc]) + +AX_BOOST_BASE +AX_BOOST_DATE_TIME + +# Checks for typedefs, structures, and compiler characteristics. +AC_HEADER_STDBOOL +AC_C_CONST +AC_C_INLINE + +# Checks for library functions. +AC_HEADER_STDC +AC_CHECK_FUNCS([memset]) +AC_CHECK_LIB(dl, dlopen) # for dynamic linking on linux + + +# zlib +MM_ARG_WITH_REQUIRED_LIB([zlib], [zlib], [ZLIB]) +MM_LIB_Z([$ZLIB_PREFIX], [], [MM_MSG_REQUIRED_LIB_FAILURE([zlib], [zlib])]) + + +# On the Mac we need some frameworks that can be in the way on Linux +case $host in + *apple-darwin*) + SERIALFRAMEWORKS="-framework CoreFoundation -framework IOKit" + AC_MSG_RESULT($SERIALFRAMEWORKS) + ;; + *linux*) + ;; +esac +AC_SUBST(SERIALFRAMEWORKS) + + +AC_CONFIG_FILES(Makefile CoreTest/Makefile DeviceTest/Makefile LibraryTest/Makefile) + + +AC_OUTPUT diff --git a/DeviceKit/configure.in b/DeviceKit/configure.in deleted file mode 100644 index 2c990d3658..0000000000 --- a/DeviceKit/configure.in +++ /dev/null @@ -1,82 +0,0 @@ -# -*- Autoconf -*- -# Process this file with autoconf to produce a configure script. - -AC_PREREQ(2.57) -AC_INIT(FULL-PACKAGE-NAME, VERSION, BUG-REPORT-ADDRESS) -#AC_CONFIG_SRCDIR([DemoCamera/DemoCamera.cpp]) -AC_CANONICAL_HOST -AM_INIT_AUTOMAKE -AC_PROG_LIBTOOL - -m4_include([../configure.common]) - -AX_BOOST_BASE -AX_BOOST_DATE_TIME - -# Checks for typedefs, structures, and compiler characteristics. -AC_HEADER_STDBOOL -AC_C_CONST -AC_C_INLINE - -# Checks for library functions. -AC_HEADER_STDC -AC_CHECK_FUNCS([memset]) -AC_CHECK_LIB(dl, dlopen) # for dynamic linking on linux - - -#--------------------------------------------------- -# Check for ZLIB -#--------------------------------------------------- -# The following is hard-coded to find a static libz.a, which we prefer for -# release builds. Use of static vs shared libz should probably be -# configurable from the command line, but keep the behavior for now. -AC_MSG_CHECKING(for zlib) -zlib_incdirs="/usr/local/$ARCH/include /usr/local/include /usr/include" -zlib_libdirs="/usr/local/$ARCH/lib /usr/local/lib /usr/lib /usr/lib64 /usr/lib/$build_platform-$build_os" -AC_ARG_WITH([zlib], [AS_HELP_STRING([--with-zlib=path], [use zlib at path])], - [ZLIBDIR="$withval"], [ZLIBDIR="yes"]) -if test "x$ZLIBDIR" != "xno" ; then - if test "x$ZLIBDIR" != "xyes" ; then - zlib_incdirs="$ZLIBDIR/include" - zlib_libdirs="$ZLIBDIR/lib" - fi -else - AC_MSG_RESULT([zlib required but disabled on command line]) - exit 1 -fi - -AC_FIND_FILE([zlib.h], [$zlib_incdirs], ZLIBINCDIR) -if test x$ZLIBINCDIR = xNO; then - AC_MSG_RESULT([not found]) - exit 1 -else - AC_CHECK_HEADERS([$ZLIBINCDIR/zlib.h]) - if test -z "$LIBZLIB" ; then - AC_FIND_FILE([libz.a], [$zlib_libdirs], ZLIBLIBDIR) - if test x$ZLIBLIBDIR = xNO; then - AC_MSG_RESULT([zlib not found]) - exit 1 - else - AC_MSG_RESULT([libz.a found]) - LIBZLIB="$ZLIBLIBDIR/libz.a" - fi - fi -fi -AC_SUBST(LIBZLIB) - -# On the Mac we need some frameworks that can be in the way on Linux -case $host in - *apple-darwin*) - SERIALFRAMEWORKS="-framework CoreFoundation -framework IOKit" - AC_MSG_RESULT($SERIALFRAMEWORKS) - ;; - *linux*) - ;; -esac -AC_SUBST(SERIALFRAMEWORKS) - - -AC_CONFIG_FILES(Makefile CoreTest/Makefile DeviceTest/Makefile LibraryTest/Makefile) - - -AC_OUTPUT diff --git a/MMCore/Makefile.am b/MMCore/Makefile.am index 52d9bb871e..9d06f28e43 100644 --- a/MMCore/Makefile.am +++ b/MMCore/Makefile.am @@ -1,26 +1,53 @@ -AM_CXXFLAGS = $(BOOST_CPPFLAGS) -noinst_LIBRARIES = libMMCore.a -libMMCore_a_SOURCES = MMCore.cpp MMCore.h \ - CircularBuffer.h CircularBuffer.cpp \ - CoreCallback.h CoreCallback.cpp \ - Configuration.h Configuration.cpp \ - ConfigGroup.h \ - CoreProperty.h CoreProperty.cpp \ - CoreUtils.h \ - Error.h Error.cpp \ - ErrorCodes.h\ - PluginManager.h PluginManager.cpp \ - LibraryInfo/LibraryPaths.h LibraryInfo/LibraryPathsUnix.cpp \ - LoadableModules/LoadedModule.h LoadableModules/LoadedModule.cpp \ - LoadableModules/LoadedModuleImpl.h LoadableModules/LoadedModuleImpl.cpp \ - LoadableModules/LoadedModuleImplUnix.h LoadableModules/LoadedModuleImplUnix.cpp \ - LoadableModules/LoadedDeviceAdapter.h LoadableModules/LoadedDeviceAdapter.cpp \ - IMMLogger.h \ - FastLogger.h FastLogger.cpp \ - Compressor.h \ - ../MMDevice/MMDevice.h ../MMDevice/MMDeviceConstants.h \ - ../MMDevice/ModuleInterface.h \ - Host.cpp Host.h \ - AppleHost.h -EXTRA_DIST = license.txt MMCore.vcproj +AUTOMAKE_OPTIONS = foreign subdir-objects + +AM_CPPFLAGS = $(BOOST_CPPFLAGS) $(ZLIB_CPPFLAGS) +AM_CXXFLAGS = $(ZLIB_CFLAGS) +AM_LDFLAGS = $(BOOST_LDFLAGS) $(ZLIB_LDFLAGS) $(MMCORE_APPLEHOST_LDFLAGS) + +noinst_LTLIBRARIES = libMMCore.la + +# libMMCore currently requires libMMDevice, due to use of CDeviceUtils, +# ImgBuffer, and FrameBuffer. This dependency should probably be removed. +libMMCore_la_LIBADD = $(BOOST_SYSTEM_LIB) $(BOOST_DATE_TIME_LIB) $(ZLIB_LIBS) ../MMDevice/libMMDevice.la + +libMMCore_la_SOURCES = \ + ../MMDevice/MMDevice.h \ + ../MMDevice/MMDeviceConstants.h \ + ../MMDevice/ModuleInterface.h \ + AppleHost.h \ + CircularBuffer.cpp \ + CircularBuffer.h \ + Compressor.h \ + ConfigGroup.h \ + Configuration.cpp \ + Configuration.h \ + CoreCallback.cpp \ + CoreCallback.h \ + CoreProperty.cpp \ + CoreProperty.h \ + CoreUtils.h \ + Error.cpp \ + Error.h \ + ErrorCodes.h \ + FastLogger.cpp \ + FastLogger.h \ + Host.cpp \ + Host.h \ + IMMLogger.h \ + LibraryInfo/LibraryPaths.h \ + LibraryInfo/LibraryPathsUnix.cpp \ + LoadableModules/LoadedDeviceAdapter.cpp \ + LoadableModules/LoadedDeviceAdapter.h \ + LoadableModules/LoadedModule.cpp \ + LoadableModules/LoadedModule.h \ + LoadableModules/LoadedModuleImpl.cpp \ + LoadableModules/LoadedModuleImpl.h \ + LoadableModules/LoadedModuleImplUnix.cpp \ + LoadableModules/LoadedModuleImplUnix.h \ + MMCore.cpp \ + MMCore.h \ + PluginManager.cpp \ + PluginManager.h + +EXTRA_DIST = license.txt diff --git a/MMCoreJ_wrap/Makefile.am b/MMCoreJ_wrap/Makefile.am index b54f37014a..4f4449e31b 100644 --- a/MMCoreJ_wrap/Makefile.am +++ b/MMCoreJ_wrap/Makefile.am @@ -1,3 +1,6 @@ + +AUTOMAKE_OPTIONS = foreign subdir-objects + # We use -fno-strict-aliasing (which disables certain optimizations in GCC and # Clang), because SWIG documentation calls for it (when wrapping for Java). # Strictly speaking, this should only be necessary when compiling @@ -7,9 +10,17 @@ # (We used to globally use -O by default, rather than -O2, on Linux, presumably # for the above reason (though the intent was never documented). But there is # nothing Linux-specific about this.) -AM_CXXFLAGS = $(BOOST_CPPFLAGS) -fno-strict-aliasing +# TODO The flag should come from configure. +AM_CXXFLAGS = -fno-strict-aliasing +AM_CPPFLAGS = $(JNI_CPPFLAGS) $(BOOST_CPPFLAGS) + -SWIGLIB_SOURCES = MMCoreJ.i \ +# This ugly list of headers is necessary to trigger the rebuild of the +# SWIG-generated source when a header is modified. The issue cannot be fixed +# here; it is a result of poor implementation hiding in the MMCore headers. +# Unfortunately this list needs to be repeated in MMCorePy_wrap/Makefile.am, so +# don't forget to update that file. +swig_sources = MMCoreJ.i \ ../MMCore/CircularBuffer.h \ ../MMCore/ConfigGroup.h \ ../MMCore/Configuration.h \ @@ -18,79 +29,69 @@ SWIGLIB_SOURCES = MMCoreJ.i \ ../MMCore/CoreUtils.h \ ../MMCore/Error.h \ ../MMCore/ErrorCodes.h \ - ../MMCore/MMCore.h \ ../MMCore/Host.h \ - ../MMDevice/MMDeviceConstants.h + ../MMCore/MMCore.h \ + ../MMCore/MMEventCallback.h \ + ../MMCore/PluginManager.h \ + ../MMDevice/ImageMetadata.h \ + ../MMDevice/MMDevice.h \ + ../MMDevice/MMDeviceConstants.h + -# DEVICEADAPTERPATH is poorly named: it actually means "where to put all MM -# libraries, including device adapters". -MMCoreJ_wrap.cxx: $(SWIGLIB_SOURCES) - test -d mmcorej || mkdir mmcorej - touch $(srcdir)/MMCoreJ_wrap.cxx || (chmod +wrx $(srcdir) && touch $(srcdir)/MMCoreJ_wrap.cxx) +# Use MMCoreJ.stamp to manage multiple outputs. A fully parallel-safe rule +# would be complex (see Automake manual), but this implementation works most of +# the time and 'make clean' can recover from any problems. +MMCoreJ.stamp: $(swig_sources) + @rm -f MMCoreJ.tmp + @touch MMCoreJ.tmp + $(MKDIR_P) mmcorej $(SWIG) -c++ -java -package mmcorej -outdir mmcorej -module MMCoreJ \ - "-DMMCOREJ_LIBRARY_PATH=\"$(DEVICEADAPTERPATH)\"" \ - -o $(srcdir)/MMCoreJ_wrap.cxx $(srcdir)/MMCoreJ.i - cp $(srcdir)/MMCoreJ_wrap.cxx MMCoreJ_wrap.cxx || echo "No problem" - -AM_CPPFLAGS = $(JAVAINC) -lib_LTLIBRARIES = libMMCoreJ_wrap.la -nodist_libMMCoreJ_wrap_la_SOURCES = MMCoreJ_wrap.cxx -libMMCoreJ_wrap_la_SOURCES = $(SWIGLIB_SOURCES) \ - $(top_srcdir)/MMDevice/DeviceUtils.cpp \ - $(top_srcdir)/MMDevice/ImgBuffer.cpp \ - $(top_srcdir)/MMDevice/Property.cpp \ - $(top_srcdir)/MMCore/CircularBuffer.cpp \ - $(top_srcdir)/MMCore/Configuration.cpp \ - $(top_srcdir)/MMCore/CoreCallback.cpp \ - $(top_srcdir)/MMCore/CoreProperty.cpp \ - $(top_srcdir)/MMCore/Error.cpp \ - $(top_srcdir)/MMCore/FastLogger.cpp \ - $(top_srcdir)/MMCore/MMCore.cpp \ - $(top_srcdir)/MMCore/PluginManager.cpp \ - $(top_srcdir)/MMCore/LibraryInfo/LibraryPathsUnix.cpp \ - $(top_srcdir)/MMCore/LoadableModules/LoadedModule.cpp \ - $(top_srcdir)/MMCore/LoadableModules/LoadedModuleImpl.cpp \ - $(top_srcdir)/MMCore/LoadableModules/LoadedModuleImplUnix.cpp \ - $(top_srcdir)/MMCore/LoadableModules/LoadedDeviceAdapter.cpp \ - $(top_srcdir)/MMCore/Host.cpp -libMMCoreJ_wrap_la_LIBADD = $(BOOST_SYSTEM_LIB) -libMMCoreJ_wrap_la_LDFLAGS = -Wl, -module -ldl $(BOOST_LDFLAGS) - -$(srcdir)/MMCoreJ.jar: MMCoreJ_wrap.cxx \ - libMMCoreJ_wrap.la \ - TaggedImage.java - mkdir -p mmcorej - cp TaggedImage.java mmcorej/ - $(JAVAC) -source 1.5 -target 1.5 ../mmstudio/src/org/json/*.java mmcorej/*.java - $(JAR) cvf MMCoreJ.jar mmcorej/*.class - -all: - make $(srcdir)/MMCoreJ_wrap.cxx - make $(srcdir)/MMCoreJ.jar - cp MMCoreJ.jar ../bin - -macinstall: - cp .libs/libMMCoreJ_wrap.so $(top_srcdir)/MacInstaller/Package_contents/libMMCoreJ_wrap$(JAVASO) - -install: - install -d $(DESTDIR)$(DEVICEADAPTERPATH) - install .libs/libMMCoreJ_wrap.so $(DESTDIR)$(DEVICEADAPTERPATH)/libMMCoreJ_wrap$(JAVASO) - install -d $(DESTDIR)$(JARPATH) - install MMCoreJ.jar $(DESTDIR)$(JARPATH)/MMCoreJ.jar - -###IJ-dependent! #todo: split IJ and pure-java code - -EXTRA_DIST = license.txt MMCoreJ_wrap.vcproj - -clean: - test -z "libMMCoreJ_wrap.la" || rm -f libMMCoreJ_wrap.la - rm -rf mmcorej/ - rm -f MMCoreJ_wrap.cxx - rm -f "./so_locations" - rm -rf .libs _libs - rm -f *.o - rm -f *.lo - -dist-hook: - test -d $(distdir)/mmcorej || mkdir $(distdir)/mmcorej - touch $(distdir)/mmcorej/empty.txt + "-DMMCOREJ_LIBRARY_PATH=\"$(MMCOREJ_LIBRARY_PATH)\"" \ + -o MMCoreJ_wrap.cxx $(srcdir)/MMCoreJ.i + @mv -f MMCoreJ.tmp $@ +MMCoreJ_wrap.h MMCoreJ_wrap.cxx: MMCoreJ.stamp + @if test -f $@; then :; else \ + rm -f MMCoreJ.stamp; \ + $(MAKE) $(AM_MAKEFLAGS) MMCoreJ.stamp; \ + fi + + +pkglib_LTLIBRARIES = libMMCoreJ_wrap.la +libMMCoreJ_wrap_la_SOURCES = MMCoreJ_wrap.h MMCoreJ_wrap.cxx +libMMCoreJ_wrap_la_LDFLAGS = -module -avoid-version -shrext $(JNI_SUFFIX) +libMMCoreJ_wrap_la_LIBADD = ../MMCore/libMMCore.la + + +jardir = $(pkgdatadir)/jars +jar_DATA = MMCoreJ.jar + +MMCoreJ.jar: MMCoreJ_wrap.h TaggedImage.java + $(MKDIR_P) mmcorej + cp $(srcdir)/TaggedImage.java mmcorej + $(JAVAC) $(JAVACFLAGS) -d . $(srcdir)/../mmstudio/src/org/json/*.java + $(JAVAC) $(JAVACFLAGS) -cp . -d . mmcorej/*.java + $(JAR) cf MMCoreJ.jar org/json/*.class mmcorej/*.class + + +if NONSTD_JNI_PREFIX +# The suffix (.so vs .jnilib vs .dll) can be handled by libtool's -shrext flag, +# but there is no clean way to parameterize the prefix in the Automake rules. +# We adjust it at install time instead: + +install-exec-hook: + cd $(DESTDIR)$(jardir); \ + mv -f libMMCoreJ_wrap$(JNI_SUFFIX) $(JNI_PREFIX)MMCoreJ_wrap$(JNI_SUFFIX) + +uninstall-hook: + -rm -f $(DESTDIR)$(jardir)/$(JNI_PREFIX)MMCoreJ_wrap$(JNI_SUFFIX) + +endif # NONSTD_JNI_PREFIX + + +CLEANFILES = MMCoreJ.stamp MMCoreJ_wrap.h MMCoreJ_wrap.cxx MMCoreJ.jar + +clean-local: + -rm -rf mmcorej org + + +EXTRA_DIST = license.txt diff --git a/MMCorePy_wrap/Makefile.am b/MMCorePy_wrap/Makefile.am index b5940b8160..ad04cb51e8 100644 --- a/MMCorePy_wrap/Makefile.am +++ b/MMCorePy_wrap/Makefile.am @@ -1,5 +1,10 @@ -## Process this file with automake to produce Makefile.in -SWIGLIBSOURCES = MMCorePy.i \ + +# This ugly list of headers is necessary to trigger the rebuild of the +# SWIG-generated source when a header is modified. The issue cannot be fixed +# here; it is a result of poor implementation hiding in the MMCore headers. +# Unfortunately this list needs to be repeated in MMCoreJ_wrap/Makefile.am, so +# don't forget to update that file. +swig_sources = MMCorePy.i \ ../MMCore/CircularBuffer.h \ ../MMCore/ConfigGroup.h \ ../MMCore/Configuration.h \ @@ -8,50 +13,42 @@ SWIGLIBSOURCES = MMCorePy.i \ ../MMCore/CoreUtils.h \ ../MMCore/Error.h \ ../MMCore/ErrorCodes.h \ - ../MMCore/Host.h \ + ../MMCore/Host.h \ ../MMCore/MMCore.h \ + ../MMCore/MMEventCallback.h \ + ../MMCore/PluginManager.h \ + ../MMDevice/ImageMetadata.h \ + ../MMDevice/MMDevice.h \ ../MMDevice/MMDeviceConstants.h -MMCorePy_wrap.cxx MMCorePy.py: $(SWIGLIBSOURCES) - $(SWIG) -c++ -python MMCorePy.i - -MMCOREPYSOURCES = $(SWIGLIBSOURCES) \ - $(top_srcdir)/MMDevice/DeviceUtils.cpp \ - $(top_srcdir)/MMDevice/ImgBuffer.cpp \ - $(top_srcdir)/MMDevice/Property.cpp \ - $(top_srcdir)/MMCore/CircularBuffer.cpp \ - $(top_srcdir)/MMCore/Configuration.cpp \ - $(top_srcdir)/MMCore/CoreCallback.cpp \ - $(top_srcdir)/MMCore/CoreProperty.cpp \ - $(top_srcdir)/MMCore/Error.cpp \ - $(top_srcdir)/MMCore/FastLogger.cpp \ - $(top_srcdir)/MMCore/Host.cpp \ - $(top_srcdir)/MMCore/MMCore.cpp \ - $(top_srcdir)/MMCore/PluginManager.cpp \ - $(top_srcdir)/MMCore/LibraryInfo/LibraryPathsUnix.cpp \ - $(top_srcdir)/MMCore/LoadableModules/LoadedModule.cpp \ - $(top_srcdir)/MMCore/LoadableModules/LoadedModuleImpl.cpp \ - $(top_srcdir)/MMCore/LoadableModules/LoadedModuleImplUnix.cpp \ - $(top_srcdir)/MMCore/LoadableModules/LoadedDeviceAdapter.cpp - -_MMCorePy.so: MMCorePy_wrap.cxx $(MMCOREPYSOURCES) - python setup.py build_ext --inplace - -all: - make MMCorePy_wrap.cxx - make MMCorePy.py - make _MMCorePy.so - cp MMCorePy.py ../bin - cp _MMCorePy.so ../bin - -install: - cp MMCorePy.py $(DEVICEADAPTERPATH) - cp _MMCorePy.so $(DEVICEADAPTERPATH) - -clean: - rm MMCorePy_wrap.cxx || echo "Not found, no problem" - rm MMCorePy.py || echo "Not found, no problem" - rm _MMCorePy.so || echo "Not found, no problem" - rm -rf build || echo "Not found, no problem" - rm -f *.so || echo "Not found, no problem" +# Use MMCorePy.stamp to manage multiple outputs. A fully parallel-safe rule +# would be complex (see Automake manual), but this implementation works most of +# the time and 'make clean' can recover from any problems. +MMCorePy.stamp: $(swig_sources) + @rm -f MMCorePy.tmp + @touch MMCorePy.tmp + $(SWIG) -c++ -python -outdir . -o MMCorePy_wrap.cxx $(srcdir)/MMCorePy.i + @mv -f MMCorePy.tmp $@ +MMCorePy_wrap.h MMCorePy_wrap.cxx MMCorePy.py: MMCorePy.stamp + @if test -f $@; then :; else \ + rm -f MMCorePy.stamp; \ + $(MAKE) $(AM_MAKEFLAGS) MMCorePy.stamp; \ + fi + + +pkglib_LTLIBRARIES = _MMCorePy.la +nodist__MMCorePy_la_SOURCES = MMCorePy_wrap.h MMCorePy_wrap.cxx +_MMCorePy_la_CPPFLAGS = $(BOOST_CPPFLAGS) $(PYTHON_CPPFLAGS) $(NUMPY_CPPFLAGS) +_MMCorePy_la_LDFLAGS = -module -avoid-version -shrext .so +_MMCorePy_la_LIBADD = ../MMCore/libMMCore.la + +install-exec-hook: + $(INSTALL_DATA) MMCorePy.py $(DESTDIR)$(pkglibdir) + +uninstall-hook: + rm -f $(DESTDIR)$(pkglibdir)/MMCorePy.py + +CLEANFILES = MMCorePy.stamp MMCorePy.py MMCorePy_wrap.h MMCorePy_wrap.cxx + +EXTRA_DIST = license.txt diff --git a/MMCorePy_wrap/setup.py b/MMCorePy_wrap/setup.py deleted file mode 100644 index cafce1a1f2..0000000000 --- a/MMCorePy_wrap/setup.py +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/env python - -""" -This setup.py is intended for use from the Autoconf/Automake build system. -It makes a number of assumtions, including that the SWIG sources have already -been generated. Yet it also ignores settings detected by the configure script - -so it should probably be replaced with rules in the Makefile.am. -""" - -from distutils.core import setup, Extension -import numpy.distutils.misc_util -import os - -os.environ['CC'] = 'g++' -#os.environ['CXX'] = 'g++' -#os.environ['CPP'] = 'g++' -#os.environ['LDSHARED'] = 'g++' - - -mmcorepy_module = Extension('_MMCorePy', - sources=['MMCorePy_wrap.cxx', - '../MMCore/CircularBuffer.cpp', - '../MMCore/Configuration.cpp', - '../MMCore/CoreCallback.cpp', - '../MMCore/CoreProperty.cpp', - '../MMCore/FastLogger.cpp', - '../MMCore/Host.cpp', - '../MMCore/MMCore.cpp', - '../MMCore/PluginManager.cpp', - '../MMDevice/DeviceUtils.cpp', - '../MMDevice/ImgBuffer.cpp', - ], - language="c++", - include_dirs=numpy.distutils.misc_util.get_numpy_include_dirs(), - ) - -setup(name='MMCorePy', - version='0.1', - author="Micro-Manager", - description="Micro-Manager Core Python wrapper", - ext_modules=[mmcorepy_module], - py_modules=["MMCorePy"], - ) diff --git a/Makefile.am b/Makefile.am old mode 100755 new mode 100644 index d457bb1062..97c0e6d78b --- a/Makefile.am +++ b/Makefile.am @@ -1,35 +1,144 @@ + AUTOMAKE_OPTIONS = foreign ACLOCAL_AMFLAGS = -I m4 -if BUILD_WITH_JAVA -MMJAVACODE = MMCoreJ_wrap mmstudio acqEngine autofocus plugins scripts +if BUILD_MMCORE +MMCORE_DIR = MMCore endif -if BUILD_APP -APP = MMCore $(MMJAVACODE) +if BUILD_MMCOREJ +MMCOREJ_DIR = MMCoreJ_wrap endif -if BUILD_PYTHON -PYTHONDIR = MMCorePy_wrap +if BUILD_MMCOREPY +MMCOREPY_DIR = MMCorePy_wrap endif if BUILD_SECRETDEVICEADAPTERS SECRETDEVICEADAPTERS = SecretDeviceAdapters endif -EXTRA_DIST = mmbuild.bat lib/empty.txt build_instructions_win.html build_instructions_unix.txt -SUBDIRS = MMDevice $(APP) DeviceAdapters $(SECRETDEVICEADAPTERS) $(PYTHONDIR) +# TODO Define jardir in configure script (See other uses.) +jardir = $(pkgdatadir)/jars + +if BUILD_JAVA_APP + +JAVA_APP_DIRS = mmstudio acqEngine autofocus plugins scripts + +if INSTALL_AS_IMAGEJ_PLUGIN + +bin_SCRIPTS = buildscripts/launchers/mmimagej + +# Script to launch as ImageJ plugin +buildscripts/launchers/mmimagej: $(srcdir)/buildscripts/launchers/mmimagej.in + sed \ + -e 's%@imagejdir[@]%$(imagejdir)%g' \ + -e 's%@imagejjar[@]%$(imagejjar)%g' \ + $(srcdir)/buildscripts/launchers/mmimagej.in >$@ + +# Install Micro-Manager into an existing ImageJ application folder, as an +# ImageJ plugin. +install-ijplugin: + $(MAKE) pkglibdir=$(imagejdir) pkgdatadir=$(imagejdir) \ + jardir=$(imagejdir)/plugins/Micro-Manager \ + bindir=$(imagejdir) \ + force_plain_install=yes \ + install + rm -f $(DESTDIR)$(imagejdir)/*.la + rm -f $(DESTDIR)$(imagejdir)/plugins/Micro-Manager/ij.jar + @echo "" 1>&2; \ + echo "##############################################################################" 1>&2; \ + echo "Micro-Manager has been installed as an ImageJ plugin in" 1>&2; \ + echo "$(imagejdir)" 1>&2; \ + echo "" 1>&2; \ + echo "You can start Micro-Manager from the command line by typing" 1>&2; \ + echo "$(imagejdir)/mmimagej" 1>&2; \ + echo "or from the ImageJ menu (Plugins > Micro-Manager > Micro-Manager Studio)." 1>&2; \ + echo "##############################################################################" 1>&2; \ + echo "" 1>&2 + +# If the user types 'make install', they probably didn't mean it. +install-check-ijplugin: + @if test "x$(force_plain_install)" != xyes; then \ + echo "############################################################" 1>&2; \ + echo "You just ran 'make install'." 1>&2; \ + echo "Did you mean to run 'make install-ijplugin'?" 1>&2; \ + echo "" 1>&2; \ + echo "I'm sorry I couldn't warn you before starting;" 1>&2; \ + echo "it is due to the limitations of Automake, which" 1>&2; \ + echo "really wasn't designed for a task like this." 1>&2; \ + echo "" 1>&2; \ + echo "Some (not necessarily all) of the files got installed" 1>&2; \ + echo "in $(pkglibdir)," 1>&2; \ + echo "in $(pkgdatadir), and" 1>&2; \ + echo "at $(bindir)/mmimagej" 1>&2; \ + echo "" 1>&2; \ + echo "You can uninstall them with 'make uninstall'." 1>&2; \ + echo "" 1>&2; \ + echo "To force 'make install' (e.g. for testing), you can run" 1>&2; \ + echo "'make install force_plain_install=yes'"; 1>&2; \ + echo "############################################################" 1>&2; \ + exit 1; \ + fi + +install-exec-local: install-check-ijplugin +install-data-local: install-check-ijplugin + +else # INSTALL_AS_IMAGEJ_PLUGIN + +bin_SCRIPTS = buildscripts/launchers/micromanager + +# Launch script for running outside of ImageJ +buildscripts/launchers/micromanager: $(srcdir)/buildscripts/launchers/micromanager.in + sed \ + -e 's%@pkglibdir[@]%$(pkglibdir)%g' \ + -e 's%@pkgdatadir[@]%$(pkgdatadir)%g' \ + -e 's%@jardir[@]%$(jardir)%g' \ + -e 's%@imagejjar[@]%$(imagejjar)%g' \ + $(srcdir)/buildscripts/launchers/micromanager.in >$@ + +install-exec-hook: + @echo "" 1>&2; \ + echo "##############################################################################" 1>&2; \ + echo "Micro-Manager has been installed in" 1>&2; \ + echo "$(prefix)" 1>&2; \ + echo "" 1>&2; \ + echo "You can run Micro-Manager by typing" 1>&2; \ + echo "$(bindir)/micromanager" 1>&2; \ + echo "##############################################################################" 1>&2; \ + echo "" 1>&2 + +endif # INSTALL_AS_IMAGEJ_PLUGIN +endif # BUILD_JAVA_APP + + +if INSTALL_DEPENDENCY_JARS + +install-data-hook: + $(INSTALL) -d $(DESTDIR)$(jardir) + for jar in $(CLASSEXT)/*.jar; do \ + $(INSTALL_DATA) -c $$jar $(DESTDIR)$(jardir); \ + done + +uninstall-hook: + for jar in $(CLASSEXT)/*.jar; do \ + rm -f $(DESTDIR)$(jardir)/`basename $$jar`; \ + done + +endif # INSTALL_DEPENDENCY_JARS + + +CLEANFILES = buildscripts/launchers/micromanager buildscripts/launchers/mmimagej + + +# TODO: Building of DeviceAdapters could be made optional. +SUBDIRS = MMDevice $(MMCORE_DIR) $(MMCOREJ_DIR) $(MMCOREPY_DIR) $(JAVA_APP_DIRS) DeviceAdapters $(SECRETDEVICEADAPTERS) bindist -devicekit: - cd DeviceKit - make - cd .. -dox: - test -d $(srcdir)/doxygen/out/MMDevice || mkdir $(srcdir)/doxygen/out/MMDevice - rm -rf $(srcdir)/doxygen/out/MMDevice/* +dox: + -rm -rf doxygen/out + $(MKDIR_P) doxygen/out/MMDevice + $(MKDIR_P) doxygen/out/MMCore doxygen doxygen/MMDevice - test -d $(srcdir)/doxygen/out/MMCore || mkdir $(srcdir)/doxygen/out/MMCore - rm -rf $(srcdir)/doxygen/out/MMCore/* doxygen doxygen/MMCore diff --git a/Test_Programs/configure.in b/Test_Programs/configure.in deleted file mode 100644 index 9009e251d2..0000000000 --- a/Test_Programs/configure.in +++ /dev/null @@ -1,51 +0,0 @@ -# -*- Autoconf -*- -# Process this file with autoconf to produce a configure script. - -AC_PREREQ(2.57) -AC_INIT(FULL-PACKAGE-NAME, VERSION, BUG-REPORT-ADDRESS) -#AC_CONFIG_SRCDIR([DemoCamera/DemoCamera.cpp]) -AC_CANONICAL_HOST -AM_INIT_AUTOMAKE -AC_PROG_LIBTOOL - -m4_include([../configure.common]) - -AX_BOOST_BASE -AX_BOOST_DATE_TIME - -# Checks for typedefs, structures, and compiler characteristics. -AC_HEADER_STDBOOL -AC_C_CONST -AC_C_INLINE - -# Checks for library functions. -AC_HEADER_STDC -AC_CHECK_FUNCS([memset]) -AC_CHECK_LIB(dl, dlopen) # for dynamic linking on linux - -AC_CONFIG_FILES(Makefile ModuleTest/Makefile) - -#--------------------------------------------------- -# Check for ZLIB -#--------------------------------------------------- -AC_MSG_CHECKING(for zlib) -AC_FIND_FILE([zlib.h], [/usr/local/$ARCH/include /usr/include], ZLIBINCDIR) -if test x$ZLIBINCDIR = xNO; then - AC_MSG_RESULT([not found]) - exit 1 -else - AC_CHECK_HEADERS([$ZLIBINCDIR/zlib.h]) - if test -z "$LIBZLIB" ; then - AC_FIND_FILE([libz.a], [/usr/local/$ARCH/lib /usr/local/lib /usr/lib /usr/lib64 /usr/lib/$build_platform-$build_os], ZLIBLIBDIR) - if test x$ZLIBLIBDIR = xNO; then - AC_MSG_RESULT([zlib not found]) - exit 1 - else - AC_MSG_RESULT([zlib.a found]) - LIBZLIB="$ZLIBLIBDIR/libz.a" - fi - fi -fi -AC_SUBST(LIBZLIB) - -AC_OUTPUT diff --git a/acqEngine/Makefile.am b/acqEngine/Makefile.am index 9d1784f32a..dee2069c91 100644 --- a/acqEngine/Makefile.am +++ b/acqEngine/Makefile.am @@ -1,3 +1,4 @@ + MMAcqEngine.jar: \ $(srcdir)/src/org/micromanager/mm.clj \ $(srcdir)/src/org/micromanager/acq_engine.clj \ @@ -6,13 +7,14 @@ MMAcqEngine.jar: \ rm -rf classes/* cp -R src/org classes/ java -server -cp ../MMCoreJ_wrap/MMCoreJ.jar:$(CLASSEXT)/clojure.jar:$(IJJARPATH):../mmstudio/MMJ_.jar:$(CLASSEXT)/bsh-2.0b4.jar:./src -Djava.library.path=. -Djava.awt.headless=true -Dclojure.compile.path=classes -server clojure.lang.Compile org.micromanager.acq-engine - jar cvf MMAcqEngine.jar -C classes/ . + jar cf MMAcqEngine.jar -C classes/ . + -all: ../mmstudio MMAcqEngine.jar +jardir = $(pkgdatadir)/jars +jar_DATA = MMAcqEngine.jar -install: - cp MMAcqEngine.jar $(DESTDIR)$(IJPATH)/plugins/Micro-Manager -clean: - test -e MMAcqEngine.jar && rm MMAcqEngine.jar || echo "MMAcqEngine.jar not found" +CLEANFILES = MMAcqEngine.jar +clean-local: + -rm -rf classes diff --git a/autofocus/Makefile.am b/autofocus/Makefile.am index 98cb95cf95..af4b0b8fb3 100644 --- a/autofocus/Makefile.am +++ b/autofocus/Makefile.am @@ -1,4 +1,6 @@ -## Process this file with automake to produce Makefile.in + +AUTOMAKE_OPTIONS = foreign subdir-objects + JARS=MMAutofocus.jar MMAutofocusTB.jar MMAutofocusDuo.jar MMOughtaFocus.jar MM%.jar: BUILD=$(patsubst MM%.jar,build-%,$@) @@ -10,14 +12,12 @@ $(JARS):MM%.jar: $(srcdir)/%.java ## Work around bug in 'jar': jar cf MM_.jar -C bin/ bin/* does not work cd $(BUILD) && jar cf ../$@ * -all: $(JARS) - -install: - test -d $(DESTDIR)$(IJPATH)/mmautofocus || mkdir $(DESTDIR)$(IJPATH)/mmautofocus - cp $(JARS) $(DESTDIR)$(IJPATH)/mmautofocus/ - -clean: - for f in $(JARS); \ - do \ - test -e $$f && rm $$f || echo "$$f not found"; \ - done + +autofocusdir = $(pkgdatadir)/mmautofocus +autofocus_DATA = $(JARS) + + +CLEANFILES = $(JARS) + +clean-local: + -rm -rf $(patsubst MM%.jar,build-%,$(JARS)) diff --git a/autogen.sh b/autogen.sh new file mode 100755 index 0000000000..1565408d6d --- /dev/null +++ b/autogen.sh @@ -0,0 +1,15 @@ +#!/bin/sh + + +echo "Bootstrapping autoconf/automake build system for Micro-Manager..." 1>&2 + +# Subdirectory must be present, even if empty, to prevent automake errors. +mkdir -p SecretDeviceAdapters + +autoreconf --force --install --verbose + +echo "Bootstrapping complete; now you can run ./configure" 1>&2 +echo "If you would like to install Micro-Manager as an ImageJ plugin, run" 1>&2 +echo " ./configure --enable-imagej-plugin=/path/to/ImageJ" 1>&2 +echo " make" 1>&2 +echo " make install-ijplugin" 1>&2 diff --git a/bindist/Makefile.am b/bindist/Makefile.am new file mode 100644 index 0000000000..750d303c67 --- /dev/null +++ b/bindist/Makefile.am @@ -0,0 +1,3 @@ + +configdir = $(pkgdatadir) +config_DATA = any-platform/MMConfig_demo.cfg diff --git a/buildscripts/install_with_ImageJ_OSX.sh b/buildscripts/install_with_ImageJ_OSX.sh new file mode 100755 index 0000000000..2a7d66bcfa --- /dev/null +++ b/buildscripts/install_with_ImageJ_OSX.sh @@ -0,0 +1,39 @@ +#!/bin/bash + + +set -e + +usage() { + echo "Usage: $0 DESTDIR" 1>&2 + echo " Run this after a successful configure/make to install" 1>&2 + echo " ImageJ together with Micro-Manager, set up to run as" 1>&2 + echo " an ImageJ plugin." 1>&2 + echo " This script may be removed in the future if a more elegant" 1>&2 + echo " solution is found." 1>&2 + exit 1 +} + +pushd "`dirname $0`/.."; MM_SRCDIR=`pwd`; popd +MM_STAGEDIR="$1" +[ -z "$MM_STAGEDIR" ] && usage + +# +# +# + +cd "$MM_SRCDIR" + +MM_JARDIR="$MM_STAGEDIR/plugins/Micro-Manager" +make install pkglibdir="$MM_STAGEDIR" pkgdatadir="$MM_STAGEDIR" jardir="$MM_JARDIR" +rm -f "$MM_STAGEDIR"/*.la + +# Stage other files +cp -R "$MM_SRCDIR"/bindist/any-platform/* "$MM_STAGEDIR" +cp -R "$MM_SRCDIR"/bindist/MacOSX/* "$MM_STAGEDIR" + +# Stage third-party JARs. +cp "$MM_SRCDIR"/../3rdpartypublic/classext/*.jar "$MM_JARDIR" +mv "$MM_JARDIR"/ij.jar "$MM_STAGEDIR" + +# Ensure SVN data is removed. +find "$MM_STAGEDIR" -name .svn -prune -exec rm -rf {} + diff --git a/buildscripts/launchers/micromanager.in b/buildscripts/launchers/micromanager.in new file mode 100644 index 0000000000..021d067aa3 --- /dev/null +++ b/buildscripts/launchers/micromanager.in @@ -0,0 +1,45 @@ +#!/bin/sh + + +# Micro-Manager launcher for traditional-style Unix installation. +# +# (By traditional-style I mean that libraries and modules are in e.g. +# $PREFIX/lib/micro-manager and JARs and other files are in e.g. +# $PREFIX/share/micro-manager.) +# +# This script starts Micro-Manager as a stand-alone application, without the +# ImageJ toolbar. + + +# TODO If a system classpath is used at build time, that classpath should be +# used here, too (after appending the Micro-Manager JARs). Something like +# CLASSPATH=@CLASSPATH@. + +CLASSPATH= +jardir=@jardir@ +if test -n "$jardir"; then + for jar in "$jardir"/*.jar; do + if test -z "$CLASSPATH"; then + CLASSPATH="$jar" + else + CLASSPATH="$CLASSPATH:$jar" + fi + done +fi + +imagejjar=@imagejjar@ +if test -n "$imagejjar"; then + CLASSPATH="$imagejjar:$CLASSPATH" +fi + +echo "class path = $CLASSPATH" 1>&2 + +java -Xmx1024M \ + -classpath "$CLASSPATH" \ + -Dmmcorej.library.loading.stderr.log=yes \ + -Dmmcorej.library.path="@pkglibdir@" \ + -Dorg.micromanager.plugin.path="@pkgdatadir@/mmplugins" \ + -Dorg.micromanager.autofocus.path="@pkgdatadir@/mmautofocus" \ + -Dorg.micromanager.beanshell.start.script="@pkgdatadir@/scripts/mm_beanshell_startup.bsh" \ + -Dorg.micromanager.default.config.file="@pkgdatadir@/MMConfig_demo.cfg" \ + org.micromanager.MMStudioMainFrame diff --git a/buildscripts/launchers/mmimagej.in b/buildscripts/launchers/mmimagej.in new file mode 100644 index 0000000000..070c11d823 --- /dev/null +++ b/buildscripts/launchers/mmimagej.in @@ -0,0 +1,21 @@ +#!/bin/sh + + +# Micro-Manager launcher for running as ImageJ plugin. + +# Note: we could conceivably generate this script so that it will use +# `dirname $0` (i.e. the location of the script) as the ImageJ directory and +# search for ij.jar at runtime. That would allow the ImageJ folder to be moved +# after installation. But that would disallow the script from being moved out +# of the ImageJ directory, e.g. to put it in PATH. So let's just keep it +# simple. + +# ImageJ doesn't work very well unless started in its own directory (even if +# system properties like plugins.dir are set). Let it operate under the +# assumption it makes. +cd "@imagejdir@" + +java -Xmx1024M \ + -Dmmcorej.library.loading.stderr.log=yes \ + -jar "@imagejjar@" \ + -eval 'run("Micro-Manager Studio");' diff --git a/buildscripts/nightly/nightlybuild_OSX_mm.sh b/buildscripts/nightly/nightlybuild_OSX_mm.sh index 517911ca99..3aeb85a046 100755 --- a/buildscripts/nightly/nightlybuild_OSX_mm.sh +++ b/buildscripts/nightly/nightlybuild_OSX_mm.sh @@ -57,10 +57,8 @@ fi sed -e "s/@VERSION_STRING@/$MM_VERSION/" buildscripts/MMVersion.java.in > mmstudio/src/org/micromanager/MMVersion.java || exit if [ "$do_remake" = yes ]; then -buildscripts/nextgen-gnubuild/activate.py -r autoreconf -v else -buildscripts/nextgen-gnubuild/activate.py -a sh autogen.sh fi diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000000..80d2369f9a --- /dev/null +++ b/configure.ac @@ -0,0 +1,441 @@ + +AC_PREREQ([2.64]) +AC_INIT([Micro-Manager], [1.4], [info@micro-manager.org]) +AC_CONFIG_MACRO_DIR([m4]) +AC_CONFIG_SRCDIR([MMCore/MMCore.cpp]) +AC_CANONICAL_BUILD +AC_CANONICAL_HOST +AM_INIT_AUTOMAKE +LT_INIT([disable-static]) +AC_PROG_MKDIR_P + +AC_PROG_CXX([clang++ llvm-g++ g++ c++]) +AC_PROG_CC([clang llvm-gcc gcc cc]) + + +# Boost +# TODO Reflect results in configuration +AX_BOOST_BASE([1.46.0]) +AX_BOOST_DATE_TIME +AX_BOOST_SYSTEM + + +# zlib +# TODO Make optional (MMDevice and device adapters do not need zlib) +MM_ARG_WITH_REQUIRED_LIB([zlib], [zlib], [ZLIB]) +MM_LIB_Z([$ZLIB_PREFIX], [], [MM_MSG_REQUIRED_LIB_FAILURE([zlib], [zlib])]) + + +# AppleHost dependencies +case $host in + *apple-darwin*) MMCORE_APPLEHOST_LDFLAGS="-framework CoreFoundation -framework IOKit" ;; + *) MMCORE_APPLEHOST_LDFLAGS="" ;; +esac +AC_SUBST([MMCORE_APPLEHOST_LDFLAGS]) + + +# TODO Make conditional +can_build_mmcore=yes + + +## +## MMCoreJ and MMCorePy +## + +# SWIG +AC_ARG_VAR([SWIG], [Simple Wrapper and Interface Generator]) +AC_CHECK_PROGS([SWIG], [swig]) +# TODO Provide SWIGFLAGS as precious variable + + +# Java + +if test -n "$with_javaincl"; then + AC_MSG_ERROR([--with-javaincl has been removed. You can use one of the following: + ./configure --with-java=/path/to/java/home + ./configure JNI_CPPFLAGS="-I/path/to/jni/include" +If you set the Java home, bin/javac and include/jni.h in that directory will be +used. If you set JNI_CPPFLAGS, it will override any automatic detection. +See ./configure --help for more options.]) +fi + +AC_ARG_VAR([JAVA_HOME], [JDK home directory]) +AC_ARG_VAR([JAVACFLAGS], [Java compiler flags]) +MM_ARG_WITH_JAVA +AS_IF([test "x$want_java" != xno], +[ + AS_IF([test -n "$JAVA_PREFIX"], + [ + AS_IF([test -n "$JAVA_HOME"], + [ + AC_MSG_ERROR([--with-java argument and JAVA_HOME both given. Try removing argument from --with-java]) + ], + [ + JAVA_HOME="$JAVA_PREFIX" + ]) + ], + [ + AS_IF([test -z "$JAVA_HOME"], + [ + case "$build_os" in + darwin*) JAVA_HOME=`/usr/libexec/java_home`;; + esac + ]) + ]) + have_java=no + MM_PROGS_JAVA( + [ + MM_HEADERS_JNI( + [ + have_java=yes + ]) + ]) + + AS_IF([test "x$want_java" = xyes], + [ + AS_IF([test "x$have_java" = xno], + [ + AC_MSG_FAILURE([--with-java was given, but test for Java and JNI failed]) + ]) + ]) + use_java=$have_java +], +[ + use_java=no +]) + +MM_JNI_LIBRARY_PREFIX_SUFFIX +AM_CONDITIONAL([NONSTD_JNI_PREFIX], [test "x$JNI_PREFIX" != xlib]) + + +build_mmcorej=yes +test "x$can_build_mmcore" = xno && build_mmcorej=no +test "x$use_java" = xno && build_mmcorej=no +test -z "$SWIG" && build_mmcorej=no +AM_CONDITIONAL([BUILD_MMCOREJ], [test "x$build_mmcorej" = xyes]) + + +enable_hardcoded_mmcorej_library_path_default=yes +test "x$enable_imagej_plugin" != xno && enable_hardcoded_mmcorej_library_path_default=no +AC_ARG_ENABLE([hardcoded-mmcorej-library-path], + [AS_HELP_STRING([--disable-hardcoded-mmcorej-library-path], + [Do not use a fallback absolute path to locate the + MMCoreJ_wrap native library (default: disable if building + as ImageJ plugin; otherwise enable)])], + [], + [enable_hardcoded_mmcorej_library_path=yes]) +if test "x$enable_hardcoded_mmcorej_library_path" = xyes; then + # The path to be hard-coded into MMCoreJ's Java class loading code. This + # should be the value of pkglibdir at build time (not configuration time), + # so we use an escaped make variable substitution (recall that normal make + # variables are recursively expanded). + MMCOREJ_LIBRARY_PATH="\$(pkglibdir)" +else + MMCOREJ_LIBRARY_PATH= +fi +AC_SUBST([MMCOREJ_LIBRARY_PATH]) + + +# Python and NumPy +MM_ARG_WITH_PYTHON +AS_IF([test "x$want_python" != xno], +[ + AS_IF([test -n "$PYTHON_PREFIX"], + [ + # Be lenient if user gives --with-python=bindir instead of + # --with-python=prefix. + MM_PROG_PYTHON([$PYTHON_PREFIX/bin $PYTHON_PREFIX]) + ], + [ + MM_PROG_PYTHON + ]) + + have_python=no + AS_IF([test -n "$PYTHON"], + [ + MM_HEADERS_PYTHON( + [ + MM_HEADERS_NUMPY([have_python=yes]) + ]) + ]) + + AS_IF([test "x$want_python" = xyes], + [ + AS_IF([test "x$have_python" = xno], + [ + AC_MSG_FAILURE([--with-python was given, but test for Python and NumPy failed]) + ]) + ]) + use_python=$have_python +], +[ + use_python=no +]) + + +build_mmcorepy=yes +test "x$can_build_mmcore" = xno && build_mmcorepy=no +test "x$use_python" = xno && build_mmcorepy=no +test -z "$SWIG" && build_mmcorepy=no +AM_CONDITIONAL([BUILD_MMCOREPY], [test "x$build_mmcorepy" = xyes]) + + +build_mmcore=no +test "x$build_mmcorej" = xyes && build_mmcore=yes +test "x$build_mmcorepy" = xyes && build_mmcore=yes +AM_CONDITIONAL([BUILD_MMCORE], [test "x$build_mmcore" = xyes]) + + +## +## Java application (MMStudio and plugins) +## + +AC_ARG_ENABLE([java-app], + [AS_HELP_STRING([--disable-java-app], [do not build the Java app])], + [], [enable_java_app=auto]) + +build_java_app=yes +test "x$enable_java_app" = xno && build_java_app=no +test "x$build_mmcorej" = xno && build_java_app=no +# TODO Require dependency JARs + +AS_IF([test "x$enable_java_app" = xyes], +[ + AS_IF([test "x$build_java_app" = xno], + [ + AC_MSG_ERROR([--enable-java-app was given, but prerequisites were not satisfied]) + ]) +]) + +AM_CONDITIONAL([BUILD_JAVA_APP], [test "x$build_java_app" = xyes]) + + +if test -n "$with_imagej"; then + AC_MSG_ERROR([--with-imagej has been removed. Please use --enable-imagej-plugin and (optionally) --with-ij-jar.]) +fi + + +AC_ARG_ENABLE([imagej-plugin], + [AS_HELP_STRING([--enable-imagej-plugin=IMAGEJDIR], + [Build for installation as plugin for ImageJ at IMAGEJDIR. To install + into IMAGEJDIR, run 'make install-ijplugin' instead of 'make install'.])], + [], [enable_imagej_plugin=no]) +AS_IF([test "x$build_java_app" = xno], + [AS_IF([test "x$enable_imagej_plugin" != xno], + [AC_MSG_ERROR([--enable-imagej-plugin given but Java app will not be built])])]) +case $enable_imagej_plugin in + yes) AC_MSG_ERROR([--enable-imagej-plugin requires argument (ImageJ directory)]) ;; + no) ;; + *) imagejdir="$enable_imagej_plugin";; +esac +AC_SUBST([imagejdir]) +AM_CONDITIONAL([INSTALL_AS_IMAGEJ_PLUGIN], [test -n "$imagejdir"]) + + +# Allow user to override location of ij.jar (whether or not we are building as +# ImageJ plugin). If we are building as ImageJ plugin, default to the ij.jar in +# the target ImageJ directory. Otherwise do not set imagejjar, and use the copy +# in CLASSEXT. +AC_ARG_WITH([ij-jar], + [AS_HELP_STRING([--with-ij-jar=FILE], + [Use specified ImageJ ij.jar for building and running])], + [], [with_ij_jar=auto]) +case $with_ij_jar in + yes) AC_MSG_ERROR([--with-ij-jar requires argument (ij.jar path)]) ;; + no) imagejjar="";; + *) imagejjar="$with_ij_jar";; +esac +if test "x$imagejjar" = xauto; then + if test -n "$imagejdir"; then + AC_MSG_CHECKING([for ij.jar under $imagejdir]) + # Select the first ij.jar found + imagejjar=`find "$imagejdir" -name ij.jar | head -n 1` + if test -z "$imagejjar"; then + AC_MSG_RESULT([no]) + AC_MSG_ERROR([use --with-ij-jar=FILE to specify where to find ij.jar]) + fi + # But make sure all copies are equal (this is for cases like the OS X + # version, where there is one copy each within ImageJ.app and + # ImageJ64.app) + for ij_jar in `find "$imagejdir" -name ij.jar` + do + if cmp -s "$imagejjar" "$ij_jar"; then :; else + AC_MSG_RESULT([multiple non-identical copies]) + AC_MSG_ERROR([use --with-ij-jar=FILE to specify which ij.jar to use]) + fi + done + AC_MSG_RESULT([$imagejjar]) + else + imagejjar= + fi +fi +AC_SUBST([imagejjar]) + + +# Java dependencies. These should be checked for and their location should be +# configurable (CLASSPATH for each library). For now, hard-coded to +# 3rdpartypublic. +if test "x$build_java_app" = xyes; then + # TODO This path should be configurable. And we should have an automated way + # to fetch dependencies, but that is a future project. + CLASSEXT="\$(top_srcdir)/../3rdpartypublic/classext" + + # For now, just use hard-coded locations for dependency JARs. Ideally, we + # would just use a user-provided classpath and check for classes, not JARs. + # (In addition to that, there should be a way to fetch dependencies using + # Ivy.) + + # Note: imagejjar is the location of an installed ij.jar (part of the + # system). IJJARPATH is the ij.jar to use for the build, which may not be + # installed. + if test -n "$imagejjar"; then + IJJARPATH="$imagejjar" + else + IJJARPATH="$CLASSEXT/ij.jar" + fi + BSHJARPATH="$CLASSEXT/bsh-2.0b4.jar" + SWINGXJARPATH="$CLASSEXT/swingx-0.9.5.jar" + COMMONSMATHJARPATH="$CLASSEXT/commons-math-2.0.jar" + SWINGLAYOUTJARPATH="$CLASSEXT/swing-layout-1.0.4.jar" + ABSOLUTEJARPATH="$CLASSEXT/AbsoluteLayout.jar" + JFREECHARTJARPATH="$CLASSEXT/jfreechart-1.0.13.jar:$CLASSEXT/jcommon-1.0.16.jar" + # TODO This list is incomplete, and various Makefile.am's are using CLASSEXT + # with the JAR name. +fi + +AC_SUBST(CLASSEXT) +AC_SUBST(BSHJARPATH) +AC_SUBST(SWINGXJARPATH) +AC_SUBST(COMMONSMATHJARPATH) +AC_SUBST(SWINGLAYOUTJARPATH) +AC_SUBST(ABSOLUTEJARPATH) +AC_SUBST(JFREECHARTJARPATH) +AC_SUBST(IJJARPATH) + + +AC_ARG_ENABLE([install-dependency-jars], + [AS_HELP_STRING([--disable-install-dependency-jars], + [Do not install third-party library JARs])], + [], [enable_install_dependency_jars=yes]) +test "x$build_java_app" = xno && enable_install_dependency_jars=no +AM_CONDITIONAL([INSTALL_DEPENDENCY_JARS], + [test "x$enable_install_dependency_jars" != xno]) + + +## +## Leftover stuff (needs cleanup) +## + +AC_HEADER_STDC +AC_HEADER_STDBOOL +AC_C_CONST +AC_C_INLINE +AC_CHECK_FUNCS([memset]) +AC_CHECK_LIB(dl, dlopen) + + +# Install Device Adapter API library and headers +install_mmdevapi=false +# TODO reinstate this flag in some better form +#AC_ARG_ENABLE(inst-devapi, +# [ --enable-inst-devapi Install the Device Adapter API library and headers ], +# [ install_mmdevapi=true ]) +AM_CONDITIONAL([INSTALL_MMDEVAPI], [test x$install_mmdevapi = xtrue]) + + +## +## Subdirectory configuration +## + +AC_MSG_CHECKING([for proprietary device adapter source]) +AS_IF([test -f "$srcdir/SecretDeviceAdapters/configure"], + [build_secretdeviceadapters=yes], [build_secretdeviceadapters=no]) +AM_CONDITIONAL([BUILD_SECRETDEVICEADAPTERS], + [test "x$build_secretdeviceadapters" = xyes]) + +AC_CONFIG_SUBDIRS([DeviceAdapters]) +AS_IF([test "x$build_secretdeviceadapters" = xyes], [ + AC_CONFIG_SUBDIRS([SecretDeviceAdapters]) +]) +AC_CONFIG_SUBDIRS([DeviceKit]) + + +## +## Output generation +## + +AC_CONFIG_FILES(m4_strip([ + Makefile + MMDevice/Makefile + MMCore/Makefile + MMCoreJ_wrap/Makefile + MMCorePy_wrap/Makefile + mmstudio/Makefile + acqEngine/Makefile + plugins/Makefile + autofocus/Makefile + scripts/Makefile + bindist/Makefile +])) + +AC_OUTPUT + +echo "" +echo "m4_text_box([Micro-Manager configuration])" +echo "" + +if test "x$use_java" = xyes; then +echo " JAVA_HOME = $JAVA_HOME" +echo " JNI_CPPFLAGS = $JNI_CPPFLAGS" +echo " JAVAC = $JAVAC" +echo "" +fi + +if test "x$use_python" = xyes; then +echo " PYTHON = $PYTHON" +echo " PYTHON_CPPFLAGS = $PYTHON_CPPFLAGS" +echo " NUMPY_CPPFLAGS = $NUMPY_CPPFLAGS" +echo "" +fi + +echo " Build MMCoreJ (MMCore Java wrapper): $build_mmcorej" +echo " Build MMCorePy (MMCore Python wrapper): $build_mmcorepy" +echo " Build Java application (MMStudio): $build_java_app" +echo " Build device adapters: yes" +echo " Build closed-source device adapters: $build_secretdeviceadapters" +echo "" + +if test "x$build_java_app" = xyes; then +AM_COND_IF([INSTALL_AS_IMAGEJ_PLUGIN], +[ +echo " Install MMStudio as ImageJ plugin: yes" +echo " Target ImageJ directory: $imagejdir" +], +[ +echo " Install MMStudio as ImageJ plugin: no" +echo " Installation prefix: $prefix" +]) +if test -n "$imagejjar"; then +echo " ij.jar: $imagejjar" +else +echo " ij.jar: from build classpath" +fi +AM_COND_IF([INSTALL_DEPENDENCY_JARS], +[ +echo " Install dependency JARs: yes" +], +[ +echo " Install dependency JARs: no" +]) +echo "" +fi # build_java_app + +echo "Now type 'make' to build." +AM_COND_IF([INSTALL_AS_IMAGEJ_PLUGIN], +[ + echo "IMPORTANT: To install as an ImageJ plugin, use 'make install-ijplugin'" + echo "instead of 'make install'." +], +[ + echo "Then type 'make install' to install." +]) diff --git a/configure.common b/configure.common deleted file mode 100644 index 5c9604bf89..0000000000 --- a/configure.common +++ /dev/null @@ -1,81 +0,0 @@ -# Check for programs. -AC_PROG_CXX([clang++ llvm-g++ g++ c++]) -AC_PROG_CC([clang llvm-gcc gcc cc]) -AC_PROG_LIBTOOL - -case $host in - *-*-linux*) - LPTHREAD="-lpthread" - DEVICEADAPTERPATH="\${libdir}/micro-manager" - ;; -esac -AC_SUBST(LPTHREAD) - -build_platform="$build_cpu" -case "$build_cpu" in - i*86) - build_platform="i386" - ;; -esac - -# Specify architecture when building Universal Binaries on Mac -AC_ARG_ENABLE([arch], [AS_HELP_STRING([--enable-arch=arch],[Mac OS X only: ppc, i386, or x86_64])], [ARCH=$enableval], [ARCH=]) - -#---------------------------------------------------------------- -# ImageJ -#---------------------------------------------------------------- - -# Determine if we need to look for ImageJ -AC_MSG_CHECKING(whether to build for ImageJ) -AC_ARG_WITH([imagej], [AS_HELP_STRING([--with-imagej=path],[path to ImageJ directory])], [IMAGEJDIR="$withval"], [IMAGEJDIR="yes"]) -AC_MSG_RESULT($IMAGEJDIR) - -# Debian IJ settings -DEBIANIJ="/usr/share/java/ij.jar"; -DEBIANIJPLUGIN="/usr/share/imagej"; - -AM_CONDITIONAL(BUILD_WITH_JAVA, test "$IMAGEJDIR" != "no") -if test "$IMAGEJDIR" != "no" ; then - AC_MSG_CHECKING(for ImageJ directory) - - if test "$IMAGEJDIR" = "yes"; then - IMAGEJDIR="/Applications/ImageJ /usr/local/ImageJ /usr/local/imagej " - fi - IJPATH="" - for d in $IMAGEJDIR ; do - if test -d "$d" ; then - AC_MSG_RESULT($d) - IJPATH=$d - break - fi - done - - if test -e "$DEBIANIJ"; then - IJPATH="$DEBIANIJPLUGIN"; - fi - - if test "$IJPATH" = "" ; then - AC_MSG_ERROR([not found, use the --without-imagej option to build without ImageJ or install ImageJ (http://rsb.info.nih.gov/ij/ and rerun configure, possibly using the --with-imagej=path option]) - fi - - if test -z "$DEVICEADAPTERPATH"; then - DEVICEADAPTERPATH="$IJPATH" - fi - - if test -z "$JARPATH"; then - JARPATH="$IJPATH/plugins/Micro-Manager" - fi -else - DEVICEADAPTERPATH="\${libdir}/micro-manager" -fi - - -AC_SUBST(IJPATH) -AC_SUBST(DEVICEADAPTERPATH) -AC_SUBST(JARPATH) - -AC_MSG_CHECKING(device adapter path) -AC_MSG_RESULT($DEVICEADAPTERPATH) - -AC_MSG_CHECKING(jar path) -AC_MSG_RESULT($JARPATH) diff --git a/configure.in b/configure.in deleted file mode 100755 index 0894a4b134..0000000000 --- a/configure.in +++ /dev/null @@ -1,343 +0,0 @@ -# -*- Autoconf -*- -# Process this file with autoconf to produce a configure script. - -AC_PREREQ(2.57) -AC_INIT([Micro-Manager], 1.4, info@micro-manager.org) -#AC_CONFIG_HEADERS([config.h]) -AC_CONFIG_MACRO_DIR([m4]) -AC_CONFIG_SRCDIR([MMCore/MMCore.cpp]) -AC_CANONICAL_HOST -AM_INIT_AUTOMAKE -AC_LIBTOOL_DLOPEN -AC_PROG_LIBTOOL - -m4_include([configure.common]) - - -AM_CONDITIONAL(BUILD_WITH_JAVA, test "$IMAGEJDIR" != "no") -if test "$IMAGEJDIR" != "no" ; then - - #---------------------------------------------------------------- - # Set the CLASSEXT location - #---------------------------------------------------------------- - CLASSEXT=$PWD"/../3rdpartypublic/classext" - echo "CLASSEXT="$CLASSEXT - - #---------------------------------------------------------------- - # Find ij.jar in directory - #---------------------------------------------------------------- - AC_MSG_CHECKING(for ij.jar) - IJJARDIR="$CLASSEXT/ij.jar" - echo "IJJARDDIR="$IJJARDIR - if test -r "$IJJARDIR" ; then - IJJARPATH="$IJJARDIR" - AC_MSG_RESULT($IJJARPATH) - fi - - if test -z "$IJJARPATH"; then - AC_MSG_ERROR([not found, Use the without-imagej directive to build without ImageJ or install ImageJ (http://rsb.info.nih.gov/ij/ and rerun configure, possibly using the --with-imagej=path directive]) - fi - - #---------------------------------------------------------------- - # Find beanshell.jar in ImageJ plugins directory - #---------------------------------------------------------------- - AC_MSG_CHECKING(for beanshell jar file in ImageJ plugins directory) - if test -r "$CLASSEXT/bsh-2.0b4.jar" ; then - BSHJARPATH="$CLASSEXT/bsh-2.0b4.jar" - AC_MSG_RESULT($BSHJARPATH) - fi - if test -r "/usr/share/java/bsh.jar" ; then - BSHJARPATH="/usr/share/java/bsh.jar" - AC_MSG_RESULT($BSHJARPATH) - fi - if test "$BSHJARPATH" = "" ; then - AC_MSG_ERROR([not found, Use the without-imagej directive to build without ImageJ GUI, or download Beanshell (http://www.beanshell.org/download.html) and copy bsh-2.0b4.jar to $IJPATH/plugins]) - fi - - #---------------------------------------------------------------- - # Find swingx.jar in ImageJ plugins directory - #---------------------------------------------------------------- - AC_MSG_CHECKING(for swingx jar file in ImageJ plugins directory) - if test -r "$CLASSEXT/swingx-0.9.5.jar" ; then - SWINGXJARPATH="$CLASSEXT/swingx-0.9.5.jar" - AC_MSG_RESULT($SWINGXJARPATH) - fi - if test -r "/usr/share/java/swingx.jar" ; then - SWINGXJARPATH="/usr/share/java/swingx.jar" - AC_MSG_RESULT($SWINGXJARPATH) - fi - if test "$SWINGXJARPATH" = "" ; then - AC_MSG_ERROR([not found, Use the without-imagej directive to build without ImageJ GUI, or download swingx and copy to $IJPATH/plugins]) - fi - - #---------------------------------------------------------------- - # Find commons-math-2.0.jar in ImageJ plugins directory - #---------------------------------------------------------------- - - AC_MSG_CHECKING(for apache commons math jar file) - if test -r "$CLASSEXT/commons-math-2.0.jar" ; then - COMMONSMATHJARPATH="$CLASSEXT/plugins/commons-math-2.0.jar" - AC_MSG_RESULT($COMMONSMATHJARPATH) - fi - if test -r "/usr/share/java/commons-math-2.0.jar" ; then - COMMONSMATHJARPATH="/usr/share/java/commons-math-2.0.jar" - AC_MSG_RESULT($COMMONSMATHJARPATH) - fi - if test -r $CLASSEXT"/commons-math-2.0.jar" ; then - COMMONSMATHJARPATH=$CLASSEXT"/commons-math-2.0.jar" - AC_MSG_RESULT($COMMONSMATHJARPATH) - fi - if test "$COMMONSMATHJARPATH" = "" ; then - AC_MSG_ERROR([commons-math-2.0.jar not found. It should be in the classext directory.]) - fi - - #---------------------------------------------------------------- - # Find swing-layout-1.0.4.jar in ImageJ plugins directory - #---------------------------------------------------------------- - AC_MSG_CHECKING(for swing-layout jar file) - if test -r "$CLASSEXT/swing-layout-1.0.4.jar" ; then - SWINGLAYOUTJARPATH="$CLASSEXT/swing-layout-1.0.4.jar" - AC_MSG_RESULT($SWINGLAYOUTJARPATH) - fi - if test -r "/usr/share/java/swing-layout-1.0.4.jar" ; then - SWINGLAYOUTJARPATH="/usr/share/java/swing-layout-1.0.4.jar" - AC_MSG_RESULT($SWINGLAYOUTJARPATH) - fi - if test -r $CLASSEXT"/swing-layout-1.0.4.jar" ; then - SWINGLAYOUTJARPATH=$CLASSEXT"/swing-layout-1.0.4.jar" - AC_MSG_RESULT($SWINGLAYOUTJARPATH) - fi - if test "$SWINGLAYOUTJARPATH" = "" ; then - AC_MSG_ERROR([swing-layout-1.0.4.jar not found. It should be in the classext directory.]) - fi - - #---------------------------------------------------------------- - # Find AbsoluteLayout.jar - #---------------------------------------------------------------- - AC_MSG_CHECKING(for AbsoluteLayout jar file) - if test -r "$CLASSEXT/AbsoluteLayout.jar" ; then - ABSOLUTEJARPATH="$CLASSEXT/AbsoluteLayout.jar" - AC_MSG_RESULT($ABSOLUTEJARPATH) - fi - if test -r "/usr/share/java/AbsoluteLayout.jar" ; then - ABSOLUTEJARPATH="/usr/share/java/AbsoluteLayout.jar" - AC_MSG_RESULT($ABOSLUTEJARPATH) - fi - if test -r $CLASSEXT"/AbsoluteLayout.jar" ; then - ABSOLUTEJARPATH=$CLASSEXT"/AbsoluteLayout.jar" - AC_MSG_RESULT($ABSOLUTEJARPATH) - fi - if test "$ABSOLUTEJARPATH" = "" ; then - AC_MSG_ERROR([AbsoluteLayout.jar not found. It should be in the classext directory.]) - fi - #---------------------------------------------------------------- - # Find JFreeChart - #---------------------------------------------------------------- - AC_MSG_CHECKING(for JFreeChart jar file) - if test -r "$CLASSEXT/jfreechart-1.0.13.jar" ; then - JFREECHARTJARPATH="$CLASSEXT/jfreechart-1.0.13.jar:$CLASSEXT/jcommon-1.0.16.jar" - AC_MSG_RESULT($JFREECHARTJARPATH) - fi - # TODO: look in other paths -fi - - -AC_SUBST(CLASSEXT) -AC_SUBST(BSHJARPATH) -AC_SUBST(SWINGXJARPATH) -AC_SUBST(COMMONSMATHJARPATH) -AC_SUBST(SWINGLAYOUTJARPATH) -AC_SUBST(ABSOLUTEJARPATH) -AC_SUBST(JFREECHARTJARPATH) -AC_SUBST(IJJARPATH) - -AC_MSG_CHECKING([whether to build the core]) -AC_ARG_WITH([core], [AS_HELP_STRING([--with-core],[use --without-core to only build DeviceAdapters])], [], [with_core=yes]) -if test "x$with_core" = xno; then - AC_MSG_RESULT([no]); -else - AC_MSG_RESULT([yes]) - - #--------------------------------------------------- - # Check for BOOST - #--------------------------------------------------- - AX_BOOST_BASE([1.40.0]) - AX_BOOST_DATE_TIME - AX_BOOST_SYSTEM - - #--------------------------------------------------- - # Check for ZLIB - #--------------------------------------------------- - # The following is hard-coded to find a static libz.a, which we prefer for - # release builds. Use of static vs shared libz should probably be - # configurable from the command line, but keep the behavior for now. - AC_MSG_CHECKING(for zlib) - zlib_incdirs="/usr/local/$ARCH/include /usr/local/include /usr/include" - zlib_libdirs="/usr/local/$ARCH/lib /usr/local/lib /usr/lib /usr/lib64 /usr/lib/$build_platform-$build_os" - AC_ARG_WITH([zlib], [AS_HELP_STRING([--with-zlib=path], [use zlib at path])], - [ZLIBDIR="$withval"], [ZLIBDIR="yes"]) - if test "x$ZLIBDIR" != "xno" ; then - if test "x$ZLIBDIR" != "xyes" ; then - zlib_incdirs="$ZLIBDIR/include" - zlib_libdirs="$ZLIBDIR/lib" - fi - else - AC_MSG_RESULT([zlib required but disabled on command line]) - exit 1 - fi - - AC_FIND_FILE([zlib.h], [$zlib_incdirs], ZLIBINCDIR) - if test x$ZLIBINCDIR = xNO; then - AC_MSG_RESULT([not found]) - exit 1 - else - AC_CHECK_HEADERS([$ZLIBINCDIR/zlib.h]) - if test -z "$LIBZLIB" ; then - AC_FIND_FILE([libz.a], [$zlib_libdirs], ZLIBLIBDIR) - if test x$ZLIBLIBDIR = xNO; then - AC_MSG_RESULT([zlib not found]) - exit 1 - else - AC_MSG_RESULT([libz.a found]) - LIBZLIB="$ZLIBLIBDIR/libz.a" - fi - fi - fi - AC_SUBST(LIBZLIB) - - - #--------------------------------------------------- - # Check for SWIG - #--------------------------------------------------- - AC_CHECK_PROGS(SWIG, swig) - if test "$SWIG" = "" ; then - AC_MSG_ERROR([not found, swig is needed to build this application. Please download (http://www.swig.org/download.html) and install]) - fi - -fi -AM_CONDITIONAL([BUILD_APP], test "x$with_core" = xyes) - - -# Check whether to build python - -AC_MSG_CHECKING(whether to build for python) -AC_ARG_ENABLE([python], - AS_HELP_STRING([--enable-python], [Enable building python wrapper of MMCore])) - -AC_MSG_RESULT($enable_python) - -AM_CONDITIONAL([BUILD_PYTHON], test "$enable_python" = "yes") - -#---------------------------------------------------------------- -# Look for java binaries and headers -#---------------------------------------------------------------- - -AC_CHECK_PROGS(JAVA, java kaffe guavac) -AC_CHECK_PROGS(JAVAC, javac) -AC_CHECK_PROGS(JAR, jar) - -# Find Java header files: -AC_MSG_CHECKING(for java include file jni.h) -AC_ARG_WITH([javaincl], [AS_HELP_STRING([--with-javaincl=path],[set location of Java include directory])], [JAVAINCDIR="$withval"], [JAVAINCDIR=]) - -if test -z "$JAVAINCDIR"; then - JAVAINCDIR="/usr/j2sdk*/include /usr/local/j2sdk*/include /usr/jdk*/include /usr/local/jdk*/include /opt/j2sdk*/include /opt/jdk*/include /usr/java/include /usr/java/j2sdk*/include /usr/java/jdk*/include /usr/local/java/include /opt/java/include /usr/include/java /usr/local/include/java /usr/lib/java/include /usr/lib/jvm/java*/include /usr/include/kaffe /usr/local/include/kaffe /usr/include" - # Add in default installation directory on Windows for Cygwin - case $host in - *-*-cygwin* | *-*-mingw*) JAVAINCDIR="c:/Program*Files/Java/jdk*/include d:/Program*Files/Java/jdk*/include c:/j2sdk*/include d:/j2sdk*/include c:/jdk*/include d:/jdk*/include $JAVAINCDIR";; - *-*-darwin*) JAVAINCDIR="/System/Library/Frameworks/JavaVM.framework/Headers $JAVAINCDIR";; - *);; - esac -fi - - -JAVAINC="" -for d in $JAVAINCDIR ; do - if test -r "$d/jni.h" ; then - AC_MSG_RESULT($d) - JAVAINCDIR=$d - JAVAINC=-I\"$d\" - break - fi -done - -if test "$JAVAINC" = "" ; then - AC_MSG_RESULT(not found) -else - # now look for /jni_md.h - AC_MSG_CHECKING(for java include file jni_md.h) - JAVAMDDIR=`find "$JAVAINCDIR" -follow -name jni_md.h -print` - if test "$JAVAMDDIR" = "" ; then - AC_MSG_RESULT(not found) - else - JAVAMDDIR=`dirname "$JAVAMDDIR" | tail -n 1` - JAVAINC="${JAVAINC} -I\"$JAVAMDDIR\"" - AC_MSG_RESULT($JAVAMDDIR) - fi -fi - -# Java on Windows platforms including Cygwin doesn't use libname.dll, rather name.dll when loading dlls -case $host in -*-*-cygwin* | *-*-mingw*) JAVALIBRARYPREFIX="";; -*)JAVALIBRARYPREFIX="lib";; -esac - -# Java on Mac OS X tweaks -case $host in -*-*-darwin*) - JAVASO=".jnilib" - JAVALDSHARED='$(CC)' - JAVACXXSHARED='$(CXX)' - ;; -*) - # JAVASO='$(SO)' - JAVASO='.so' - JAVALDSHARED='$(LDSHARED)' - JAVACXXSHARED='$(CXXSHARED)' - ;; -esac - -JAVACFLAGS='-Xlint:all,-serial -source 1.5 -target 1.5' - -# Export variables to Makefile -AC_SUBST(JAVAINC) -AC_SUBST(JAVADYNAMICLINKING) -AC_SUBST(JAVALIBRARYPREFIX) -AC_SUBST(JAVASO) -AC_SUBST(JAVALDSHARED) -AC_SUBST(JAVACXXSHARED) -AC_SUBST(JAVACFLAGS) -AC_SUBST(I5DJARPATH) - -# Checks for libraries. -AC_CHECK_LIB(dl, dlopen) # Dynamic linking for SunOS/Solaris and SYSV - -# Checks for header files. -AC_HEADER_STDC - -# Checks for typedefs, structures, and compiler characteristics. -AC_HEADER_STDBOOL -AC_C_CONST -AC_C_INLINE - - -# Checks for library functions. -AC_HEADER_STDC -AC_CHECK_FUNCS([memset]) - -# Install Device Adapter API library and headers -install_mmdevapi=false -AC_ARG_ENABLE(inst-devapi, - [ --enable-inst-devapi Install the Device Adapter API library and headers ], - [ install_mmdevapi=true ]) -AM_CONDITIONAL([INSTALL_MMDEVAPI], [test x$install_mmdevapi = xtrue]) - -# Check for Device Adapters with proprietary code -AC_MSG_CHECKING(for proprietary DeviceAdapters) -AM_CONDITIONAL(BUILD_SECRETDEVICEADAPTERS, test -f "SecretDeviceAdapters/configure.in") -if test -z "${BUILD_SECRETDEVICEADAPTERS}" ; then - AC_CONFIG_SUBDIRS([SecretDeviceAdapters]) -fi - -AC_CONFIG_SUBDIRS(DeviceAdapters DeviceKit) -AC_OUTPUT(Makefile MMCore/Makefile MMCoreJ_wrap/Makefile mmstudio/Makefile acqEngine/Makefile plugins/Makefile scripts/Makefile autofocus/Makefile MMDevice/Makefile MMCorePy_wrap/Makefile) diff --git a/doc/how-to-build.md b/doc/how-to-build.md new file mode 100644 index 0000000000..2bf0f4d86e --- /dev/null +++ b/doc/how-to-build.md @@ -0,0 +1,201 @@ + +How to build and install Micro-Manager +====================================== + +Overview +-------- + +Currently, Micro-Manager has two, more or less orthogonal, build systems: one +for Unix (OS X and Linux), and one for Windows. + + +Building on Windows +------------------- + +The Windows build uses Microsoft Windows SDK 7.1 and Visual Studio 2010 SP1 +Express for the C++ components, and Apache Ant for the Java components and +for automating the entire build. + +(Instructions are to be written here. For now, please refer to the +[wiki page](https://micro-manager.org/wiki/Building_MM_on_Windows). + + +Building on Unix +---------------- + +The Unix build uses the GNU Build System (aka Autotools, aka configure & +make). + +Note: The Unix build scripts were reworked in April, 2014, and some details +have changed. + + +### Getting the prerequisites + +There are several packages that are required to build and/or run +Micro-Manager. It is usually easiest to install these using the distribution's +package manager (on Linux) or using Homebrew (on OS X). + +On OS X, start by installing Xcode 5.x. After installing, make sure to open +the Xcode app once and allow it to install the command line tools. + +On Linux, ensure that you have gcc and g++ installed. + +Packages required for building are: + +- autoconf +- automake +- libtool +- pkg-config +- swig + +(On OS X, do not confuse Apple's /usr/bin/libtool with GNU Libtool. We need the +latter. Homebrew installs GNU Libtool as `glibtool`.) + +You will also need subversion to obtain Micro-Manager source code. + +Required dependencies are: + +- Boost 1.46 or later +- zlib + +To build MMCoreJ and the Java application (Micro-Manager Studio), you will +need the Java Development Kit. Micro-Manager Java code is written in Java 1.6. +On OS X, either Apple's Java 1.6 or Oracle JDK 1.7 will work (you need a +developer account to get the development kit for Apple JDK 1.6). On Linux, +OpenJDK 1.6 or 1.7 should work well. + +To build MMCorePy, you will need Python and Numpy. Recent versions of either +Python 2 or Python 3 should work. + +Many Linux distributions split library packages into runtimes and development +files. If you are using such a distribution, make sure to get the packages +with the -dev suffix. + +Some device adapters require additional external libraries. (TODO Document +these.) + + +### Obtaining the source code + +Please see the Micro-Manager website for instructions. You will need the main +Micro-Manager source code and the 3rdpartypublic repository, side by side in +the same parent directory. + + +### Configuring + +To build from an SVN working copy, you will first need to generate the +`configure` script. This can be done with the command + + ./autogen.sh + +Now, you will run `./configure`. There are many ways to configure +Micro-Manager, but you will most likely want to choose one of two major +installation styles: a traditional Unix-style installation and installation as +an ImageJ plugin. + +The traditional Unix-styel will put Micro-Manager libraries (includeing device +adapters) into `$prefix/lib/micro-manager` and other files (including JARs) +into `$prefix/share/micro-manager` (`$prefix` is `/usr/local` by default). If +you build the Java application, a script will be installed at +`$prefix/bin/micromanager` which can be used to start Micro-Manager, and +Micro-Manager will run without the ImageJ toolbar. + +If you want to install Micro-Manager as an ImageJ plugin, you will have to +tell `configure` where to find the target ImageJ application directory. In +this case, all Micro-Manager files will be installed inside that ImageJ +directory. + +To configure Micro-Manager for a traditionaly Unix-style install, type + + ./configure --prefix=/where/to/install + +To configure for installation as an ImageJ plugin, type + + ./configure --enable-imagej-plugin=/path/to/ImageJ + +The ImageJ path should be an existing (prefereably fresh) copy of ImageJ 1.48. + +IMPORTANT: When using --enable-imagej-plugin, you will need to run `make +install-ijplugin` instead of the usual `make install`. See below. + +To get more information about the possible options to `configure`, type + + ./configure --help + +You can get help on the flags controlling device-adapter-specific dependency +libraries by typing + + ./configure --help=recursive + + +### Building and installing + +Assuming `configure` succeeded, you can now run + + make + +to build. + +To install (in the traditional Unix style), type + + make install + +However, if you have used `configure --enable-imagej-plugin`, you will need to +instead run + + make install-ijplugin + +(This is because this style of installation is not supported by the GNU build +system out of the box. The `install-ijplugin` target is a convenience that +runs `install` with some special default settings -- something that would +normally have to be done with a separate shell script.) + +When the installation is finished, a message will be printed telling you how +to run Micro-Manager Studio (if it was configured to be built). + + +### Common configuration issues + +#### Failure to detect Java + +If `./configure` does not find your JDK (Java Development Kit), try the +following. + +1. If the environment variable `$JAVA_HOME` is set, try unsetting it before + running `configure`. It might be pointing to a Java installation that + doesn't contain all the required files (e.g. it may be pointing to a JRE + (Java Runtime Environment) rather than a JDK). Not setting `JAVA_HOME` may + allow `configure` to autodetect a suitable Java home. + +2. Find the desirable Java home on your system. This is a directory that + usually has "jdk" and the Java version number (such as 1.6) in its name and + contains the directories `bin` (in which `java`, `javac`, and `jar` are + found) and `include` (in which `jni.h` is found). Pass + `--with-java=JAVA_HOME` to `configure`. For example: + + ./configure --with-java=/usr/lib64/jvm/java-1.7.0-openjdk-1.7.0 + # or + ./configure --with-java=/Library/Java/JavaVirtualMachines/1.6.0_65-b14-462.jdk/Contents/Home + +3. If the previous step is not possible, because the Java files are spread + across several directories (this is the case with older versions of Apple + JDK), then you can leave `JAVA_HOME` (and `--with-java`) unset, but override + the include path for JNI headers, like this: + + ./configure JNI_CPPFLAGS="-I/System/Library/Frameworks/JavaVM.framework/Versions/A/Headers" + +4. Finally (and this is an uncommon case), if you needed to override + `JNI_CPPFLAGS` but `configure` also cannot find `javac` and other tools, you + can manually set the absolute path to the necessary tools: + + ./configure JAVA=/path/to/java JAVAC=/path/to/javac JAR=/path/to/jar + + +#### Specifying where to find external packages + +As a general rule, the `--with-foo` flags to `configure` (e.g. +`--with-python=PREFIX`) will try to autodetect the package, whereas the +capitalized variables listed at the end of `./configure --help` (e.g. `PYTHON`) +will override any automatic detection and be used unmodified. diff --git a/m4/ax_opencv.m4 b/m4/ax_opencv.m4 deleted file mode 100644 index 906aa9db44..0000000000 --- a/m4/ax_opencv.m4 +++ /dev/null @@ -1,68 +0,0 @@ -####################################################### -# -# check for OpenCV library -# -# OPENCV_LDFLAGS="$OPENCV_LDFLAGS -lopencv_video -lopencv_core -lopencv_highgui" -####################################################### -AC_DEFUN([AX_OPENCV], -[ -AC_ARG_WITH([opencv], - AS_HELP_STRING([--with-opencv=DIR], - [specify the root directory for the OpenCV library]), - [ - if test "$withval" = "no"; then - want_opencv="no" - elif test "$withval" = "yes"; then - want_opencv="yes" - ac_opencv_path="" - else - want_opencv="yes" - ac_opencv_path="$withval" - fi - ], - [want_opencv="yes"] -) - -succeeded=no -if test "x$want_opencv" = "xyes"; then - # AC_CHECK_LIB([cv], [cvSub]) - # AC_CHECK_LIB([highgui], [main]) - PKG_CHECK_MODULES([OPENCV], [opencv], [hasopencv=true], [hasopencv=false]) - if test x$hasopencv = xtrue; then - OPENCV_CPPFLAGS="$OPENCV_CFLAGS" - OPENCV_LDFLAGS="$OPENCV_LIBS" - AC_SUBST(OPENCV_CPPFLAGS) - AC_SUBST(OPENCV_LDFLAGS) - else - AC_MSG_CHECKING(for OpenCV) - AC_REQUIRE([AC_PROG_CC]) - if test "$ac_opencv_path" != ""; then - if test -d "$ac_opencv_path/include/opencv" && test -r "$ac_opencv_path/include/opencv"; then - OPENCV_LDFLAGS="-L$ac_opencv_path/lib" - OPENCV_CPPFLAGS="-I$ac_opencv_path/include" - succeeded=yes - fi - else - for ac_opencv_path_tmp in /usr /usr/local /opt ; do - if test -d "$ac_opencv_path_tmp/include/opencv" && test -r "$ac_opencv_path_tmp/include/opencv"; then - OPENCV_LDFLAGS="-L$ac_opencv_path_tmp/lib" - OPENCV_CPPFLAGS="-I$ac_opencv_path_tmp/include" - succeeded=yes - break; - fi - done - fi - if test "$succeeded" = "yes"; then - hasopencv=true - AC_MSG_RESULT(yes) - OPENCV_LDFLAGS="$OPENCV_LDFLAGS -lopencv_core -lopencv_highgui" - AC_SUBST(OPENCV_CPPFLAGS) - AC_SUBST(OPENCV_LDFLAGS) - AC_DEFINE(HAVE_OPENCV,[true],[define if the OpenCV library is available]) - else - AC_MSG_RESULT(no) - fi - fi -fi - -]) diff --git a/m4/mm_java.m4 b/m4/mm_java.m4 new file mode 100644 index 0000000000..daeedce27c --- /dev/null +++ b/m4/mm_java.m4 @@ -0,0 +1,141 @@ + +# MM_ARG_WITH_JAVA (no args) +# Sets want_java to yes or no; sets JAVA_PREFIX to empty or path. +# (JAVA_HOME is _not_ set because it is a precious variable.) +AC_DEFUN([MM_ARG_WITH_JAVA], [ + AC_MSG_CHECKING([if Java support was requested]) + AC_ARG_WITH([java], [AS_HELP_STRING([--with-java=[[yes|no|JAVA_HOME]]], + [use Java at JAVA_HOME (default: auto)])], + [], + [with_java=auto]) + + case $with_java in + yes | no | auto) want_java="$with_java" ;; + *) JAVA_PREFIX="$want_java" + want_java=yes ;; + esac + AS_IF([test -n "$JAVA_PREFIX"], + [AC_MSG_RESULT([yes ($JAVA_PREFIX)])], + [AC_MSG_RESULT([$want_java])]) +]) + + +# MM_PROGS_JAVA([action-if-all-found], [action-if-any-not-found]) +# Find java, javac, and jar and set JAVA, JAVAC, and JAR. Do not override if +# set by user. If JAVA_HOME is not empty, search $JAVA_HOME/bin. Otherwise +# search PATH. +AC_DEFUN([MM_PROGS_JAVA], +[ + AC_ARG_VAR([JAVA], [Java virtual machine]) + AC_ARG_VAR([JAVAC], [Java compiler]) + AC_ARG_VAR([JAR], [Java archive tool]) + + mm_progs_java_path="$PATH" + test -n "$JAVA_HOME" && mm_progs_java_path="$JAVA_HOME/bin" + + AC_MSG_CHECKING([for user-specified Java virtual machine]) + AS_IF([test -n "$JAVA"], + [ + AC_MSG_RESULT([yes ($JAVA)]) + ], + [ + AC_MSG_RESULT([no; will search for one]) + AC_PATH_PROGS([JAVA], [java kaffe], [], [$mm_progs_java_path]) + ]) + + AC_MSG_CHECKING([for user-specified Java compiler]) + AS_IF([test -n "$JAVAC"], + [ + AC_MSG_RESULT([yes ($JAVAC)]) + ], + [ + AC_MSG_RESULT([no; will search for one]) + AC_PATH_PROGS([JAVAC], [javac jikes guavac], [], [$mm_progs_java_path]) + ]) + + AC_MSG_CHECKING([for user-specified Java archive tool]) + AS_IF([test -n "$JAR"], + [ + AC_MSG_RESULT([yes ($JAR)]) + ], + [ + AC_MSG_RESULT([no; will search for one]) + AC_PATH_PROG([JAR], [jar], [], [$mm_progs_java_path]) + ]) + + mm_progs_java_all_found=yes + if test -z "$JAVA"; then mm_progs_java_all_found=no; fi + if test -z "$JAVAC"; then mm_progs_java_all_found=no; fi + if test -z "$JAR"; then mm_progs_java_all_found=no; fi + AS_IF([test "x$mm_progs_java_all_found" = xyes], [$1], [$2]) +]) + + +# MM_HEADERS_JNI([action-if-found], [action-if-not-found]) +# Set precious variable JNI_CPPFLAGS +AC_DEFUN([MM_HEADERS_JNI], +[ + AC_ARG_VAR([JNI_CPPFLAGS], [preprocessor flags for Java Native Interface]) + AC_MSG_CHECKING([for user-provided configuration for JNI]) + AS_IF([test -n "$JNI_CPPFLAGS"], + [ + AC_MSG_RESULT([yes; well skip checks]) + ], + [ + AC_MSG_RESULT([no; will perform availability check]) + + AX_JNI_INCLUDE_DIR + + AS_IF([test -n "$JNI_INCLUDE_DIRS"], + [ + for dir in $JNI_INCLUDE_DIRS + do + JNI_CPPFLAGS="$JNI_CPPFLAGS -I$dir" + done + + # Push state + AC_LANG_PUSH([C]) + mm_jni_old_cppflags="$CPPFLAGS" + CPPFLAGS="$JNI_CPPFLAGS $mm_jni_old_cppflags" + + AC_CHECK_HEADER([jni.h], [], [JNI_CPPFLAGS=], [#include ]) + + # Pop state + CPPFLAGS="$mm_jni_old_cppflags" + AC_LANG_POP([C]) + ], + [ + JNI_CPPFLAGS= + ]) + ]) + AS_IF([test -n "$JNI_CPPFLAGS"], [$1], [$2]) +]) + + +# MM_JNI_LIBRARY_PREFIX_SUFFIX +# Get the prefix and suffix for JNI native library filename. Set JNI_PREFIX and +# JNI_SUFFIX. +AC_DEFUN([MM_JNI_LIBRARY_PREFIX_SUFFIX], +[ + AC_MSG_CHECKING([JNI library filename format]) + # Get the prefix and suffix for JNI native library filename. + # In theory we can get this "correctly" by compiling and running a Java program + # (using System.mapLibraryName("ZZZ")), but it is not worth the trouble, and + # there are complications (such as Oracle Java 7 for OS X returning a .dylib + # suffix instead of .jnilib). Since by default we load native libraries by + # exact filename anyway, it is safe for us to dictate the naming scheme. + case $host in + *-*-darwin*) + JNI_PREFIX=lib + JNI_SUFFIX=.jnilib ;; + *-*-cygwin* | *-*-mingw*) + JNI_PREFIX= + JNI_SUFFIX=.dll ;; + *) + JNI_PREFIX=lib + JNI_SUFFIX=.so ;; + esac + AC_MSG_RESULT([${JNI_PREFIX}XYZ${JNI_SUFFIX}]) + AC_SUBST([JNI_PREFIX]) + AC_SUBST([JNI_SUFFIX]) +]) diff --git a/m4/mm_lib_flags.m4 b/m4/mm_lib_flags.m4 new file mode 100644 index 0000000000..d85cb994e7 --- /dev/null +++ b/m4/mm_lib_flags.m4 @@ -0,0 +1,87 @@ + +# Macros for setting library-specific flag variables + + +# MM_LIB_ARG_VARS(var-prefix, name) +AC_DEFUN([MM_LIB_ARG_VARS], [ + AC_ARG_VAR([$1_CPPFLAGS], [preprocessor flags for $2]) + AC_ARG_VAR([$1_CFLAGS], [compiler flags for $2]) + AC_ARG_VAR([$1_LDFLAGS], [linker flags for $2]) + AC_ARG_VAR([$1_LIBS], [library flags for $2]) +]) + + +# MM_LIB_ARG_VARS_CXX(var-prefix, name) +AC_DEFUN([MM_LIB_ARG_VARS_CXX], [ + AC_ARG_VAR([$1_CPPFLAGS], [preprocessor flags for $2]) + AC_ARG_VAR([$1_CXXFLAGS], [compiler flags for $2]) + AC_ARG_VAR([$1_LDFLAGS], [linker flags for $2]) + AC_ARG_VAR([$1_LIBS], [library flags for $2]) +]) + + +# MM_LIB_CLEAR_FLAGS(var-prefix) +# (For both C and C++) +AC_DEFUN([MM_LIB_CLEAR_FLAGS], [ + $1_CPPFLAGS= + $1_CFLAGS= + $1_CXXFLAGS= + $1_LDFLAGS= + $1_LIBS= +]) + + +# _MM_LIB_FLAGS_IFELSE(var-prefix, [action-if-set], [action-if-not-set]) +AC_DEFUN([_MM_LIB_FLAGS_IFELSE], [ + mm_lib_flags_ifelse_have_$1= + test -n "$$1_CPPFLAGS" && mm_lib_flags_ifelse_have_$1=yes + test -n "$$1_CFLAGS" && mm_lib_flags_ifelse_have_$1=yes + test -n "$$1_LDFLAGS" && mm_lib_flags_ifelse_have_$1=yes + test -n "$$1_LIBS" && mm_lib_flags_ifelse_have_$1=yes + AS_IF([test "x$mm_lib_flags_ifelse_have_$1" = xyes], [$2], [$3]) +]) + + +# _MM_LIB_FLAGS_IFELSE_CXX(var-prefix, [action-if-set], [action-if-not-set]) +AC_DEFUN([_MM_LIB_FLAGS_IFELSE_CXX], [ + mm_lib_flags_ifelse_have_$1= + test -n "$$1_CPPFLAGS" && mm_lib_flags_ifelse_have_$1=yes + test -n "$$1_CXXFLAGS" && mm_lib_flags_ifelse_have_$1=yes + test -n "$$1_LDFLAGS" && mm_lib_flags_ifelse_have_$1=yes + test -n "$$1_LIBS" && mm_lib_flags_ifelse_have_$1=yes + AS_IF([test "x$mm_lib_flags_ifelse_have_$1" = xyes], [$2], [$3]) +]) + + +# MM_LIB_CHECK_ARG_VARS(var-prefix, name, [action-if-user-provided], +# action-if-check-required) +AC_DEFUN([MM_LIB_CHECK_ARG_VARS], [ + MM_LIB_ARG_VARS([$1], [$2]) + AC_MSG_CHECKING([for user-provided configuration for $2]) + _MM_LIB_FLAGS_IFELSE([$1], + [ + AC_MSG_RESULT([yes; will skip checks]) + $3 + ], + [ + AC_MSG_RESULT([no; will perform availability check]) + $4 + ]) +]) + + +# MM_LIB_CHECK_ARG_VARS_CXX(var-prefix, name, [action-if-user-provided], +# action-if-check-required) +AC_DEFUN([MM_LIB_CHECK_ARG_VARS_CXX], [ + MM_LIB_ARG_VARS_CXX([$1], [$2]) + AC_MSG_CHECKING([for user-provided configuration for $2]) + _MM_LIB_FLAGS_IFELSE_CXX([$1], + [ + AC_MSG_RESULT([yes; will skip checks]) + $3 + ], + [ + AC_MSG_RESULT([no; will perform availability check]) + $4 + ]) +]) diff --git a/m4/mm_lib_ifelse.m4 b/m4/mm_lib_ifelse.m4 new file mode 100644 index 0000000000..171f2db003 --- /dev/null +++ b/m4/mm_lib_ifelse.m4 @@ -0,0 +1,145 @@ + +# Author: Mark Tsuchida +# Copyright: University of California, San Francisco, 2014 +# License: BSD + +# MM_LIB_IFELSE(VAR-PREFIX, NAME, [MSG-SUFFIX], [HEADER], [FUNCTION], [ACTION-IF], +# [ACTION-IF-NOT]) + +# VAR-PREFIX - flag var prefix, e.g. LIBFOO +# NAME - display name, e.g. libfoo +# MSG-SUFFIX - test location message, e.g. `with flags from pkg-config' +# HEADER - header to check for, e.g. foo/foo.h +# FUNCTION - library function to check for, e.g. foo_init + +# Used variables (not modified by MM_TEST_LIB) +# $1_CPPFLAGS (e.g. LIBFOO_CPPFLAGS) +# $1_CFLAGS (e.g. LIBFOO_CFLAGS) +# $1_LDFLAGS (e.g. LIBFOO_LDFLAGS) +# $1_LIBS (e.g. LIBFOO_LIBS) + +AC_DEFUN([MM_LIB_IFELSE], [ + mm_lib_ifelse_have_$1= + + # Push state + AC_LANG_ASSERT([C]) + mm_lib_ifelse_$1_old_cppflags="$CPPFLAGS" + mm_lib_ifelse_$1_old_cflags="$CFLAGS" + mm_lib_ifelse_$1_old_ldflags="$LDFLAGS" + mm_lib_ifelse_$1_old_libs="$LIBS" + CPPFLAGS="$$1_CPPFLAGS $mm_lib_ifelse_$1_old_cppflags" + CFLAGS="$$1_CFLAGS $mm_lib_ifelse_$1_old_cflags" + LDFLAGS="$$1_LDFLAGS $mm_lib_ifelse_$1_old_ldflags" + LIBS="$$1_LIBS $mm_lib_ifelse_$1_old_libs" + # End push state + + m4_ifval([$4], [ + AC_MSG_CHECKING([for $4 $3]) + dnl Note: We cannot use AC_CHECK_HEADER here, because we may be called + dnl multiple times with different CPPFLAGS, etc. The cache variable would + dnl clash. However, we should be checking for compilation, not + dnl preprocessing: use AC_COMPILE_IFELSE + AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[#include <][$4][>]])], + [ + AC_MSG_RESULT([yes]) + ], + [ + AC_MSG_RESULT([no]) + mm_lib_ifelse_have_$1=no + ]) + ]) + + AS_IF([test "x$mm_lib_ifelse_have_$1" != xno], + [ + m4_ifval([$5], [ + AC_MSG_CHECKING([for $5 in $2 $3]) + AC_LINK_IFELSE([AC_LANG_CALL([], [$5])], + [ + AC_MSG_RESULT([yes]) + mm_lib_ifelse_have_$1=yes + ], + [ + AC_MSG_RESULT([no]) + mm_lib_ifelse_have_$1=no + ]) + ], + [ + mm_lib_ifelse_have_$1=no + ]) + ]) + + # Pop state + CPPFLAGS="$mm_lib_ifelse_$1_old_cppflags" + CFLAGS="$mm_lib_ifelse_$1_old_cflags" + LDFLAGS="$mm_lib_ifelse_$1_old_ldflags" + LIBS="$mm_lib_ifelse_$1_old_libs" + # End pop state + + AS_IF([test "x$mm_lib_ifelse_have_$1" = xyes], [$6], [$7]) +]) +]) + + +# MM_CXXLIB_IFELSE(VAR-PREFIX, NAME, [MSG-SUFFIX], [HEADER], [LINK-TEST-PROGRAM], [ACTION-IF], +# [ACTION-IF-NOT]) +# Use AC_LANG_PROGRAM to construct the LINK-TEST-PROGRAM argument. +AC_DEFUN([MM_CXXLIB_IFELSE], [ + mm_cxxlib_ifelse_have_$1= + + # Push state + AC_LANG_ASSERT([C++]) + mm_cxxlib_ifelse_$1_old_cppflags="$CPPFLAGS" + mm_cxxlib_ifelse_$1_old_cxxflags="$CXXFLAGS" + mm_cxxlib_ifelse_$1_old_ldflags="$LDFLAGS" + mm_cxxlib_ifelse_$1_old_libs="$LIBS" + CPPFLAGS="$$1_CPPFLAGS $mm_cxxlib_ifelse_$1_old_cppflags" + CXXFLAGS="$$1_CXXFLAGS $mm_cxxlib_ifelse_$1_old_cxxflags" + LDFLAGS="$$1_LDFLAGS $mm_cxxlib_ifelse_$1_old_ldflags" + LIBS="$$1_LIBS $mm_cxxlib_ifelse_$1_old_libs" + # End push state + + m4_ifval([$4], [ + AC_MSG_CHECKING([for $4 $3]) + dnl Note: We cannot use AC_CHECK_HEADER here, because we may be called + dnl multiple times with different CPPFLAGS, etc. The cache variable would + dnl clash. However, we should be checking for compilation, not + dnl preprocessing: use AC_COMPILE_IFELSE + AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[#include <][$4][>]])], + [ + AC_MSG_RESULT([yes]) + ], + [ + AC_MSG_RESULT([no]) + mm_cxxlib_ifelse_have_$1=no + ]) + ]) + + AS_IF([test "x$mm_cxxlib_ifelse_have_$1" != xno], + [ + m4_ifval([$5], [ + AC_MSG_CHECKING([if test program can be linked to $2 $3]) + AC_LINK_IFELSE([$5], + [ + AC_MSG_RESULT([yes]) + mm_cxxlib_ifelse_have_$1=yes + ], + [ + AC_MSG_RESULT([no]) + mm_cxxlib_ifelse_have_$1=no + ]) + ], + [ + mm_cxxlib_ifelse_have_$1=no + ]) + ]) + + # Pop state + CPPFLAGS="$mm_cxxlib_ifelse_$1_old_cppflags" + CXXFLAGS="$mm_cxxlib_ifelse_$1_old_cxxflags" + LDFLAGS="$mm_cxxlib_ifelse_$1_old_ldflags" + LIBS="$mm_cxxlib_ifelse_$1_old_libs" + # End pop state + + AS_IF([test "x$mm_cxxlib_ifelse_have_$1" = xyes], [$6], [$7]) +]) +]) diff --git a/m4/mm_lib_set_flags_pkgconfig.m4 b/m4/mm_lib_set_flags_pkgconfig.m4 new file mode 100644 index 0000000000..373c5bf70b --- /dev/null +++ b/m4/mm_lib_set_flags_pkgconfig.m4 @@ -0,0 +1,125 @@ + +# Author: Mark Tsuchida +# Copyright: University of California, San Francisco, 2014 +# License: BSD + +# MM_LIB_SET_FLAGS_PKGCONFIG(var-prefix, pkg-config-name, [hook], +# [action-if-success], [action-if-failure]) +# +# The hook is the name of a macro with the following signature, used to repair +# the flags returned by pkg-config. It should not print a message (except to +# the log file). +# my_hook(cflags-var-name, libs-var-name, ok-var-name) +# The three parameters are names of shell variables. The hook macro should emit +# shell code that repairs the cflags and libs, and return yes or no in the +# variable named by the third parameter. +# +# This macro avoids calling PKG_CHECK_MODULES, because we don't want the +# precious variables (FOO_CFLAGS and FOO_LIBS) added by that macro. Instead, we +# want to stick to our own stand ard scheme (FOO_CPPFLAGS, FOO_CFLAGS, +# FOO_LDFLAGS, and FOO_LIBS). +# +AC_DEFUN([MM_LIB_SET_FLAGS_PKGCONFIG], [ + PKG_PROG_PKG_CONFIG([0.20]) + mm_pkgconfig_$1_ok= + AS_IF([test -n "$PKG_CONFIG"], + [ + AC_MSG_CHECKING([for pkg-config metadata for $2]) + PKG_CHECK_EXISTS([$2], + [ + AC_MSG_RESULT([yes]) + + AC_MSG_CHECKING([for $2 cflags from pkg-config]) + mm_pkgconfig_$1_cflags=`$PKG_CONFIG --cflags "$2" 2>&AS_MESSAGE_LOG_FD` + AS_IF([test "x$?" = x0], + [ + AC_MSG_RESULT([$mm_pkgconfig_$1_cflags]) + ], + [ + AC_MSG_RESULT([error]) + mm_pkgconfig_$1_ok=no + ]) + + AS_IF([test "x$mm_pkgconfig_$1_ok" != xno], + [ + AC_MSG_CHECKING([for $2 libs from pkg-config]) + mm_pkgconfig_$1_libs=`$PKG_CONFIG --libs "$2" 2>&AS_MESSAGE_LOG_FD` + AS_IF([test "x$?" = x0], + [ + AC_MSG_RESULT([$mm_pkgconfig_$1_libs]) + ], + [ + AC_MSG_RESULT([error]) + mm_pkgconfig_$1_ok=no + ]) + ]) + + AS_IF([test "x$mm_pkgconfig_$1_ok" != xno], + [ + m4_ifval([$3], + [ + # Apply cflags/libs repair hook + AC_MSG_CHECKING([for repaired flags for $2]) + $3([mm_pkgconfig_$1_cflags], [mm_pkgconfig_$1_libs], [mm_pkgconfig_$1_ok]) + AC_MSG_RESULT([$mm_pkgconfig_$1_ok]) + ], + [ + mm_pkgconfig_$1_ok=yes + ]) + + _MM_PKGCONFIG_SPLIT_CFLAGS([$1], [$mm_pkgconfig_$1_cflags]) + _MM_PKGCONFIG_SPLIT_LIBS([$1], [$mm_pkgconfig_$1_libs]) + ]) + ], + [ + AC_MSG_RESULT([no]) + mm_pkgconfig_$1_ok=no + ]) + ], + [ + mm_pkgconfig_$1_ok=no + ]) + AS_IF([test "x$mm_pkgconfig_$1_ok" = xyes], [$4], [$5]) +]) + + +# +# Sub-macros +# + +AC_DEFUN([_MM_PKGCONFIG_SPLIT_CFLAGS], [ + $1_CPPFLAGS= + $1_CFLAGS= + for flag in $2 + do + noIprefix=`echo $flag | sed 's%^-I%%'` + if test "x$noIprefix" = "x$flag"; then # no -I prefix + $1_CFLAGS="$$1_CFLAGS $flag" + else + $1_CPPFLAGS="$$1_CPPFLAGS $flag" + fi + done +]) + + +AC_DEFUN([_MM_PKGCONFIG_SPLIT_LIBS], [ + # Note: -framework X goes into LDFLAGS, not LIBS; this is intentional + $1_LDFLAGS= + $1_LIBS= + for flag in $2 + do + nolprefix=`echo $flag | sed 's%^-l%%'` + if test "x$nolprefix" = "x$flag"; then # no -l prefix + nosuffix=`echo $flag | sed 's%\.dylib$%% + s%\.a$%% + s%\.la$%%'` + if test "x$nosuffix" = "x$flag"; then # no suffix + $1_LDFLAGS="$$1_LDFLAGS $flag" + else # has suffix + $1_LIBS="$$1_LIBS $flag" + fi + else # has -l prefix + $1_LIBS="$$1_LIBS $flag" + fi + done +]) diff --git a/m4/mm_lib_simple.m4 b/m4/mm_lib_simple.m4 new file mode 100644 index 0000000000..5790e06f92 --- /dev/null +++ b/m4/mm_lib_simple.m4 @@ -0,0 +1,118 @@ + +# Author: Mark Tsuchida +# Copyright: University of California, San Francisco, 2014 +# License: BSD + +# TODO Support for C++ libraries, with CXXFLAGS, CXXCPPFLAGS (but most of the +# libraries we use are C libraries) + +# MM_LIB_SIMPLE(var-prefix, name, [path-prefix], [libs], [header], [function], +# [action-if-found], [action-if-not-found]) +AC_DEFUN([MM_LIB_SIMPLE], [ + AC_LANG_ASSERT([C]) + mm_lib_simple_have_$1= + MM_LIB_CHECK_ARG_VARS([$1], [$2], + [ + mm_lib_simple_have_$1=yes + ], + [ + _MM_LIB_SIMPLE_DO_TEST([$1], [$2], [$3], [], [$4], [$5], [$6], + [ + mm_lib_simple_have_$1=yes + ], + [ + mm_lib_simple_have_$1=no + MM_LIB_CLEAR_FLAGS([$1]) + ]) + ]) + AS_IF([test "x$mm_lib_simple_have_$1" = xyes], [$7], [$8]) +]) + + +# MM_LIB_SIMPLE_CXX(var-prefix, name, [path-prefix], [libs], [header], [link-test-prog], +# [action-if-found], [action-if-not-found]) +AC_DEFUN([MM_LIB_SIMPLE_CXX], [ + AC_LANG_ASSERT([C++]) + mm_lib_simple_cxx_have_$1= + MM_LIB_CHECK_ARG_VARS_CXX([$1], [$2], + [ + mm_lib_simple_cxx_have_$1=yes + ], + [ + _MM_LIB_SIMPLE_CXX_DO_TEST([$1], [$2], [$3], [], [$4], [$5], [$6], + [ + mm_lib_simple_cxx_have_$1=yes + ], + [ + mm_lib_simple_cxx_have_$1=no + MM_LIB_CLEAR_FLAGS([$1]) + ]) + ]) + AS_IF([test "x$mm_lib_simple_cxx_have_$1" = xyes], [$7], [$8]) +]) + + +# MM_LIB_WITH_PKG_CONFIG(var-prefix, name, pkg-config-name, +# [pkg-config-flags-hook], [path-prefix], [libs], [header], [function], +# [action-if-found], [action-if-not-found]) +# +# If path-prefix is given, just try it. Otherwise, first try pkg-config. If +# that fails, try the given flags (the libs argument). +AC_DEFUN([MM_LIB_WITH_PKG_CONFIG], [ + AC_LANG_ASSERT([C]) + mm_lib_with_pkg_config_have_$1= + MM_LIB_CHECK_ARG_VARS([$1], [$2], + [ + mm_lib_with_pkg_config_have_$1=yes + ], + [ + mm_lib_with_pkg_config_skip_pkg_config=no + m4_ifval([$5], [test -n "$5" && mm_lib_with_pkg_config_skip_pkg_config=yes]) + AS_IF([test "x$mm_lib_with_pkg_config_skip_pkg_config" = xno], + [ + MM_LIB_SET_FLAGS_PKGCONFIG([$1], [$3], [$4], + [ + MM_LIB_IFELSE([$1], [$2], [with flags from pkg-config], + [$7], [$8], + [mm_lib_with_pkg_config_have_$1=yes], + [MM_LIB_CLEAR_FLAGS([$1])]) + ]) + ]) + AS_IF([test "x$mm_lib_with_pkg_config_have_$1" != xyes], + [ + _MM_LIB_SIMPLE_DO_TEST([$1], [$2], [$5], [with hard-coded flags], + [$6], [$7], [$8], + [mm_lib_with_pkg_config_have_$1=yes], + [mm_lib_with_pkg_config_have_$1=no + MM_LIB_CLEAR_FLAGS([$1])]) + ]) + ]) + AS_IF([test "x$mm_lib_with_pkg_config_have_$1" = xyes], + [$9], m4_argn([10], $@)) +]) + + +# _MM_LIB_SIMPLE_DO_TEST(var-prefix, name, [path-prefix], [message-suffix], +# [libs], [header], [function], [action-if], [action-else]) +AC_DEFUN([_MM_LIB_SIMPLE_DO_TEST], [ + m4_ifval([$3], AS_IF([test -n "$3"], + [ + $1_CPPFLAGS="-I$3/include" + $1_LDFLAGS="-L$3/lib" + ])) + $1_LIBS="$5" + MM_LIB_IFELSE([$1], [$2], [$4], [$6], [$7], [$8], [$9]) +]) + + +# _MM_LIB_SIMPLE_CXX_DO_TEST(var-prefix, name, [path-prefix], [message-suffix], +# [libs], [header], [link-test-prog], [action-if], [action-else]) +AC_DEFUN([_MM_LIB_SIMPLE_CXX_DO_TEST], [ + m4_ifval([$3], AS_IF([test -n "$3"], + [ + $1_CPPFLAGS="-I$3/include" + $1_LDFLAGS="-L$3/lib" + ])) + $1_LIBS="$5" + MM_CXXLIB_IFELSE([$1], [$2], [$4], [$6], [$7], [$8], [$9]) +]) diff --git a/m4/mm_libs.m4 b/m4/mm_libs.m4 new file mode 100644 index 0000000000..7da87cfc11 --- /dev/null +++ b/m4/mm_libs.m4 @@ -0,0 +1,96 @@ + +# Author: Mark Tsuchida +# Copyright: University of California, San Francisco, 2014 +# License: BSD + +# +# Macros to check for particular libraries, our style. +# + +# MM_LIB_DC1394([dc1394-prefix], [action-if-found], [action-if-not-found]) +# +# Checks for an appropriate version of libdc1394 2.x. +# +# Defines precious variables LIBDC1394_CPPFLAGS, LIBDC1394_CFLAGS, +# LIBDC1394_LDFLAGS, and LIBDC1394_LIBS. +# +AC_DEFUN([MM_LIB_DC1394], [ + MM_LIB_WITH_PKG_CONFIG([LIBDC1394], [libdc1394], [libdc1394-2], [], + [$1], [-ldc1394], [dc1394/dc1394.h], [dc1394_capture_is_frame_corrupt], + [$2], [$3]) +]) + + +AC_DEFUN([MM_LIB_FREEIMAGEPLUS], [ + AC_LANG_PUSH([C++]) + MM_LIB_SIMPLE_CXX([FREEIMAGEPLUS], [FreeImagePlus], + [$1], [-lfreeimageplus -lfreeimage], [FreeImagePlus.h], + dnl No particular reason for the choice of function to check for. + [AC_LANG_PROGRAM([[#include ]], + [[fipImage fimg;]])], + [$2], [$3]) + AC_LANG_POP([C++]) +]) + + +AC_DEFUN([MM_LIB_GPHOTO2], [ + MM_LIB_WITH_PKG_CONFIG([GPHOTO2], [libgphoto2], [libgphoto2 >= 2.5.1], [], + [$1], [-lgphoto2], [gphoto2/gphoto2.h], [gp_camera_capture], + [$2], [$3]) +]) + + +# Check for HIDAPI library +# +# MM_LIB_HIDAPI([HIDAPI prefix], [action-if-found], [action-if-not-found]) +# +# Defines precious variables HIDAPI_CPPFLAGS, HIDAPI_CFLAGS, HIDAPI_LDFLAGS, +# HIDAPI_LIS. +# +AC_DEFUN([MM_LIB_HIDAPI], [ + MM_LIB_WITH_PKG_CONFIG([HIDAPI], [HIDAPI], [hidapi], [], + [$1], [-lhidapi], [hidapi/hidapi.h], [hid_init], + [$2], [$3]) +]) + + +# Check for OpenCV video capture +# +# MM_LIB_OPENCV([OpenCV prefix], [action-if-found], [action-if-not-found]) +# +# Defines precious variables OPENCV_CPPFLAGS, OPENCV_CFLAGS, OPENCV_LDFLAGS, +# OPENCV_LIBS. +# +AC_DEFUN([MM_LIB_OPENCV], [ + MM_LIB_WITH_PKG_CONFIG([OPENCV], [OpenCV], [opencv], [], + [$1], [-lopencv_highgui -lopencv_imgproc -lopencv_core], + [opencv/highgui.h], [cvGetCaptureProperty], + [$2], [$3]) +]) + + +# MM_LIB_USB_0_1([libusb-prefix], [action-if-found], [action-if-not-found]) +# +# Checks for libusb 0.1 (or libusb-1.0-based libusb-compat) +# +# Defines variables LIBUSB_0_1_CPPFLAGS, LIBUSB_0_1_CFLAGS, LIBUSB_0_1_LDFLAGS, +# and LIBUSB_0_1_LIBS. +# +AC_DEFUN([MM_LIB_USB_0_1], [ + MM_LIB_WITH_PKG_CONFIG([LIBUSB_0_1], [libusb 0.1 or libusb-compat], [libusb], [], + [$1], [-lusb], [usb.h], [usb_init], + [$2], [$3]) +]) + + +# MM_LIB_Z([zlib-prefix], [action-if-found], [action-if-not-found]) +# +# Check for zlib +# +# Defines variables ZLIB_CPPFLAGS, ZLIB_CFLAGS, ZLIB_LDFLAGS, and ZLIB_LIBS. +# +AC_DEFUN([MM_LIB_Z], [ + MM_LIB_WITH_PKG_CONFIG([ZLIB], [zlib], [zlib], [], + [$1], [-lz], [zlib.h], [deflateEnd], + [$2], [$3]) +]) diff --git a/m4/mm_optional_lib.m4 b/m4/mm_optional_lib.m4 new file mode 100644 index 0000000000..74b66dec58 --- /dev/null +++ b/m4/mm_optional_lib.m4 @@ -0,0 +1,37 @@ + +# MM_ARG_WITH_OPTIONAL_LIB(name, with-suffix, var-prefix) +# +# e.g. MM_ARG_WITH_OPTIONAL_LIB([Foo], [foo], [FOO]) +# +# Sets with_foo to argument passed by user (or yes or no or auto) and want_foo +# to yes or no or auto, where foo is with-suffix with dashes replaced with +# underscores. When want_foo is yes and the user passed a directory argument, +# sets FOO_PREFIX to the argument. +# +AC_DEFUN([MM_ARG_WITH_OPTIONAL_LIB], [ + m4_pushdef([withvar], [with_[]m4_bpatsubst([$2], [[-+=;:,.]], [_])])dnl + m4_pushdef([wantvar], [want_[]m4_bpatsubst([$2], [[-+=;:,.]], [_])])dnl + AC_MSG_CHECKING([if $1 support was requested]) + AC_ARG_WITH([$2], [AS_HELP_STRING([--with-[]$2[]=[[yes|no|DIR]]], + [use $1 (default: auto)])], + [], + [withvar=auto]) + + $3_PREFIX= + case $withvar in + yes | no | auto) wantvar="$withvar" ;; + *) $3_PREFIX="$withvar" + wantvar=yes ;; + esac + AS_IF([test -n "$$3_PREFIX"], + [AC_MSG_RESULT([yes ($$3_PREFIX)])], + [AC_MSG_RESULT([$wantvar])]) + m4_popdef([withvar])dnl + m4_popdef([wantvar])dnl +]) + + +# MM_MSG_OPTIONAL_LIB_FAILURE(name, with-suffix) +AC_DEFUN([MM_MSG_OPTIONAL_LIB_FAILURE], [ + AC_MSG_FAILURE([--with-[]$2[] was given, but test for $1 failed]) +]) diff --git a/m4/mm_python.m4 b/m4/mm_python.m4 new file mode 100644 index 0000000000..9fbd4fa91e --- /dev/null +++ b/m4/mm_python.m4 @@ -0,0 +1,131 @@ + +# MM_ARG_WITH_PYTHON (no args) +# Sets want_python to yes or no; PYTHON_PREFIX to empty or path. +AC_DEFUN([MM_ARG_WITH_PYTHON], [ + AC_MSG_CHECKING([if Python support was requested]) + AC_ARG_WITH([python], [AS_HELP_STRING([--with-python=[[yes|no|DIR]]], + [use Python in DIR (default: auto)])], + [], + [with_python=auto]) + + case $with_python in + yes | no | auto) want_python="$with_python" ;; + *) PYTHON_PREFIX="$with_python" + want_python=yes ;; + esac + AS_IF([test -n "$PYTHON_PREFIX"], + [AC_MSG_RESULT([yes ($PYTHON_PREFIX)])], + [AC_MSG_RESULT([$want_python])]) +]) + + +# MM_PROG_PYTHON([search-path]) +# If search-path not given, search current path. Use colons to separate +# directories in search-path. Set precious variable PYTHON. If PYTHON has +# already been set, do not perform search. +AC_DEFUN([MM_PROG_PYTHON], +[ + AC_ARG_VAR([PYTHON], [Python interpreter]) + AC_MSG_CHECKING([for user-specified Python interpreter]) + AS_IF([test -n "$PYTHON"], + [ + AC_MSG_RESULT([yes ($PYTHON)]) + ], + [ + AC_MSG_RESULT([no; will search for one]) + + AC_PATH_PROGS([PYTHON], [python python3 python2], [], [$1]) + AS_IF([test -n "$PYTHON"], + [ + AC_MSG_CHECKING([if $PYTHON works]) + mm_python_test_output="`$PYTHON -c 'import sys; sys.stdout.write("HelloWorld")' 2>&AS_MESSAGE_LOG_FD`" + AS_IF([test "x$mm_python_test_output" = "xHelloWorld"], + [ + AC_MSG_RESULT([yes]) + ], + [ + AC_MSG_RESULT([no]) + PYTHON= + ]) + ]) + ]) +]) + + +# MM_HEADERS_PYTHON([action-if-found], [action-if-not-found]) +# Set precious variable PYTHON_CPPFLAGS +AC_DEFUN([MM_HEADERS_PYTHON], [ + _MM_PYTHON_CPPFLAGS([PYTHON], [Python], + ['import distutils.sysconfig as dusc, sys; sys.stdout.write(dusc.get_python_inc(True))'], + [Python.h], + [$1], [$2]) +]) + + +# MM_HEADERS_NUMPY([action-if-found], [action-if-not-found]) +# Set precious variable NUMPY_CPPFLAGS +AC_DEFUN([MM_HEADERS_NUMPY], [ + # Push state + mm_python_numpy_python_old_cppflags="$CPPFLAGS" + CPPFLAGS="$PYTHON_CPPFLAGS $mm_python_numpy_python_old_cppflags" + # End push state + + _MM_PYTHON_CPPFLAGS([NUMPY], [NumPy], + ['import numpy.distutils, sys; sys.stdout.write(" ".join(numpy.distutils.misc_util.get_numpy_include_dirs()))'], + [numpy/arrayobject.h], + [$1], [$2]) + + # Pop state + CPPFLAGS="$mm_python_numpy_python_old_cppflags" + # End pop state +]) + + +# _MM_PYTHON_CPPFLAGS(var-prefix, name, py-script, header, [action-if-found], [action-if-not-found]) +AC_DEFUN([_MM_PYTHON_CPPFLAGS], [ + AC_ARG_VAR([$1_CPPFLAGS], [preprocessor flags for $2]) + AC_MSG_CHECKING([for user-provided configuration for $2]) + AS_IF([test -n "$$1_CPPFLAGS"], + [ + AC_MSG_RESULT([yes; will skip checks]) + ], + [ + AC_MSG_RESULT([no; will perform availability check]) + + AC_MSG_CHECKING([for $2 include path]) + mm_python_$1_incdirs="`$PYTHON -c $3 2>&AS_MESSAGE_LOG_FD`" + if test "x$?" != x0; then + mm_python_$1_incdirs= + fi + AS_IF([test -n "$mm_python_$1_incdirs"], + [ + AC_MSG_RESULT([$mm_python_$1_incdirs]) + $1_CPPFLAGS= + for mm_python_directory in $mm_python_$1_incdirs + do + $1_CPPFLAGS="$$1_CPPFLAGS -I$mm_python_directory" + done + + dnl TODO Factor out state-pushing header check as MM_CHECK_HEADER + dnl (with the ability to specify prerequisite code). + + # Push state + AC_LANG_PUSH([C]) + mm_python_$1_old_cppflags="$CPPFLAGS" + CPPFLAGS="$$1_CPPFLAGS $mm_python_$1_old_cppflags" + # End push state + + dnl Warning: Using AC_CHECK_HEADER would be incorrect if we were to be + dnl checking for the same header under different conditions. + AC_CHECK_HEADER([$4], [], [$1_CPPFLAGS=], [#include ]) + + # Pop state + CPPFLAGS="$mm_python_$1_old_cppflags" + AC_LANG_POP([C]) + ], + [ + AC_MSG_RESULT([no]) + ]) + ]) + AS_IF([test -n "$$1_CPPFLAGS"], [$5], [$6]) +]) diff --git a/m4/mm_required_lib.m4 b/m4/mm_required_lib.m4 new file mode 100644 index 0000000000..6b2c418a4c --- /dev/null +++ b/m4/mm_required_lib.m4 @@ -0,0 +1,32 @@ + +# MM_ARG_WITH_REQUIRED_LIB(name, with-suffix, var-prefix) +# +# e.g. MM_ARG_WITH_REQUIRED_LIB([Foo], [foo], [FOO]) +# +# Sets with_foo to argument passed by user (or yes, if not given). Fails if +# user attempts to set the --with flag to without/no. If user passes argument +# other than yes or auto, sets FOO_PREFIX to the argument. +# +AC_DEFUN([MM_ARG_WITH_REQUIRED_LIB], [ + m4_pushdef([withvar], [with_[]m4_bpatsubst([$2], [[-+=;:,.]], [_])])dnl + AC_MSG_CHECKING([if $1 directory was given]) + AC_ARG_WITH([$2], [AS_HELP_STRING([--with-[]$2[]=[[yes|DIR]]], + [use $1 in DIR (default: yes)])], + [], + [withvar=yes]) + + $3_PREFIX= + case $withvar in + yes | auto) : ;; + no) AC_MSG_FAILURE([--without-[]$2 was given, but $1 is required]) ;; + *) $3_PREFIX="$withvar" ;; + esac + AS_IF([test -n "$$3_PREFIX"], [AC_MSG_RESULT([$$3_PREFIX])], [AC_MSG_RESULT([no])]) + m4_popdef([withvar])dnl +]) + + +# MM_MSG_REQUIRED_LIB_FAILURE(name, with-suffix) +AC_DEFUN([MM_MSG_REQUIRED_LIB_FAILURE], [ + AC_MSG_FAILURE([test for $1 failed ($1 is required)]) +]) diff --git a/mmUnixBuild.sh b/mmUnixBuild.sh index 0f2b302384..2cc04da1fc 100755 --- a/mmUnixBuild.sh +++ b/mmUnixBuild.sh @@ -1,31 +1,9 @@ -#!/bin/bash -# enable error handling -set -e +#!/bin/sh -# bootstrap autotools -mkdir SecretDeviceAdapters || echo "SecretDeviceAdapters present" -aclocal -I m4 -libtoolize --force -automake --foreign --add-missing -autoconf -I m4 -cd DeviceAdapters -aclocal -I ../m4 -libtoolize --force -automake --foreign --add-missing -autoconf -I ../m4 -cd .. -cd DeviceKit -aclocal -I ../m4 -libtoolize --force -automake --foreign --add-missing -autoconf -I ../m4 -cd .. -if test -r "SecretDeviceAdapters/configure.in" ; then - cd SecretDeviceAdapters - aclocal -I ../m4 - libtoolize --force - automake --foreign --add-missing - autoconf -I ../m4 - cd .. -fi +echo "Micro-Manager has a new set of autoconf/automake build scripts, and the" 1>&2 +echo "mmUnixBuild.sh script has been retired. It will be removed in the near" 1>&2 +echo "future. Please run ./autogen.sh instead." 1>&2 +echo "Note that the ./configure options have changed. See the build documentation" 1>&2 +echo "for details." 1>&2 +exit 1 diff --git a/mmstudio/Makefile.am b/mmstudio/Makefile.am index 7b3d1af0ca..e9dbdc1529 100644 --- a/mmstudio/Makefile.am +++ b/mmstudio/Makefile.am @@ -1,4 +1,6 @@ -# Process this file with automake to produce Makefile.in + + +# TODO Fix classpath (avoid magic). MMJ_.jar: \ $(srcdir)/src/MMStudioPlugin.java \ $(srcdir)/src/MANIFEST.MF \ @@ -130,39 +132,43 @@ MMJ_.jar: \ $(srcdir)/src/org/micromanager/utils/SliderPanel.java \ $(srcdir)/src/org/micromanager/utils/TextUtils.java \ $(srcdir)/src/org/micromanager/utils/WaitDialog.java \ - $(srcdir)/bin/plugins_mmstudio.config + $(srcdir)/bin/plugins_mmstudio.config test -d build || mkdir build rm -rf build/* cp $(srcdir)/bin/plugins_mmstudio.config build/plugins.config $(JAVAC) $(JAVACFLAGS) -sourcepath ../MMCoreJ_wrap:$(srcdir)/src:. -classpath $(IJJARPATH):$(BSHJARPATH):$(SWINGXJARPATH):$(COMMONSMATHJARPATH):$(SWINGLAYOUTJARPATH):$(CLASSEXT)/*:. $(srcdir)/src/*.java $(srcdir)/src/org/micromanager/acquisition/*.java $(srcdir)/src/org/micromanager/utils/*.java $(srcdir)/src/org/micromanager/api/*.java $(srcdir)/src/org/micromanager/conf2/*.java -d build cp -rf $(srcdir)/src/org/micromanager/icons build/org/micromanager cp -rf $(srcdir)/src/org/micromanager/conf2/*html build/org/micromanager/conf2 - ## Work around bug in 'jar': jar cf MM_.jar -C bin/ bin/* does not work - cd build && jar cf ../MMJ_.jar * + cd build && jar cf ../MMJ_.jar * + +# TODO Remove together with plugins_reader.config (obsolete) MMReader_.jar: \ $(srcdir)/MMJ_.jar \ - $(srcdir)/bin/plugins_reader.config + $(srcdir)/bin/plugins_reader.config cp -f $(srcdir)/bin/plugins_reader.config build/plugins.config - cd build && jar cf ../MMReader_.jar * + cd build && jar cf ../MMReader_.jar * -all: MMJ_.jar MMReader_.jar -install: - test -d $(DESTDIR)$(IJPATH)/plugins/Micro-Manager || mkdir -p $(DESTDIR)$(IJPATH)/plugins/Micro-Manager - cp MMJ_.jar $(DESTDIR)$(IJPATH)/plugins/Micro-Manager - cp $(IJJARPATH) $(DESTDIR)$(IJPATH) - cp $(CLASSEXT)/*.jar $(DESTDIR)$(IJPATH)/plugins/ - rm $(DESTDIR)$(IJPATH)/plugins/ij.jar +jardir = $(pkgdatadir)/jars +jar_DATA = MMJ_.jar -clean: - test -e MMJ_.jar && rm MMJ_.jar || echo "MMJ_.jar not found" - test -e MMReader_.jar && rm MMReader_.jar || echo "MMReader_.jar not found" - find . -name \*.class -exec rm {} \; javadoc: - test -d $(srcdir)/doc || mkdir $(srcdir)/doc - rm -rf $(srcdir)/doc/* - javadoc -public -classpath $(IJJARPATH):$(BSHJARPATH):$(IJPATH)/plugins/Micro-Manager/MMCoreJ.jar:$(IJPATH)/plugins/Micro-Manager/MMJ_.jar:$(CLASSEXT)/scifio.jar:$(CLASSEXT)/commons-math-2.0.jar:. -d doc $(srcdir)/src/org/micromanager/*.java $(srcdir)/src/org/micromanager/*/*.java + -rm -rf doc + $(MKDIR_P) doc + javadoc -public \ + -classpath ../MMCoreJ_wrap/MMCoreJ.jar:MMJ_.jar:$(IJJARPATH):$(CLASSEXT)/"*" \ + -d doc \ + -sourcepath $(srcdir)/src \ + -subpackages org.micromanager.api + + +CLEANFILES = MMJ_.jar MMReader_.jar + +clean-local: + -find . -name \*.class -exec rm {} \; + -rm -rf doc + EXTRA_DIST = bin src build.xml license.txt diff --git a/plugins/Makefile.am b/plugins/Makefile.am index 23b9ceda64..310a5d9aae 100644 --- a/plugins/Makefile.am +++ b/plugins/Makefile.am @@ -1,23 +1,47 @@ + ## Process this file with automake to produce Makefile.in -TARGETS= ASIdiSPIM.jar PixelCalibrator.jar Projector.jar RecallPlugin.jar StageControl.jar MultiCamera.jar CRISP.jar Big.jar NewImageFlipper.jar SlideExplorer.jar DataBrowser.jar ClojureEditor.jar SplitView.jar Gaussian.jar IntelligentAcquisition.jar BFCorrector.jar MultiChannelShading.jar HCS.jar MMTracker.jar pgFocus.jar autolase.jar AcquireMultipleRegions.jar +TARGETS = \ + ASIdiSPIM.jar \ + AcquireMultipleRegions.jar \ + BFCorrector.jar \ + Big.jar \ + CRISP.jar \ + ClojureEditor.jar \ + DataBrowser.jar \ + Gaussian.jar \ + HCS.jar \ + IntelligentAcquisition.jar \ + MMTracker.jar \ + MultiCamera.jar \ + MultiChannelShading.jar \ + NewImageFlipper.jar \ + PixelCalibrator.jar \ + Projector.jar \ + RecallPlugin.jar \ + SlideExplorer.jar \ + SplitView.jar \ + StageControl.jar \ + autolase.jar \ + pgFocus.jar + ASIdiSPIM.jar: \ $(srcdir)/ASIdiSPIM/src/org/micromanager/asidispim/*.java \ $(srcdir)/ASIdiSPIM/src/org/micromanager/asidispim/Data/*.java \ - $(srcdir)/ASIdiSPIM/src/org/micromanager/asidispim/Utils/*.java + $(srcdir)/ASIdiSPIM/src/org/micromanager/asidispim/Utils/*.java test -d build || mkdir build rm -rf build/* $(JAVAC) $(JAVACFLAGS) -sourcepath $(srcdir):. -classpath $(IJJARPATH):$(BSHJARPATH):$(COMMONSMATHJARPATH):$(SWINGLAYOUTJARPATH):$(JFREECHARTJARPATH):$(CLASSEXT)/miglayout-4.0-swing.jar:../mmstudio/MMJ_.jar:. $(srcdir)/ASIdiSPIM/src/org/micromanager/asidispim/*.java $(srcdir)/ASIdiSPIM/src/org/micromanager/asidispim/Utils/*.java $(srcdir)/ASIdiSPIM/src/org/micromanager/asidispim/Data/*.java -d build cp -r $(srcdir)/ASIdiSPIM/src/org/micromanager/asidispim/icons build/org/micromanager/asidispim/ - cd build && jar cf ../ASIdiSPIM.jar * + cd build && jar cf ../ASIdiSPIM.jar * IntelligentAcquisition.jar: \ $(srcdir)/IntelligentAcquisition/src/org/micromanager/intelligentacquisition/*.java test -d build || mkdir build rm -rf build/* $(JAVAC) $(JAVACFLAGS) -sourcepath $(srcdir):. -classpath $(IJJARPATH):$(BSHJARPATH):$(COMMONSMATHJARPATH):$(SWINGLAYOUTJARPATH):$(JFREECHARTJARPATH):../mmstudio/MMJ_.jar:. $(srcdir)/IntelligentAcquisition/src/org/micromanager/intelligentacquisition/*.java -d build - cd build && jar cf ../IntelligentAcquisition.jar * + cd build && jar cf ../IntelligentAcquisition.jar * MMTracker.jar: \ $(srcdir)/Tracker/src/com/imaging100x/tracker/TrackerControl.java @@ -25,18 +49,18 @@ MMTracker.jar: \ rm -rf build/* $(JAVAC) $(JAVACFLAGS) -sourcepath $(srcdir):. -classpath $(IJJARPATH):$(BSHJARPATH):$(JFREECHARTJARPATH):../mmstudio/MMJ_.jar:. $(srcdir)/Tracker/src/com/imaging100x/tracker/*.java -d build ## Work around bug in 'jar': jar cf MM_.jar -C bin/ bin/* does not work - cd build && jar cf ../MMTracker.jar * + cd build && jar cf ../MMTracker.jar * PixelCalibrator.jar: \ $(srcdir)/PixelCalibrator/src/org/micromanager/pixelcalibrator/CalibrationThread.java \ $(srcdir)/PixelCalibrator/src/org/micromanager/pixelcalibrator/PixelCalibratorDialog.java \ $(srcdir)/PixelCalibrator/src/org/micromanager/pixelcalibrator/PixelCalibratorPlugin.java \ - $(srcdir)/PixelCalibrator/src/org/micromanager/pixelcalibrator/PixelCalibratorDialog.form + $(srcdir)/PixelCalibrator/src/org/micromanager/pixelcalibrator/PixelCalibratorDialog.form test -d build || mkdir build rm -rf build/* $(JAVAC) $(JAVACFLAGS) -sourcepath $(srcdir):. -classpath $(IJJARPATH):$(BSHJARPATH):$(COMMONSMATHJARPATH):$(SWINGLAYOUTJARPATH):../mmstudio/MMJ_.jar:. $(srcdir)/PixelCalibrator/src/org/micromanager/pixelcalibrator/*.java -d build ## Work around bug in 'jar': jar cf MM_.jar -C bin/ bin/* does not work - cd build && jar cf ../PixelCalibrator.jar * + cd build && jar cf ../PixelCalibrator.jar * Projector.jar: \ $(srcdir)/Projector/src/org/micromanager/projector/Galvo.java \ @@ -50,7 +74,7 @@ Projector.jar: \ rm -rf build-Projector/* $(JAVAC) $(JAVACFLAGS) -sourcepath $(srcdir):. -classpath $(IJJARPATH):$(BSHJARPATH):$(COMMONSMATHJARPATH):$(SWINGLAYOUTJARPATH):../mmstudio/MMJ_.jar:. $(srcdir)/Projector/src/org/micromanager/projector/*.java -d build-Projector ## Work around bug in 'jar': jar cf MM_.jar -C bin/ bin/* does not work - cd build-Projector && jar cf ../Projector.jar * + cd build-Projector && jar cf ../Projector.jar * SlideExplorer.jar: \ $(srcdir)/SlideExplorer/src/org/micromanager/slideexplorer/*.java \ @@ -59,7 +83,7 @@ SlideExplorer.jar: \ rm -rf build/* $(JAVAC) $(JAVACFLAGS) -sourcepath $(srcdir):. -classpath $(srcdir)/PixelCalibrator.jar:$(IJJARPATH):$(BSHJARPATH):$(COMMONSMATHJARPATH):$(SWINGLAYOUTJARPATH):../mmstudio/MMJ_.jar:. $(srcdir)/SlideExplorer/src/org/micromanager/slideexplorer/*.java -d build ## Work around bug in 'jar': jar cf MM_.jar -C bin/ bin/* does not work - cd build && jar cf ../SlideExplorer.jar * + cd build && jar cf ../SlideExplorer.jar * RecallPlugin.jar: \ $(srcdir)/Recall/src/org/micromanager/recall/*.java @@ -67,7 +91,7 @@ RecallPlugin.jar: \ rm -rf build/* $(JAVAC) $(JAVACFLAGS) -sourcepath $(srcdir):. -classpath $(IJJARPATH):$(BSHJARPATH):$(COMMONSMATHJARPATH):$(SWINGLAYOUTJARPATH):../mmstudio/MMJ_.jar:. $(srcdir)/Recall/src/org/micromanager/recall/*.java -d build ## Work around bug in 'jar': jar cf MM_.jar -C bin/ bin/* does not work - cd build && jar cf ../RecallPlugin.jar * + cd build && jar cf ../RecallPlugin.jar * StageControl.jar: \ $(srcdir)/StageControl/src/org/micromanager/stagecontrol/*.java @@ -75,28 +99,28 @@ StageControl.jar: \ rm -rf build/* $(JAVAC) $(JAVACFLAGS) -sourcepath $(srcdir):. -classpath $(IJJARPATH):$(BSHJARPATH):$(COMMONSMATHJARPATH):$(SWINGLAYOUTJARPATH):../mmstudio/MMJ_.jar:. $(srcdir)/StageControl/src/org/micromanager/stagecontrol/*.java -d build cp -r $(srcdir)/StageControl/src/org/micromanager/stagecontrol/icons build/org/micromanager/stagecontrol/ - cd build && jar cf ../StageControl.jar * + cd build && jar cf ../StageControl.jar * MultiCamera.jar: \ $(srcdir)/MultiCamera/src/org/micromanager/multicamera/*.java test -d build || mkdir build rm -rf build/* $(JAVAC) $(JAVACFLAGS) -sourcepath $(srcdir):. -classpath $(IJJARPATH):$(BSHJARPATH):$(COMMONSMATHJARPATH):$(SWINGLAYOUTJARPATH):../mmstudio/MMJ_.jar:. $(srcdir)/MultiCamera/src/org/micromanager/multicamera/*.java -d build - cd build && jar cf ../MultiCamera.jar * + cd build && jar cf ../MultiCamera.jar * SplitView.jar: \ $(srcdir)/SplitView/src/org/micromanager/splitview/*.java test -d build || mkdir build rm -rf build/* $(JAVAC) $(JAVACFLAGS) -sourcepath $(srcdir):. -classpath $(srcdir)/SplitView.jar:$(IJJARPATH):$(BSHJARPATH):$(COMMONSMATHJARPATH):$(SWINGLAYOUTJARPATH):../mmstudio/MMJ_.jar:. $(srcdir)/SplitView/src/org/micromanager/splitview/*.java -d build - cd build && jar cf ../SplitView.jar * + cd build && jar cf ../SplitView.jar * NewImageFlipper.jar: \ $(srcdir)/NewImageFlipper/src/org/micromanager/newimageflipper/*.java test -d build || mkdir build rm -rf build/* $(JAVAC) $(JAVACFLAGS) -sourcepath $(srcdir):. -classpath $(IJJARPATH):$(BSHJARPATH):$(COMMONSMATHJARPATH):$(SWINGLAYOUTJARPATH):../mmstudio/MMJ_.jar:. $(srcdir)/NewImageFlipper/src/org/micromanager/newimageflipper/*.java -d build - cd build && jar cf ../NewImageFlipper.jar * + cd build && jar cf ../NewImageFlipper.jar * Big.jar: \ $(srcdir)/Big/src/edu/umassmed/big/*.java @@ -104,21 +128,21 @@ Big.jar: \ rm -rf build/* $(JAVAC) $(JAVACFLAGS) -sourcepath $(srcdir):. -classpath $(IJJARPATH):$(BSHJARPATH):$(COMMONSMATHJARPATH):$(SWINGLAYOUTJARPATH):../mmstudio/MMJ_.jar:. $(srcdir)/Big/src/edu/umassmed/big/*.java -d build ## Work around bug in 'jar': jar cf MM_.jar -C bin/ bin/* does not work - cd build && jar cf ../Big.jar * + cd build && jar cf ../Big.jar * CRISP.jar: \ $(srcdir)/CRISP/src/org/micromanager/CRISP/*.java test -d build || mkdir build rm -rf build/* $(JAVAC) $(JAVACFLAGS) -sourcepath $(srcdir):. -classpath $(IJJARPATH):$(BSHJARPATH):$(COMMONSMATHJARPATH):$(SWINGLAYOUTJARPATH):$(JFREECHARTJARPATH):../mmstudio/MMJ_.jar:. $(srcdir)/CRISP/src/org/micromanager/CRISP/*.java -d build - cd build && jar cf ../CRISP.jar * + cd build && jar cf ../CRISP.jar * BFCorrector.jar: \ $(srcdir)/BFCorrector/src/org/micromanager/bfcorrector/*.java test -d build || mkdir build rm -rf build/* $(JAVAC) $(JAVACFLAGS) -sourcepath $(srcdir):. -classpath $(IJJARPATH):$(BSHJARPATH):$(COMMONSMATHJARPATH):$(SWINGLAYOUTJARPATH):../mmstudio/MMJ_.jar:. $(srcdir)/BFCorrector/src/org/micromanager/bfcorrector/*.java -d build - cd build && jar cf ../BFCorrector.jar * + cd build && jar cf ../BFCorrector.jar * MultiChannelShading.jar: \ $(srcdir)/MultiChannelShading/src/org/micromanager/multichannelshading/*.java \ @@ -151,7 +175,7 @@ Gaussian.jar: \ rm -rf build/* $(JAVAC) $(JAVACFLAGS) -sourcepath $(srcdir):. -classpath $(IJJARPATH):$(BSHJARPATH):$(COMMONSMATHJARPATH):$(SWINGLAYOUTJARPATH):$(JFREECHARTJARPATH):../mmstudio/MMJ_.jar:$(CLASSEXT)/TSFProto.jar:$(CLASSEXT)/gproto.jar:$(CLASSEXT)/lwm.jar:. $(srcdir)/Gaussian/source/GaussianTrack_.java $(srcdir)/Gaussian/source/edu/valelab/GaussianFit/*.java $(srcdir)/Gaussian/source/edu/valelab/GaussianFit/utils/*.java $(srcdir)/Gaussian/source/ags/utils/*.java -d build cp $(srcdir)/Gaussian/source/edu/valelab/GaussianFit/*.txt build/edu/valelab/GaussianFit/ - cd build && jar cf ../Gaussian.jar * + cd build && jar cf ../Gaussian.jar * DataBrowser.jar: \ $(srcdir)/DataBrowser/src/org/micromanager/browser/*.clj @@ -166,9 +190,9 @@ ClojureEditor.jar: \ $(srcdir)/ClojureEditor/src/org/micromanager/clojureeditor/*.java test -d build || mkdir build rm -rf build/* - $(JAVAC) $(JAVACFLAGS) -source 1.5 -target 1.5 -sourcepath $(srcdir):. -classpath $(srcdir)/ClojureEditor.jar:$(CLASSEXT)/*:../mmstudio/MMJ_.jar:. $(srcdir)/ClojureEditor/src/org/micromanager/clojureeditor/*.java -d build + $(JAVAC) $(JAVACFLAGS) -sourcepath $(srcdir):. -classpath $(srcdir)/ClojureEditor.jar:$(CLASSEXT)/*:../mmstudio/MMJ_.jar:. $(srcdir)/ClojureEditor/src/org/micromanager/clojureeditor/*.java -d build ## Work around bug in 'jar': jar cf MM_.jar -C bin/ bin/* does not work - cd build && jar cf ../ClojureEditor.jar * + cd build && jar cf ../ClojureEditor.jar * HCS.jar: \ @@ -180,21 +204,21 @@ HCS.jar: \ $(srcdir)/HCS/src/org/micromanager/hcs/SBSPlate.java \ $(srcdir)/HCS/src/org/micromanager/hcs/SiteGenerator.java \ $(srcdir)/HCS/src/org/micromanager/hcs/TestSBSPlate.java \ - $(srcdir)/HCS/src/org/micromanager/hcs/WellPositionList.java + $(srcdir)/HCS/src/org/micromanager/hcs/WellPositionList.java test -d build || mkdir build rm -rf build/* - $(JAVAC) $(JAVACFLAGS) -source 1.5 -target 1.5 -sourcepath $(srcdir):. -classpath ../mmstudio/MMJ_.jar:. $(srcdir)/HCS/src/org/micromanager/hcs/*.java -d build + $(JAVAC) $(JAVACFLAGS) -sourcepath $(srcdir):. -classpath ../mmstudio/MMJ_.jar:. $(srcdir)/HCS/src/org/micromanager/hcs/*.java -d build ## Work around bug in 'jar': jar cf MM_.jar -C bin/ bin/* does not work - cd build && jar cf ../HCS.jar * + cd build && jar cf ../HCS.jar * pgFocus.jar: \ $(srcdir)/pgFocus/src/edu/umassmed/pgFocus/pgFocus.java \ - $(srcdir)/pgFocus/src/edu/umassmed/pgFocus/pgFocusFrame.java + $(srcdir)/pgFocus/src/edu/umassmed/pgFocus/pgFocusFrame.java test -d build || mkdir build rm -rf build/* - $(JAVAC) $(JAVACFLAGS) -source 1.5 -target 1.5 -sourcepath $(srcdir):. -classpath ../mmstudio/MMJ_.jar:$(JFREECHARTJARPATH):. $(srcdir)/pgFocus/src/edu/umassmed/pgFocus/*.java -d build + $(JAVAC) $(JAVACFLAGS) -sourcepath $(srcdir):. -classpath ../mmstudio/MMJ_.jar:$(JFREECHARTJARPATH):. $(srcdir)/pgFocus/src/edu/umassmed/pgFocus/*.java -d build cp -r $(srcdir)/pgFocus/src/edu/umassmed/pgFocus/umass_logo.png build/edu/umassmed/pgfocus/ - cd build && jar cf ../pgFocus.jar * + cd build && jar cf ../pgFocus.jar * autolase.jar: \ $(srcdir)/autolase/src/ch/epfl/leb/autolase/AutoLase.java \ @@ -216,32 +240,30 @@ autolase.jar: \ $(srcdir)/autolase/src/ch/epfl/leb/autolase/TiffCamera.java test -d build || mkdir build rm -rf build/* - $(JAVAC) $(JAVACFLAGS) -source 1.5 -target 1.5 -sourcepath $(srcdir):. -classpath ../mmstudio/MMJ_.jar:$(IJJARPATH):. $(srcdir)/autolase/src/ch/epfl/leb/autolase/*.java -d build - cd build && jar cf ../autolase.jar * + $(JAVAC) $(JAVACFLAGS) -sourcepath $(srcdir):. -classpath ../mmstudio/MMJ_.jar:$(IJJARPATH):. $(srcdir)/autolase/src/ch/epfl/leb/autolase/*.java -d build + cd build && jar cf ../autolase.jar * AcquireMultipleRegions.jar: \ $(srcdir)/AcquireMultipleRegions/src/org/micromanager/acquiremultipleregions/AcquireMultipleRegions.java \ $(srcdir)/AcquireMultipleRegions/src/org/micromanager/acquiremultipleregions/AcquireMultipleRegionsForm.java \ $(srcdir)/AcquireMultipleRegions/src/org/micromanager/acquiremultipleregions/Region.java \ - $(srcdir)/AcquireMultipleRegions/src/org/micromanager/acquiremultipleregions/RegionList.java + $(srcdir)/AcquireMultipleRegions/src/org/micromanager/acquiremultipleregions/RegionList.java test -d build || mkdir build rm -rf build/* - $(JAVAC) $(JAVACFLAGS) -source 1.5 -target 1.5 -sourcepath $(srcdir):. -classpath ../mmstudio/MMJ_.jar:$(IJJARPATH):$(SWINGLAYOUTJARPATH):. $(srcdir)/AcquireMultipleRegions/src/org/micromanager/acquiremultipleregions/*.java -d build - cd build && jar cf ../AcquireMultipleRegions.jar * + $(JAVAC) $(JAVACFLAGS) -sourcepath $(srcdir):. -classpath ../mmstudio/MMJ_.jar:$(IJJARPATH):$(SWINGLAYOUTJARPATH):. $(srcdir)/AcquireMultipleRegions/src/org/micromanager/acquiremultipleregions/*.java -d build + cd build && jar cf ../AcquireMultipleRegions.jar * + + +plugindir = $(pkgdatadir)/mmplugins +plugin_DATA = $(TARGETS) + + +CLEANFILES = $(TARGETS) -all: ${TARGETS} +# TODO Builds are done all over the place (yuck), and there is no proper clean +# for the class files yet. +clean-local: + -rm -rf build -install: - test -d $(DESTDIR)$(IJPATH)/mmplugins || mkdir $(DESTDIR)$(IJPATH)/mmplugins - for thisjar in $(TARGETS); \ - do \ - cp $$thisjar $(DESTDIR)$(IJPATH)/mmplugins; \ - done - -clean: - for f in $(TARGETS); \ - do \ - test -f $$f && rm $$f || echo "$$f not found"; \ - done - EXTRA_DIST = src build.xml +EXTRA_DIST = src diff --git a/scripts/Makefile.am b/scripts/Makefile.am index 642705fb8f..0d4ef2e52b 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -1,5 +1,13 @@ -install: - rm -rf $(IJPATH)/scripts || echo "no problem" - mkdir -p $(DESTDIR)$(IJPATH)/scripts - cp *.bsh $(DESTDIR)$(IJPATH)/scripts +scriptdir = $(pkgdatadir)/scripts + +install-data-hook: + $(INSTALL) -d $(DESTDIR)$(scriptdir) + for script in $(srcdir)/*.bsh; do \ + $(INSTALL_DATA) -c $$script $(DESTDIR)$(scriptdir); \ + done + +uninstall-hook: + for script in $(srcdir)/*.bsh; do \ + rm -f $(DESTDIR)$(scriptdir)/`basename $$script`; \ + done