How to Create GIF Animation
Create gif animation with command line tool called [convert] On Mac OSX or Linux
If you don't have convert tool in your matchine, then you need to install it.
Copy the following code and save as firstanimation.pov
                #version 3.7;
                global_settings {  assumed_gamma 1.0 }
                //---------------------------------------
                camera{ ultra_wide_angle
                        angle 75
                        right x*image_width/image_height
                        location  <0.0 , 1.0 ,-3.0>
                        look_at   <0.0 , 0.0 , 0.0> }
                //---------------------------------------
                light_source{ <1500,2500,-2500>
                              color rgb<1,1,1> }
                //---------------------------------------
                sky_sphere{ pigment{color rgb<1,1,1>}}
                //---------------------------------------
                // the rotating sphere:
                sphere{ <0,0,0>, 0.25
                        texture { pigment{ rgb<1,0,0> }
                                  finish { diffuse 0.9
                                           phong 1}
                                } // end of texture
                        translate < 1.0, 0, 0>
                        rotate < 0, 0 ,360*clock>
                       } 
                
Create ini file for Povray
In order to create a list of png image files from Povray, an ini file is needed.
Save the file as firstanimation.ini and put in the same directory as firstanimation.pov
                ; POV-Ray animation ini file
                Antialias=Off
                Antialias_Threshold=0.1
                Antialias_Depth=2

                Input_File_Name="firstanimation.pov"

                Initial_Frame=1
                Final_Frame=30
                Initial_Clock=0
                Final_Clock=1

                Cyclic_Animation=on
                Pause_when_Done=off
                
A little bit of explaination for the parameters in ini file
Initial_Frame=1 and Final_Frame=30 tells Povray to generate 30 frames
Initial_Clock=0 and Final_Clock=1 tells Povray to create 30 frames in ONE second interval
It means $\frac{1}{30}$ second each frame
Now you have firstanimation.pov and firstanimation.ini
Run following command to generate a list of png files
                povray firstanimation.ini
                
What should do when you have 30 png files
Run following command to create gif animation on your Mac or Linux
                convert -delay 30 firstanimation*.png animation.gif