1. Edit Makefile.PL: include the correct directory that contains the
                     shared CDF library (e.g. libcdf.so, libcdf.sl 
                     libcdf.dylib, or dllcdf.lib, etc.) that was built
                     from the scratch or downloaded from the pre-built.

2. Run: "perl Makefile.PL" to create Makefile.

     NOTE: 
        1) Make sure the perl program is in your path.
        2) For Windows users, set up the proper environment variables to 
           use the compiler, linker, and make tools.  For example, run
           VCVARS32.bat for MS Visual Studio C++ 6.0 or 8.0.

3. Run: Gnu's "make" or MS Visual Studio's "nmake" to compile from Makefile
        produced in step 2.

   NOTE for MS Visual Studio's C++ users:
       You might get a compilation problem about the macro "_strncpy" being
       defined in both msvcrt.lib and libc.lib.  To work around this problem,
       you need to make a minor change to the Makefile.  Look for the 
       EXTRALIBS and LDLOADLIBS macros, move "vc98\lib\libc.lib" in
       the second position to the end (right after msvcrt.lib).  There are
       two occasions.
     

   NOTE for SGI users:
     If you use gcc on a SGI box running Irix6, you need to ensure that all 
     ABIs (Application Binary Interface) among your CDF library, perl module
     and the CDF-Perl XS (extension), CDF.o, are consistent. SGI's link editor 
     does not allow objects with different ABIs to combine. If your perl 
     module uses -n32 and you compile and link the CDF-Perl XS with -o32, you 
     will encounter difficulties while running the test programs in steps 6 and 
     7 due to a runtime link problem.  If you use cc compiler, make sure a 
     proper -o32, -n32 or -64 option is provided.  If you use gcc, it defaults 
     to -n32. In Makefile, you can change the compiler.
     At the link edit step, make sure you have -n32 to enable the proper option.
     Use file command to find how libcdf.so and perl (in /usr/local/bin?) are 
     compiled.

4. Run: make install to install the Perl-CDF into Perl system directory if
   the user has the authority to do so.

5. Set the appropriate environment varaible to point to the directory that
   contains the shared cdf library (e.g. libcdf.so, libcdf,sl libcdf.dylib,
   or dllcdf.lib, etc.).

   Examples: 
       setenv LD_LIBRARY_PATH /usr/local/cdf39_1-dist/lib (Unix/Linux)
       setenv DYLD_LIBRARY_PATH /Applications/cdf39_1-dist/lib (Mac OS X)
       set path=c:\CDF_Distribution\cdf39_1-dist\bin;%path% (Windows)

6. Edit testPerlCDFsi.pl and testPerlCDFii.pl to reflect the correct location
   of the CDF Perl APIs in the 'BEGIN' block if the Perl-CDF is not placed
   into the Perl system directory.

7. For Windows Terminal App users: run "toUTF8.ps1" so it can handle UTF-8 
   encoding characters. For Command terminal Windows, run "chcp 65001" to
   set the code page to UTF-8. But, it does not work properly for non-Latin
   characters. 

8. Run: "perl -w testPerlCDFsi.pl" and  "perl -w testPerlCDFii.pl" to see 
   if they run successfully.  

9. Run: "perl -w testTT2000.pl" a8d  "perl -w test2TT2000.pl" to see 
   if they run successfully.  

Please contact nasa-cdf-support@nasa.onmicrosoft.com for questions or comments.
